-
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
custom-setup stanza ignored when building with cabal-install-2.0.0.1 and ghc-8.2.2 #4981
Comments
I can't seem to reproduce this, I cloned your repro-repo and did
IOW both, old-build and PS: I see you mention that you want to used
|
Can confirm that the following works:
The issue is most likely the |
@23Skidoo minor braindump: fwiw, I'm starting to think that cycles in the test-suite framework leading back to the package under development are questionable anyway; i.e. if you're hacking on |
@hvr The conclusion in the summary in #1575 is basically similar, the proposed solution there is to treat test suite dependencies similarly to how BTW,
which looks a bit confused to me due to the inclusion of both |
Ok, this is weird. This is what I am doing:
I can't see what is different. |
So, I haven't actually looked at your setup, but the error message you are seeing is generally indicative a Setup.hs that is not ported to work with Cabal 2.0 (which made PackageName abstract so that we could swap it to a packed representation). |
@ezyang Yes, but the cabal file has:
which should force the The aim here is to have a |
@erikd The issue you're bumping into is the aforementioned hack in |
@23Skidoo Thanks for the response, but I don't really understand it. Is there something I can do to fix this? |
@erikd Try running |
@23Skidoo Thanks! Yes, that works! |
After much difficulty, I finally managed to come up with a version of However, it seems that ghc-8.,4 is going to break this once again. Thanks to @hvr ' s PPA, I can test with ghc-8.4 in Travis now. Unfortunately it failed with both cabal-install-1.24 and cabal-install-2.0. Is the Cabal library supposed to break working |
No, it's not, but Cabal is afflicted by the same problem as GHC, in that it exposes such a large surface API intended for internal use that was never designed for external use (slash, there was never a process put in place to keep Cabal from continually breaking BC), that seemingly innocuous refactors break Custom setups. Case in point, the BC-breakage here was caused by me ten months ago in 0aa73b7 because I was trying to get better call stacks when IO actions in Cabal failed (to avoid those mysterious errors where Cabal will just say "permission denied" without saying anything else about what was denied, etc.) Would you like me to rename the Verbosity-ified version of |
Should we integrate some similar thing to the test repo into the cabal test suite -- i.e. ensure that there's an example working setup.hs that can be written to be compat with three versions? |
@ezyang wrote:
Yes, please!!!! @gbaz wrote:
I think that would help. What I have here may be the start of that test, but I'm pretty sure what I'm using here is only a small subset of what others may be using. Please let me know how I can help. |
I'm currently hacking on something for #4492 that would put |
Trivial project that demonstrates the issue is here: https://github.com/erikd-ambiata/cabal-with-ghc-8.2-error . The project doesn't need any libraries and should just build with
cabal build
.The project contains a custom
Setup.hs
file that requires version 1.24 of theCabal
library and the cabal file includes:This project builds fine with cabal-install-2.0.0.1 and ghc-8.0.2, but with ghc-8.2.2, it fails to build because it seems to ignore the
custom-setup
stanza. It also fails with ghc-8.2.1.This may of course be a bug in GHC 8.2.
The text was updated successfully, but these errors were encountered: