-
Notifications
You must be signed in to change notification settings - Fork 704
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
Why Cabal changed build plans on us? #10470
Comments
Well, the short answer to the question is "because the state of Hackage changed". This happens all the time. Sometimes, there is a conflict between choosing the latest version one package and of another (in this case, What I'd really love to see, is for cabal-install to recognise these awkward situations and somehow explain the differences between each plan to the user. Failing that, it would be great to have a section in the user's guide on the behaviour of the solver, particularly on how it decides between local maxima. |
There is an upcoming change that does try to explain solver failures. Cabal doesn't keep around enough state to tell you why a solver plan changed, though; that would require an external tool to compare solver runs (possibly via comparing In the meantime, perhaps pinning the index state will get you back on track. |
I can't seem to find a PR corresponding to this. Could you please point me in the right direction? |
Copying post from https://discourse.haskell.org/t/debug-why-cabal-is-choosing-a-version/10547; cc @grayjay.
--allow-newer=lrucache:containers
fixes the issue, but how did this happen in the first place?At commit
a0b03f1b3ed7ee31b7ee19caaa58d88afa5eb9d1
in Fourmolu, in theweb/site/
subdirectory, if I runcabal build --dry-run
, it resolves to hakyll-3.2.0.10. If I specify--constraint='hakyll>4'
, it shows the version I expect, hakyll 4.16.2.2. I would expect Cabal to always choose the more recent version if it's possible, so why is it resolving to 3.2.0.10? And why did it just start doing so?CI passed on this commit on Oct 13, 5p PST: https://github.com/fourmolu/fourmolu/actions/runs/11318705914/job/31473662650
But the same commit is getting a different build plan now. I can repro locally, but it's also happening in CI for other PRs.
The text was updated successfully, but these errors were encountered: