-
Notifications
You must be signed in to change notification settings - Fork 697
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
New Cabal-syntax and an ancient Cabal conflict in a single package (e.g., old hackage-repo-tool on Hackage used both a new Cabal-syntax and ancient Cabal) #8370
Comments
hackage-repo-tool depends on hackage-security, which perhaps is compiled with old Cabal bundled with GHC, but then for some reason (no idea why; perhaps something unrelated fails in the build plan and the solver flips the Cabal-syntax flag and then indeed new Cabal-syntax is mandatory) a new Cabal-syntax is picked and hence the conflict. |
Actually, hackage-repo-tool on Hackage is ancient, so this may be why it's broken. Let me update on Hackage. |
CI link in the OP doesn’t show me anything meaningful (eg no error). |
The never-ending yellow CI job if full of errors. :) |
Oh, right, I see that. |
hackage-repo-tool on Hackage is ancient, but it has reasonable bounds: Cabal (>=1.14 && <1.26 || >=2.0 && <2.6 || >=3.0 && <3.4) and up to date hackage-security bounds. How come this leads to a clash of Cabal-1.24.2.0 and Cabal-syntax-3.8.1.0? I'm worried that user packages may be similarly affected. |
I'm changing the topic, because hackage-repo-tool will be updated on Hackage as soon as I get the authorization, but the problem is more general --- our shrewd scheme of bounds on Cabal-syntax, etc., probably doesn't quite work. |
The solver is permitted to flip (some) flags. I'm not an expert on that, though. I think the |
I think here is the main sketch of the scheme we adopted: haskell/hackage-security#254 (comment) |
I think the plan might have been to also retro-actively revise bounds in old cabals, but I can't find any write-up about that and, if I'm not completely making this up, we probably forgot to do it. |
The problem was noted here: #7974 (comment) @gbaz and me suggested change bounds retroactively in the same issue #7974 (comment) (not sure if that what are you remembering?) but finally re-export all modules was the chosen solution rereading the issue could give us more insights |
Given that this surfaced in the wild again, in haskell/hackage-server#1130, I'm bumping priority. This is potentially a ticking bomb, though so far the ticks are sparse and people manage to work around faster than it counts down. |
We can add |
To avoid haskell/cabal#8370 which affects 3.6.2.0.
To avoid haskell/cabal#8370 which affects 3.6.2.0.
* Bump haskell.nix and hackage.nix It's been a while * Bump index-state * Bump cardano-prelude * Bump cabal To avoid haskell/cabal#8370 which affects 3.6.2.0. * Loosen some upper bounds * Fixups for new versions * New PyF is broken
Includes workarounds for: haskell/cabal#8352 haskell/cabal#8370
A bug was fixed in cabal 3.8 (haskell/cabal#6771) that haskell.nix relied on for `pkg-config` in support. To work around this we added a dummy `pkg-config` that `cabal configure` now uses when haskell.nix runs it `cabal configure` internally. That returns version information for all the `pkg-config` packages in `lib/pkgconfig-nixpkgs-map.nix`. This mapping has also been expanded based on the results of searching nixpkgs for `*.pc` files. This update also includes workarounds for: haskell/cabal#8352 haskell/cabal#8370 haskell/cabal#8455
FTR, Stack hit it and worked around by changing the source code to use package imports (which eliminates ambiguity): commercialhaskell/stack#5886 |
* Bump haskell.nix and hackage.nix It's been a while * Bump index-state * Bump cardano-prelude * Bump cabal To avoid haskell/cabal#8370 which affects 3.6.2.0. * Loosen some upper bounds * Fixups for new versions * New PyF is broken
Due to this issue I can't bisect a bug between
Any workaround that doesn't require touching checked in files? E.g. can I add a Update: I got around it and built
The date is a random point before |
Is it the same issue @vdukhovni hit in https://mail.haskell.org/pipermail/ghc-devs/2023-November/021459.html? |
Essentially, yes. Only in my case once the flag is flipped, I see a somewhat different conflict, but the effect is the same, old The current |
Not sure whether it is the same issue but I have recently noticed that hackage-security moved to using Cabal-syntax in a minor version bump, causing some planning issues: PS: I checked the email thread, yes, it is the same issue. |
Maybe we should have posted a clarification on the mailing thread for posterity… Unfortunately, no one really knows a good solution it seems. The one I use is to freeze the index to a date in 2022-07. |
One possible workaround is described here: https://hackage.haskell.org/package/Cabal-syntax-3.6.0.0
See github.com/haskell/hackage-security/runs/7814984300?check_suite_focus=trueIn hackage-security CI we once hit a bug:Edit: this was first spotted in cabal CI originally.
The text was updated successfully, but these errors were encountered: