anoma / juvix

A language for intent-centric and declarative decentralised applications
https://docs.juvix.org
GNU General Public License v3.0
457 stars 53 forks source link

Update cabal.project.freeze for GHC 9.10.1 update #3035

Closed paulcadman closed 2 months ago

paulcadman commented 2 months ago

This PR updates the cabal freeze file to reflect the changes to dependencies after the GHC 9.10.1 stack.yaml update.

@janmasrovira can you check this? The last time I think you updated this and the freeze file was much smaller for you.

I downloaded the stack2cabal binary from https://github.com/hasufell/stack2cabal/releases/latest and ran stack2cabal in the root of our repo.

paulcadman commented 2 months ago

After updating the freeze file the cabal build fails:

$ cabal build --minimize-conflict-set
Resolving dependencies...
Error: cabal: Could not resolve dependencies:
[__0] trying: juvix-0.6.6 (user goal)
[__1] trying: ghc-9.10.1/installed-64dd (dependency of juvix)
[__2] next goal: containers (dependency of juvix)
[__2] rejecting: containers-0.7/installed-622f, containers-0.7 (constraint
from project config /Users/paul/heliax/juvix/cabal.project.freeze requires
==0.6.8)
[__2] rejecting: containers-0.6.8 (conflict: ghc =>
containers==0.7/installed-622f)
[__2] rejecting: containers-0.6.7, containers-0.6.6, containers-0.6.5.1,
containers-0.6.4.1, containers-0.6.3.1, containers-0.6.2.1,
containers-0.6.1.1, containers-0.6.0.1, containers-0.5.11.0,
containers-0.5.10.2, containers-0.5.10.1, containers-0.5.9.2,
containers-0.5.8.2, containers-0.5.7.1, containers-0.5.7.0,
containers-0.5.6.3, containers-0.5.6.2, containers-0.5.6.1,
containers-0.5.6.0, containers-0.5.5.1, containers-0.5.5.0,
containers-0.5.4.0, containers-0.5.3.1, containers-0.5.3.0,
containers-0.5.2.1, containers-0.5.2.0, containers-0.5.1.0,
containers-0.5.0.0, containers-0.4.2.1, containers-0.4.2.0,
containers-0.4.1.0, containers-0.4.0.0, containers-0.3.0.0,
containers-0.2.0.1, containers-0.2.0.0, containers-0.1.0.1,
containers-0.1.0.0, containers-0.5.9.1, containers-0.5.8.1 (constraint from
project config /Users/paul/heliax/juvix/cabal.project.freeze requires ==0.6.8)
[__2] fail (backjumping, conflict set: containers, ghc, juvix)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: containers, ghc, juvix

I suspect that the stack2cabal tool is using the explicit extra-dep versions and not taking account of the allow-newer: true flag in stack.yaml.

We are setting an explicit containers-0.6.8@sha256:bb2bec1bbc6b39a7c97cd95e056a5698ec45beb5d8feb6caae12af64e4bd823c,2670 version, but this conflicts with the version required by the ghc package according to the cabal solver.

lukaszcz commented 2 months ago

Maybe it'd be most efficient to freeze this till GHC 9.10.1 is supported by stack. Until then we suspend cabal support.

paulcadman commented 2 months ago

Maybe it'd be most efficient to freeze this till GHC 9.10.1 is supported by stack. Until then we suspend cabal support.

This would be fine, but Jan and I use cabal with LSP (LSP is more stable for me when using cabal). I think I have a way to make it work.