Comments (12)
Thanks for the detailed instructions!
This depends on:
from servant.
@benz0li You need to specify which subdirs of the repo to use. For example:
source-repository-package
type: git
location: https://github.com/haskell-servant/servant.git
tag: ed07f5ac6c7535089426482e1c5a842cf28544e8
subdir: servant-server
servant
servant-client-core
servant-client
from servant.
Cross references:
- https://errors.haskell.org
- https://errors.haskell.org/messages/GHC-39999/
- haskellfoundation/error-message-index#173
from servant.
The MonadTrans
issue has already been fixed in #1627. Can you try with master
instead? The solver is probably going to fail. Are you running with allow-newer
? It would be good to know such that it is easier to reproduce your issue.
from servant.
Can you try with
master
instead?
No. I am trying to build pandoc
which depends on servant-server
which depends on servant
.
Are you running with
allow-newer
?
Yes.
from servant.
It would be good to know such that it is easier to reproduce your issue.
git clone https://github.com/jgm/pandoc.git
cd pandoc
nano linux/make_artifacts.sh
diff --git a/linux/make_artifacts.sh b/linux/make_artifacts.sh
index 6d3c48954..6b025d9dc 100644
--- a/linux/make_artifacts.sh
+++ b/linux/make_artifacts.sh
@@ -1,6 +1,7 @@
#!/bin/bash
set -e
+cabal update
cabal build $CABALOPTS --ghc-options="$GHCOPTS" pandoc-cli
BINPATH=$(cabal list-bin $CABALOPTS --ghc-options="$GHCOPTS" pandoc-cli)
echo "Built executable: $BINPATH"
export DOCKERIMAGE=glcr.b-data.ch/ghc/ghc-musl:9.6.1
export GHCOPTS="-fwrite-ide-info -fdiagnostics-color=always -j4 +RTS -A8m -RTS"
export CABALOPTS="--allow-newer --disable-optimization -f-export-dynamic"
export REVISION=1
docker run --rm -v $PWD:/mnt -v $PWD/linux/artifacts:/artifacts -e REVISION -e CABALOPTS -e GHCOPTS -w /mnt --userns host --memory=0 $DOCKERIMAGE bash /mnt/linux/make_artifacts.sh 2>&1 > docker.log
Build log: docker.log
Error: cabal: Failed to build servant-0.19.1 (which is required by exe:pandoc
from pandoc-cli-0.1). See the build log above for details.
from servant.
After removing the upper version bounds for base
, mtl
, and transformers
, I was able to build servant
from master
(commit ff2c1bb) with GHC 9.6.
from servant.
I was able to build servant from master (commit ff2c1bb) with GHC 9.
I am curious how this succeeded without needing to bump the http-api-data bound as proposed in #1663. http-api-data-0.5 requires base<4.18, which should exclude GHC 9.6. Which version of Cabal did you use, @9999years ? Did it choose some ancient version of http-api-data?
EDIT: Oooh, I suppose you used --allow-newer=base
and not --allow-newer=servant:base
. That'd explain it.
from servant.
Yeah (actually, I'm using the Nix cabal-jailbreak
tool which removes all upper version bounds, but same difference).
I did get servant
to build but I haven't gotten servant-client-core
to build yet. Getting a weird error, maybe just an issue with the build setup:
[ 9 of 13] Compiling Servant.Client.Core.HasClient ( src/Servant/Client/Core/HasClient.hs, dist/build/Servant/Client/Core/HasClient.o, dist/build/Servant/Client/Core/HasClient.dyn_o )
<no location info>: error:
Failed to load interface for 'Servant.API.WithResource'
There are files missing in the 'servant-0.19.1-F93jxcBndG53cavOzkZsay' package,
try running 'ghc-pkg check'.
EDIT: Yep, just an issue with the build setup. The Nix builder was replacing the cabal file from the Git repo with one from Hackage.
from servant.
Can you try with master instead?
No.
You can use source-repository-package
with Cabal or extra-deps
with Stack to override the version in Hackage with the version from Git.
from servant.
You can use
source-repository-package
with Cabal orextra-deps
with Stack to override the version in Hackage with the version from Git.
diff --git a/cabal.project b/cabal.project
index d5afefaa6..07f94455c 100644
--- a/cabal.project
+++ b/cabal.project
@@ -1,3 +1,6 @@
+source-repository-package
+ type: git
+ location: https://github.com/haskell-servant/servant.git
packages: .
pandoc-lua-engine
pandoc-server
diff --git a/linux/make_artifacts.sh b/linux/make_artifacts.sh
index 6d3c48954..6b025d9dc 100644
--- a/linux/make_artifacts.sh
+++ b/linux/make_artifacts.sh
@@ -1,6 +1,7 @@
#!/bin/bash
set -e
+cabal update
cabal build $CABALOPTS --ghc-options="$GHCOPTS" pandoc-cli
BINPATH=$(cabal list-bin $CABALOPTS --ghc-options="$GHCOPTS" pandoc-cli)
echo "Built executable: $BINPATH"
diff --git a/pandoc-server/pandoc-server.cabal b/pandoc-server/pandoc-server.cabal
index 66ecf0624..25d1613f5 100644
--- a/pandoc-server/pandoc-server.cabal
+++ b/pandoc-server/pandoc-server.cabal
@@ -59,6 +59,7 @@ library
data-default >= 0.4 && < 0.8,
text >= 1.1.1.0 && < 2.1,
unicode-collation >= 0.1.1 && < 0.2,
+ servant,
servant-server >= 0.19 && < 0.20,
skylighting >= 0.13 && < 0.14,
wai >= 3.2 && < 3.3,
results in NoCabalFileFound "/mnt/dist-newstyle/src/servant-27d593665cbe2ddf"
.
ℹ️ I will try again as soon as a new version is released: https://hackage.haskell.org/package/servant
from servant.
@ysangkok Thanks a lot for your help.
@benz0li You need to specify which subdirs of the repo to use.
git clone https://github.com/jgm/pandoc.git
cd pandoc
nano cabal.project
diff --git a/cabal.project b/cabal.project
index d5afefaa6..cd1e26e95 100644
--- a/cabal.project
+++ b/cabal.project
@@ -1,3 +1,8 @@
+source-repository-package
+ type: git
+ location: https://github.com/haskell-servant/servant.git
+ subdir: servant-server
+ servant
packages: .
pandoc-lua-engine
pandoc-server
nano linux/make_artifacts.sh
diff --git a/linux/make_artifacts.sh b/linux/make_artifacts.sh
index 6d3c48954..6b025d9dc 100644
--- a/linux/make_artifacts.sh
+++ b/linux/make_artifacts.sh
@@ -1,6 +1,7 @@
#!/bin/bash
set -e
+cabal update
cabal build $CABALOPTS --ghc-options="$GHCOPTS" pandoc-cli
BINPATH=$(cabal list-bin $CABALOPTS --ghc-options="$GHCOPTS" pandoc-cli)
echo "Built executable: $BINPATH"
nano pandoc-server/pandoc-server.cabal
diff --git a/pandoc-server/pandoc-server.cabal b/pandoc-server/pandoc-server.cabal
index 66ecf0624..6472825ba 100644
--- a/pandoc-server/pandoc-server.cabal
+++ b/pandoc-server/pandoc-server.cabal
@@ -59,7 +59,7 @@ library
data-default >= 0.4 && < 0.8,
text >= 1.1.1.0 && < 2.1,
unicode-collation >= 0.1.1 && < 0.2,
- servant-server >= 0.19 && < 0.20,
+ servant-server,
skylighting >= 0.13 && < 0.14,
wai >= 3.2 && < 3.3,
wai-cors >= 0.2.7 && < 0.3
export DOCKERIMAGE=glcr.b-data.ch/ghc/ghc-musl:9.6.1
export GHCOPTS="-fwrite-ide-info -fdiagnostics-color=always -j4 +RTS -A8m -RTS"
export CABALOPTS="--allow-newer --disable-optimization -f-export-dynamic"
export REVISION=1
docker run --rm -v $PWD:/mnt -v $PWD/linux/artifacts:/artifacts -e REVISION -e CABALOPTS -e GHCOPTS -w /mnt --userns host --memory=0 $DOCKERIMAGE bash /mnt/linux/make_artifacts.sh 2>&1 > docker.log
Build log: docker.log
And some more output from the docker run
command, because the build is failing:
src/Text/Pandoc/Writers/EPUB.hs:254:5: warning: [GHC-53633] [-Woverlapping-patterns]
Pattern match is redundant
In an equation for ‘addMetadataFromXML’:
addMetadataFromXML e@(Element (QName name _ (Just "dc")) attrs _ _)
md | name == "type" = ...
|
254 | | name == "type" = md { epubType = Just $ strContent e }
| ^^^^^^^^^^^^^^
/usr/lib/gcc/x86_64-alpine-linux-musl/12.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: warning: type and size of dynamic symbol `pandoczm3zi1zi2zminplace_TextziPandocziOptions_zdfDefaultReaderOptions_closure' are not defined
/usr/lib/gcc/x86_64-alpine-linux-musl/12.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: warning: type and size of dynamic symbol `pandoczm3zi1zi2zminplace_TextziPandocziOptions_zdfDefaultWriterOptions_closure' are not defined
/usr/lib/gcc/x86_64-alpine-linux-musl/12.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: warning: type and size of dynamic symbol `pandoczm3zi1zi2zminplace_TextziPandocziFilterziEnvironment_zdfDefaultEnvironment_closure' are not defined
/usr/lib/gcc/x86_64-alpine-linux-musl/12.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: warning: type and size of dynamic symbol `pandoczm3zi1zi2zminplace_TextziPandocziOptions_zdfDefaultReaderOptions_closure' are not defined
/usr/lib/gcc/x86_64-alpine-linux-musl/12.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: warning: type and size of dynamic symbol `pandoczm3zi1zi2zminplace_TextziPandocziOptions_zdfDefaultWriterOptions_closure' are not defined
ℹ️ Build is failing at Checking that the binary is statically linked...
, because it is not:
file "linux-arm64/pandoc"
linux-arm64/pandoc: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-musl-aarch64.so.1, stripped
👉 But this has nothing to do with servant
.
from servant.
Related Issues (20)
- Support using the names from named routes in `servant-foreign`
- Making query parameters optionals in allLinks/safeLink with `NamedRoute`s
- Build without warnings? HOT 3
- servant-client is working fine when hitting http2 calls locally but when we try to hit it for external calls it's giving 505 HTTP Version Not Supported
- Text-2.0 support HOT 1
- Building a project fails - missing module Data.Aeson.Parser HOT 3
- servant-auth-client test fails on the 248th call to getIntClient on Mac HOT 3
- monadic `hoistServerM`? HOT 1
- Docs on "Record-based APIs: the nested records case" not in main branch HOT 3
- servant-auth-server: Too strict bounds on lens-aeson HOT 2
- servant-foreign: too strict bounds on hspec HOT 2
- Question: How to restrict an API to a particular virtual host (value of the request "Host:" header)? HOT 1
- Make JWKSettings signingKey optional HOT 1
- link broke on read me HOT 1
- Get '[JSON] does not imply a header Accept: application/json HOT 4
- Discuss support for JWTs with additional claims in light of jose deprecations
- return an `MonadUnliftIO m => ApplicationT m` from `serve` HOT 1
- Split up HasServer, HasClient HOT 2
- Export a function of type `IO (Either ServerError a) -> Handler a` from `Servant.Server` HOT 3
- Recommend argon2 in JWT cookbook
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from servant.