Skip to content
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

Cannot compile with Cabal-1.22 #3

Open
amigalemming opened this issue Jan 2, 2016 · 6 comments
Open

Cannot compile with Cabal-1.22 #3

amigalemming opened this issue Jan 2, 2016 · 6 comments

Comments

@amigalemming
Copy link

With GHC-7.4.2 I get

[1 of 1] Compiling Main             ( /tmp/cabal-tmp-15698/base-noprelude-4.5.1.0/dist/setup/setup.hs, /tmp/cabal-tmp-15698/base-noprelude-4.5.1.0/dist/setup/Main.o )
Linking /tmp/cabal-tmp-15698/base-noprelude-4.5.1.0/dist/setup/setup ...
setup: base-noprelude cannot be built with Cabal versions newer than 1.20
(`Setup.hs` imported Cabal library version 1.22.4.0)
Failed to install base-noprelude-4.5.1.0

Similar result for GHC-7.8.4.

@hvr
Copy link
Collaborator

hvr commented Jan 3, 2016

That's because for pre-7.10 I avoid boilerplate via Setup.hs, which in turns depends on a specific Cabal API.

With Cabal 1.24 we will finally be able to specify build-dependencies for the Setup.hs script.

Since you're already using Cabal 1.22 which is newer than the Cabal version bundled with GHC 7.107.8, I suppose you'll have no problems updating to Cabal 1.24 when it comes out?

hvr added a commit that referenced this issue Jan 3, 2016
This will help address #3 once Cabal 1.24 is released
@hvr
Copy link
Collaborator

hvr commented Jan 3, 2016

@amigalemming btw, you could try to ghc hide Cabal-1.22.4.0 (for pre GHC 7.10s) as a local workaround

@amigalemming
Copy link
Author

On Sun, 3 Jan 2016, Herbert Valerio Riedel wrote:

Since you're already using Cabal 1.22 which is newer than the Cabal
version bundled with GHC 7.10, I suppose you'll have to noproblems
updating to Cabal 1.24 when it comes out?

My only problem is to wait for Cabal-1.24. :-)

@Blaisorblade
Copy link

Cabal 1.24 is out! Shouldn't the build now have, for correct semantics,

-cabal-version:       >=1.10
+cabal-version:       >=1.24

OTOH, I understand that users of Cabal 1.20 and older versions are better served with the current Cabal file... so maybe you just want to suggest 1.22 users to upgrade cabal-install to 1.24 in the compilation error?

Now, I came across this package because this dependency is not yet supported in Stack, and I'm figuring out how to fix this scenario.

@hvr
Copy link
Collaborator

hvr commented Aug 24, 2016

@Blaisorblade this is a bit of a gray area. custom-setup was designed to be usable as a backward-compatible annotation that could be retrofitted (via .cabal-revisions) in cabal-version: 1.10 cabal files to direct newer cabal versions to make better choices (this is especially important with new-build which is more liberal when solving for setup-depends), while older cabal versions ignore custom-setup but have still a good chance to succeed linking against supported versions of the deps. Usually this is the case for base-noprelude, as it's uncommon (but not impossible) to have a newer major version of Cabal than the version bundled with GHC.

There's also that technical debt in older cabal versions which made it cope badly with newer specified cabal-versions than supported. So setting a higher cabal-version should only be done when the features we're depending on are "mandatory" (which is the gray area in the case at hand).

@Blaisorblade
Copy link

Makes sense, and 1.22 users at least get an error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants