-
Notifications
You must be signed in to change notification settings - Fork 846
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Add "require-cabal-version" and use this to enable Cabal-1.24 build plans #2479
Comments
I understand you're often talking about
Which warning?
|
Just to be clear: this would only effect |
Have Stack fully control the cabal-install version used for the solver (as suggested in #2386) might be a better solution to this non-determinism. Having the user need to self-install cabal-install has always been an annoying part of the workflow. I think we weren't sure at first where things were going to go with the solver and so weren't worried about it being non-deterministic and annoying, but it's clearly an important part of many users' workflows and we should probably make it nicer to use. |
@borsboom IIUC not quite. According to #2475, the question is whether stack code should be bug-compatible with the old or new behavior of cabal. (Both Cabal-the-library and cabal-install—their major versions are in sync, so that's OK). Still, sticking to one cabal version is probably simpler. |
In that case, might make sense to upgrade Stack to build with Cabal-1.24 and also always use cabal-install-1.24 for the solver. |
If I understand #2475 correctly, the So I think the question is whether we can impose that One possible reasons why we cannot: we want users to be able to use the I assume that there was a design decision made on supporting different |
Ahh... ok that changes things. Would it make sense then to fix the Cabal On Mon, Aug 15, 2016 at 6:56 AM Simon Jakobi notifications@github.com
|
Problem: GHC 7.8.4 would regress to a worse solver. I still have nightmares On Aug 15, 2016 23:15, "Emanuel Borsboom" notifications@github.com wrote:
|
That would be the most reproducible way. Note that the proposal is to use version ranges, the same way
Would it? New Cabal can work with GHC 7.8 |
I understand Cabal 2.0 and later releases won't be (necessarily) so compatible. Everybody is unhappy about existing APIs, and there's major surgery ongoing. See haskell/cabal#3573 and haskell/cabal#3566.
Sorry for being unclear—I was referring to using "whatever Cabal comes with the GHC version". BTW, in #2517 I suggest to switch to the latest Cabal 1.24 to handle #2515 (support However, that's the Cabal stack itself depends on, not for Cabal itself. Then, #2515 itself suggests that Setup.hs might need their own |
True, I suppose one possible approach might be to demand Cabal-1.24. Are there any packages we want to build that demand < 1.24? |
The fix to haskell/cabal#1725 is in
Cabal >= 1.24
. This means thatconfigure
doesn't always need to take as many deps (forbuildable: false
). In #2475 , this came up as issues with the solver, because the solver thinks some things aren't deps, that stack thinks are necessary deps.Currently, the Cabal version in use is something selected by the user not the project, and this can be a source of non-determinism. Currently build plan resolution is independent of Cabal version, and we'd prefer to keep it that way. Why? Because then we have better hope for consistent results for users. Lets say we do vary build-plan based on installed Cabal version. Then, a
stack.yaml
for Cabal-1.24 could easily break for a user of Cabal-1.22.How do we solve this? I think I prefer the following approach:
Add a
require-cabal-version
field, similar torequire-stack-version
. Check installed Cabal version on build.When the version range excludes
< 1.24
, instead use the build plans with fewer deps. This way we can force consistency.Relevant to
stack init --resolver ghc-7.10.3
creates incomplete stack file #2475, forstack init
, this would mean that when the user hascabal-install >= 1.24
, it will output astack.yaml
withrequire-cabal-version: ">= 1.24"
. If the user is using an earlier version, then a warning will be omitted and norequire-cabal-version
added.The text was updated successfully, but these errors were encountered: