You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to make cabal-3.10 build packages with custom setups on GHC 9.10.0 (alpha3), which ships with Cabal-3.12, cabal insists to build Cabal-3.10.3.0.
If I try to force using the installed Cabal, constraint solving fails.
system-filepath-0.4.14$ cabal build -w ghc-9.10.0 -c 'setup.Cabal >=3.12'
Resolving dependencies...
Error: cabal: Could not resolve dependencies:
[__0] trying: system-filepath-0.4.14 (user goal)
[__1] next goal: system-filepath:setup.Cabal (dependency of system-filepath)
[__1] rejecting: system-filepath:setup.Cabal-3.12.0.0/installed-c30b
(constraint from maximum version of Cabal used by Setup.hs requires <3.12)
The package itself does not impose an upper bound on Cabal:
custom-setup
setup-depends: Cabal >= 1.8, base >=4.0 && <5
This is not a problem with cabal-3.11 (master), this one does not impose this upper bound.
If the field is not specified the implicit package set will be used. The package set contains packages bundled with GHC (i.e. base, bytestring) and specifically Cabal. The specific bounds are put on Cabal dependency: lower-bound is inferred from cabal-version, and the upper-bound is < 1.25.
(Ok, the "< 1.25" is definitively stale doc here.)
The docs seem to say that the upper bound comes from whatever is bundled with GHC, which should be including Cabal-3.12 (bundled with GHC 9.10 alpha3).
Maybe one should not have search through the source code of cabal to get this information.
The docs (see OP) need to mention this.
The reason for the constraint should be clearer. Currently it says:
(constraint from maximum version of Cabal used by Setup.hs requires <3.12)
Better formulation:
(the use of cabal 3.10.* limits the maximum version of Cabal used by Setup.hs to <3.12)
I am also a bit skeptical about placing this limit in the first place.
As we can't predict the future, we also place a global upper bound on the lib:Cabal version we know how to interact with
This sound to me like:
As I cannot predict whether my house will stand for 50 years, I will tear it down after 20 years.
I do not see the point of forcing pessimism into the constraint solving here.
Should things actually break with a too new Cabal, then I can always place a suitable upper bound with -c setup.Cabal < VERSION, or can't I?
I am also a bit skeptical about placing this limit in the first place.
Given that Cabal-X is usually released a few weeks earlier than cabal-install-X, the limitation is quite annoying.
Could it be "current version + 4"? So that cabal-install-3.10 could be used to test Cabal-3.12, hoping that cabal-install-3.12 will be available in time for Cabal-3.14.
However this issue only speaks about warnings which I find totally appropriate.
So we would want a warning if cabal-x builds Setup.hs with Cabal-y where y is a release version bigger than x rather than a hard constraint one cannot overwrite.
The commit that introduced the OP is c92b715. It has no tests and no doc changes may thus be simply revertible.
It's not as I try to explain. The cabal-install-3.14 would work without the constraint, cabal-install-3.12 won't.
Ok, my model seems to be naive. I thought that it is only Setup.hs that needs the right Cabal version to build and function, but it the same library Cabal that dictates how cabal-install invokes Setup, and yes, then there is possibility of incongruence which isn't fixable either.
Still, replacing the hardwired Cabal <... constraint by a stern warning seems a possibility.
The release process (#9885) for cabal 3.12.1.0 is now at the point where we finished backporting all planned PRs. In the interest of releasing cabal-install 3.12.1.0 ASAP and so eliminating (I hope) the immediate problem described in this issue for the time being, we need to move on to the next steps of the release process. If you are working on a PR that fixes this here ticket in a more future-proof way than just by releasing a new cabal-install, please kindly submit it for review now. Please also note we need a consensus on how to solve this issue, so the review process would need to be double-purposed to also include that discussion (but with a concrete prototype PR in hand, that's sometimes easier).
If the PR is not agreed on and doubly-reviewed by Monday morning, we are going to proceed with the release. But maybe a group of concerned user has the PR done and is finishing discussing it and forging the consensus behind the scenes. If so, it's time for the big reveal.
Thank you for the discussion in this ticket and at the open cabal devs meeting. I wasn't aware the emergency measure of releasing only Cabal the library has such dire consequences for some users, so now we are wiser and we'd probably rather choose to sync a minor cabal version with a new GHC release (with all the hackery needed for that due to a versioned API) than to stagger a major version release as we did this time. If you have any spare capacity to help with releasing cabal, that would be awesome and maybe it would enable us to just do normal releases twice a year together with GHC and not spend time on tricks and hacks instead. :) Any other contribution, e.g., reviewing PRs (https://github.com/haskell/cabal/pulls?q=is%3Apr+is%3Aopen+label%3A%22attention%3A+needs-review%22) would also help.
Activity
andreasabel commentedon Apr 23, 2024
Ruining my CIs...: https://github.com/BNFC/bnfc/actions/runs/8800309303/job/24151220023#step:15:28
Bump CI to GHC 9.10.0 and latest minor versions
Bump CI to GHC 9.10.0 and latest minor versions
Bump CI to GHC 9.10.0 and latest minor versions
andreasabel commentedon Apr 27, 2024
@ffaf1: This issue prevents me from evaluating Cabal-3.12 with a released
cabal-install, and the following one withmaster:Not sure how I should verify relaxations to
Cabal < 3.13in my projects now...Bodigrim commentedon Apr 27, 2024
This is expected behavior:
cabal/cabal-install/src/Distribution/Client/ProjectPlanning.hs
Lines 1397 to 1414 in bccc59f
andreasabel commentedon Apr 27, 2024
Thanks for digging this out @Bodigrim!
Maybe one should not have search through the source code of
cabalto get this information.The docs (see OP) need to mention this.
The reason for the constraint should be clearer. Currently it says:
Better formulation:
I am also a bit skeptical about placing this limit in the first place.
This sound to me like:
I do not see the point of forcing pessimism into the constraint solving here.
Should things actually break with a too new
Cabal, then I can always place a suitable upper bound with-c setup.Cabal < VERSION, or can't I?Bodigrim commentedon Apr 27, 2024
Given that
Cabal-Xis usually released a few weeks earlier thancabal-install-X, the limitation is quite annoying.Could it be "current version + 4"? So that
cabal-install-3.10could be used to testCabal-3.12, hoping thatcabal-install-3.12will be available in time forCabal-3.14.andreasabel commentedon Apr 28, 2024
The original issue seems to be:
However this issue only speaks about warnings which I find totally appropriate.
So we would want a warning if
cabal-xbuildsSetup.hswithCabal-ywhereyis a release version bigger thanxrather than a hard constraint one cannot overwrite.The commit that introduced the OP is c92b715. It has no tests and no doc changes may thus be simply revertible.
Bump CI to GHC 9.10.0 and latest minor versions
28 remaining items
Regenerate CI
ulysses4ever commentedon May 28, 2024
@RyanGlScott have you considered using the prerelease advertized in the Cabal-3.12 announcement? It should work for custom setups. https://discourse.haskell.org/t/ann-cabal-3-12-0-0-released/9504#how-to-get-the-cabal-install-pre-release-3
RyanGlScott commentedon May 28, 2024
I will happily use
cabal-install-3.12.0.0once it is fully supported byghcupandhaskell-ci.phadej commentedon May 28, 2024
I'd use
cabal-installpreleases if they were inghcupprerelease channelI was unaware there are
cabal-installprerelease, as it didn't show up inghcuplist. I don't read discourse.Bodigrim commentedon May 28, 2024
...which is worth doing anyway.
One would hope so, but apparently it's not.
andreasabel commentedon May 29, 2024
I see this in
ghcup list:ghcup config:andreasabel commentedon May 29, 2024
@phadej
Ok, my model seems to be naive. I thought that it is only
Setup.hsthat needs the rightCabalversion to build and function, but it the same libraryCabalthat dictates howcabal-installinvokesSetup, and yes, then there is possibility of incongruence which isn't fixable either.Still, replacing the hardwired
Cabal <...constraint by a stern warning seems a possibility.phadej commentedon May 29, 2024
I tested with
cabal 3.11.0.0.2024.4.19and theCabal-3.12.0.0is picked up forsetup-depends.So the only "issue" I see here, is that
cabal-install-3.12.0.0is not released.Regenerate CI
fix(CI): Relax .installed constraints on Cabal & Cabal-syntax
fix(CI): Relax .installed constraints on Cabal & Cabal-syntax
Mikolaj commentedon Jun 15, 2024
The release process (#9885) for cabal 3.12.1.0 is now at the point where we finished backporting all planned PRs. In the interest of releasing cabal-install 3.12.1.0 ASAP and so eliminating (I hope) the immediate problem described in this issue for the time being, we need to move on to the next steps of the release process. If you are working on a PR that fixes this here ticket in a more future-proof way than just by releasing a new cabal-install, please kindly submit it for review now. Please also note we need a consensus on how to solve this issue, so the review process would need to be double-purposed to also include that discussion (but with a concrete prototype PR in hand, that's sometimes easier).
If the PR is not agreed on and doubly-reviewed by Monday morning, we are going to proceed with the release. But maybe a group of concerned user has the PR done and is finishing discussing it and forging the consensus behind the scenes. If so, it's time for the big reveal.
Thank you for the discussion in this ticket and at the open cabal devs meeting. I wasn't aware the emergency measure of releasing only Cabal the library has such dire consequences for some users, so now we are wiser and we'd probably rather choose to sync a minor cabal version with a new GHC release (with all the hackery needed for that due to a versioned API) than to stagger a major version release as we did this time. If you have any spare capacity to help with releasing cabal, that would be awesome and maybe it would enable us to just do normal releases twice a year together with GHC and not spend time on tricks and hacks instead. :) Any other contribution, e.g., reviewing PRs (https://github.com/haskell/cabal/pulls?q=is%3Apr+is%3Aopen+label%3A%22attention%3A+needs-review%22) would also help.
fix(CI): Relax .installed constraints on Cabal & Cabal-syntax