Skip to content
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

Can't depend on ghc-lib-parser-9.8.4.20241130 and ghc-9.8.4 at the same time #572

Closed
fendor opened this issue Dec 3, 2024 · 5 comments
Closed

Comments

@fendor
Copy link

fendor commented Dec 3, 2024

Hi! Trying to build HLS with ghc 9.8.4, I encountered this solver error:

> cabal repl -w ghc-9.8.4 -b ghc,ghc-lib-parser --constraint="ghc-lib-parser==9.8.4.20241130"
Resolving dependencies...
Error: [Cabal-7107]
Could not resolve dependencies:
[__0] trying: fake-package-0 (user goal)
[__1] next goal: ghc-lib-parser (dependency of fake-package)
[__1] rejecting: ghc-lib-parser; 9.10.1.20241103, 9.10.1.20240511 (constraint from command line flag requires ==9.8.4.20241130)
[__1] trying: ghc-lib-parser-9.8.4.20241130
[__2] next goal: filepath (dependency of ghc-lib-parser)
[__2] rejecting: filepath-1.4.301.0/installed-211c (conflict: ghc-lib-parser => filepath>=1.5 && <1.6)
[__2] trying: filepath-1.5.4.0
[__3] next goal: directory (dependency of ghc-lib-parser)
[__3] rejecting: directory-1.3.8.5/installed-b24b (conflict: filepath==1.5.4.0, directory => filepath==1.4.301.0/installed-211c)
[__3] trying: directory-1.3.9.0
[__4] next goal: ghc (dependency of fake-package)
[__4] rejecting: ghc-9.8.4/installed-c895 (conflict: directory==1.3.9.0, ghc => directory==1.3.8.5/installed-b24b)
[__4] rejecting: ghc; 9.10.1, 9.8.2, 9.8.1, 9.6.6, 9.6.5, 9.6.4, 9.6.3, 9.6.1, 9.4.8, 9.4.7, 9.4.6, 9.4.5, 9.4.4, 9.4.3, 9.4.2, 9.4.1, 9.2.8, 9.2.7, 9.2.6, 9.2.5, 9.2.4, 9.2.3, 9.2.2, 9.2.1, 9.0.2, 8.10.7, 8.10.2, 8.10.1, 8.8.3, 8.8.1, 8.6.5, 8.6.4, 8.6.1, 8.4.4, 8.4.3, 8.4.1, 8.2.2, 8.2.1, 9.2.3.20220620 (constraint from non-reinstallable package requires installed instance)
[__4] fail (backjumping, conflict set: directory, fake-package, ghc)
After searching the rest of the dependency tree exhaustively, these were the goals I've had most trouble fulfilling: ghc, ghc-lib-parser, base, directory, filepath, fake-package
Try running with --minimize-conflict-set to improve the error message.

One can relax the filepath constraint (>= 1.5 && <1.6), and then it successfully compiles.

I don't know how this constraint is derived, maybe it is implied by some flag?

@fendor fendor changed the title Can't depend on ghc-lib-parser-9.8.4.20241130 and ghc-9.8.4 at the same time. Can't depend on ghc-lib-parser-9.8.4.20241130 and ghc-9.8.4 at the same time Dec 3, 2024
@juhp
Copy link

juhp commented Dec 3, 2024

Yes I just hit this too for Stackage Nightly

Revision also needed for ghc-lib-9.8.4.20241130 of course

@juhp
Copy link

juhp commented Dec 4, 2024

I could make a Hackage revision?
to help expedite moving Stackage Nightly to 9.8.4

@shayne-fletcher
Copy link
Contributor

i tightened the lower bounds on filepath in #571 for the 9.8 and 9.10 cases. apparently, that was not a good thing to do. i'll put them back to filepath >= 1 as it was in the code and in the 9.8.4 hackage distributions.

@shayne-fletcher
Copy link
Contributor

I don't know how this constraint is derived, maybe it is implied by some flag?

they are chosen by examining the GHC .cabal files on the branch of the ghc-lib sources (e.g. ghc-9.8.4-release).

hackage has been fixed up for ghc-lib-parser-9.8.4.20241130 and ghc-lib-9.8.4.20241130

@fendor
Copy link
Author

fendor commented Dec 4, 2024

Thank you for the quick response and fix! Closing as fixed :)

@fendor fendor closed this as completed Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants