-
Notifications
You must be signed in to change notification settings - Fork 843
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
How to use stack with newer cabal version for older GHC? #4488
Comments
Have you tried adding |
@snoyberg I had a quick look into this yesterday and it looks like out of the box |
Yes, this is true. I tried with |
Would it work for your use case to have an option to force specific packages, or even all local packages, to be treated as custom build types and therefore build against the snapshot's Cabal library? The difficult problem with compiling all packages with this new Cabal version is cyclic dependencies. |
I don't quite get this solution, sorry.. My problem is in running a fixed Cabal version with different GHCs at CI, so I don't quite have the control on local packages there. Could you please clarify this a bit? |
When you use a |
Actually, on second thought, this may be more easily detectable via comparing the |
See #4691 |
…ec-version Respect cabal spec version (fixes #4488)
Problem
As far as I see Stack LTS not only determine the version of GHC, but also restricted to use only the specific Cabal version that is stuck with the particular GHC. This creates some problems with using a unique version of Cabal for different versions of GHCs, for example, using common stanzas in cabal file with
cabal: 2.4
and support both GHC-8.6.3 and GHC-8.4.4.Stack also doesn't allow and deprecates now options:
--install-cabal
and--upgrade-cabal
.The question is: how is it possible to use a newer version of Cabal (eg. 2.4) for the old GHCs (e.g. 8.0.2)?
Example
I've created a test project to illustrate the problem clearer. It can be found here:
I want to support GHC versions:
To assure that everything works at all versions both with Stack and Cabal I've created this Travis file:
where I explicitly specify
- cabal: 2.0
.Though it's ignored, so I also added this if statement (which is apparently doesn't work either):
https://github.com/vrom911/summon-test/blob/6ac63c3ad672d24b6f61589cdd163d33a5e2d64a/.travis.yml#L42-L44
And here is the output of failing Travis job for GHC-8.0.2 can be found here:
Stack version
Method of installation
The text was updated successfully, but these errors were encountered: