-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update stackage resolver to LTS 21.6 #2275
Conversation
b9bc2d2
to
21a768e
Compare
To bump the LTS version, we are using the checklist below as a guide:
|
I attempted to use the
|
I also see the linker errors when we build Juvix with a build of GHC 9.4.5 using our Dockerfile.
In addition there's the following error, which looks like a GHC compiler bug.
|
I raised the linker issue with ghc-musl benz0li/ghc-musl#1 |
Did this also happen with |
When I try with ghc-musl:9.2.7 with the current main branch of juvix, I get a different error:
For some reason stack does not detect that the system ghc matches the one required by the resolver. The versions seem to match, so I'm not sure what's wrong. |
because of
– commercialhaskell/stack#6141 (comment) and thus no official support. Does it work when you use cabal? |
P.S.: There might be official support for |
I thought this only applied to aarch64, we are building on x86_64?
I can try it, but we cannot use cabal for our release because we use https://hackage.haskell.org/package/gitrev to inject git revision info into the binary. This does not work with cabal v2 style builds. |
👍 I stand corrected. |
Using |
It also works with |
abb6e34
to
4e40b06
Compare
https://www.stackage.org/lts-21.6/cabal.config now contains the constraint `haskeline installed`. GHC 9.4.5 comes with haskeline 0.8.2 preinstalled but our configuration contains the source-repository-package for haskeline 0.8.2.1 so if you try to run `cabal build` you get the following conflict: ``` Resolving dependencies... Error: cabal: Could not resolve dependencies: [__0] next goal: haskeline (user goal) [__0] rejecting: haskeline-0.8.2.1 (constraint from project config https://www.stackage.org/lts-21.6/cabal.config requires installed instance) [__0] rejecting: haskeline-0.8.2/installed-0.8.2, haskeline-0.8.2, haskeline-0.8.1.3, haskeline-0.8.1.2, haskeline-0.8.1.1, haskeline-0.8.1.0, haskeline-0.8.0.1, haskeline-0.8.0.0, haskeline-0.7.5.0, haskeline-0.7.4.3, haskeline-0.7.4.2, haskeline-0.7.4.1, haskeline-0.7.4.0, haskeline-0.7.3.1, haskeline-0.7.3.0, haskeline-0.7.2.3, haskeline-0.7.2.2, haskeline-0.7.2.1, haskeline-0.7.2.0, haskeline-0.7.1.3, haskeline-0.7.1.2, haskeline-0.7.1.1, haskeline-0.7.1.0, haskeline-0.7.0.3, haskeline-0.7.0.2, haskeline-0.7.0.1, haskeline-0.7.0.0, haskeline-0.6.4.7, haskeline-0.6.4.6, haskeline-0.6.4.5, haskeline-0.6.4.4, haskeline-0.6.4.3, haskeline-0.6.4.2, haskeline-0.6.4.1, haskeline-0.6.4.0, haskeline-0.6.3.2, haskeline-0.6.3.1, haskeline-0.6.3, haskeline-0.6.2.4, haskeline-0.6.2.3, haskeline-0.6.2.2, haskeline-0.6.2.1, haskeline-0.6.2, haskeline-0.6.1.6, haskeline-0.6.1.5, haskeline-0.6.1.3, haskeline-0.6.1.2, haskeline-0.6.1.1, haskeline-0.6.1, haskeline-0.6.0.1, haskeline-0.6, haskeline-0.5.0.1, haskeline-0.5, haskeline-0.4, haskeline-0.3.2, haskeline-0.3.1, haskeline-0.3, haskeline-0.2.1, haskeline-0.2 (constraint from user target requires ==0.8.2.1) [__0] fail (backjumping, conflict set: haskeline) After searching the rest of the dependency tree exhaustively, these were the goals I've had most trouble fulfilling: haskeline ``` Constraints from cabal imports cannot yet be overridden so it's not possible to get rid of this conflict. To work around this we instead use stack2cabal to generate a cabal.project.freeze file for dependencies. This uses https://www.stackage.org/lts-21.6/cabal.config at generation time to fix the dependency versions
The build additionally depends on alex, happy and python3
The static flag sets `ld-options` required to produce a statically linked juvix binary. We should be able to set --ghc-options='-optl-static' to get the same effect but this causes linker errors.
cf27725
to
de3ae41
Compare
Amazing job @paulcadman. |
Resolved for ( |
Stack LTS 21.6 uses GHC 9.4.5, binaries for HLS are available via ghcup.
Changes required:
Fix warnings about type level
:
and[]
used without backticks.Fix warnings about deprecation of builtin
~
- replaced withimport Data.Type.Equality ( type (~) )
in the PreludeSemVer is no longer a monoid
path-io
now contains theAnyPath
instances we were defining (thanks to Jan) so they can be removed.Added
aeson-better-errors-0.9.1.1
as an extra-dep. The reason it is not part of the resolver is only because it has a strict bound on base which is not compatible with ghc 9.4.5. To work around this I've set:which relaxed the upper constraint bounds for
aeson-better-errors
only. When the base constraints have been updated we can remove this workaround.Use stack2cabal to generate the cabal.project file and to freeze dependency versions.
https://www.stackage.org/lts-21.6/cabal.config now contains the
constraint
haskeline installed
, which means that the version of haskeline that is globally installed with GHC 9.4.5 will be used, see:Win32
andhaskeline
, included in the Stackage snapshot? commercialhaskell/stackage#7002GHC 9.4.5 comes with haskeline 0.8.2 preinstalled but our configuration contains the source-repository-package for haskeline 0.8.2.1 (required because we're using a fork) so if you try to run
cabal build
you get a conflict.Constraints from cabal imports cannot yet be overridden so it's not possible to get rid of this conflict using the import method. So we need to use stack2cabal with an explicit freeze file instead.
Remove
runTempFilePure
as this is unused and depends onPolysemy.Fresh
inpolysemy-zoo
which is not available in the resolver. It turns out that it's not possible to use theFresh
effect in a pure context anyway, so it was not possible to userunTempFilePure
for its original purpose.We now use https://github.com/benz0li/ghc-musl as the base container for static linux builds, this means we don't need to maintain our own Docker container for this purpose.
The PR for the nightly builds is ready Use ghc-musl instead of our own Docker repo juvix-nightly-builds#2, it should be merged as soon as this PR is merged.
Thanks to @benz0li for maintaining https://github.com/benz0li/ghc-musl and (along with @TravisCardwell) for help with building the static binary.