-
Notifications
You must be signed in to change notification settings - Fork 696
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
Non-buildable components don't work with new-build and pre-1.24 Custom setups #3881
Comments
See haskell/cabal#3881 for gory details.
@23Skidoo Do you think this is a blocker for the 2.0 release. |
I do not, since nix-local-build will still be a technical preview. But I can probably port #3337 to the new code path in time for 2.0 if we decide to go that route. |
I just want it to work correctly ;) (And #3337 doesn't make it work correctly in all cases :( ) |
Mm, I'm not sure we can work around this one in older Cabal lib versions. The configure step checks for all those deps. So we either have to force a later Cabal lib version or do some egregious hack (e.g. tell it to use an additional package db with fake instances for the required "unused" deps). |
There is more discussion of this issue in #4148. |
#4983 has an example that fails with old and new build because the custom-setup section specifies a pre-1.24 Cabal version. |
Previously I would see the following build failure: $ cabal-3.0 build -w ghc-7.10.3 Resolving dependencies... Build profile: -w ghc-7.10.3 -O1 In order, the following will be built (use -v for more details): - pretty-simple-3.1.0.0 (lib:pretty-simple) (first run) Warning: pretty-simple.cabal: Ignoring unknown section type: custom-setup Configuring pretty-simple-3.1.0.0... setup: At least the following dependencies are missing: aeson -any, bytestring -any, optparse-applicative -any haskell/cabal#3881 seems related but I don't fully understand the issue.
Previously I would see the following build failure: $ cabal-3.0 build -w ghc-7.10.3 Resolving dependencies... Build profile: -w ghc-7.10.3 -O1 In order, the following will be built (use -v for more details): - pretty-simple-3.1.0.0 (lib:pretty-simple) (first run) Warning: pretty-simple.cabal: Ignoring unknown section type: custom-setup Configuring pretty-simple-3.1.0.0... setup: At least the following dependencies are missing: aeson -any, bytestring -any, optparse-applicative -any haskell/cabal#3881 seems related but I don't fully understand the issue.
@dj110919871: do you mean it's fixed for you? Generally, do we still want to support pre-1.24 Custom setups? If not, could we close this? |
So this is #3199 rearing its ugly head again, except for the
new-build
case. When a package has some non-buildable components (e.g. an exe that is disabled with default flag choice) and the build type is Custom and the setup script is built against Cabal < 1.24, the configure step will fail with an error like the following:despite all these packages not actually being required for building the library.
In #3337 we fixed it for the old-build case by forcing a setup dependency on Cabal >= 1.24 when there's no custom-setup section. However, for new-build @dcoutts wants to do something more clever that'll still allow us to talk to old Cabal versions:
A proper fix for this hasn't been implemented yet, so we may want to consider applying #3337 to the new-build code path as well as a (hopefully) temporary measure.
The text was updated successfully, but these errors were encountered: