-
Notifications
You must be signed in to change notification settings - Fork 691
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
cabal syntax errors with ghc-8.0 #6722
Comments
So with GHC-8.0.2 it actually uses Yet, I cannot be sure as I fail to reproduce your issue. The released 2.14.2 doesn't have
|
Thanks for your input! I actually found a solution, see below. First of all, http://darcs.net/ is our current development version where we indeed require ghc>=8.2. I am currently working with the release-2.14 branch at http://darcs.net/releases/branch-2.14 in order to support building with ghc-8.8 and 8.10. I could not reproduced the problem with branch-2.14 either, though. This prompted me to closely inspect my current changes. I tracked down the patch that breaks the build for ghc-8.0:
Without this patch I can build with ghc-8.0.2, 8.2,2, 8.4.4, and 8.6.5. But then building with ghc >= 8.8 fails:
I now found that this failure is caused by adding the autogen-modules and other-modules to the darcs executable section. I did this because of the warning:
It turns out that when I ignore this warning and add the |
Yes. This issue will be solved in next cabal major release (3.4), and in fact doesn't affect the installation, only local development. |
I am using cabal-3.2. Everything works fine with ghc versions from 8.8 down to 8.2. However, when I use ghc-8.0 something very strange happens: cabal no longer recognizes the cabal file syntax:
Warning: darcs.cabal: Unknown fields: autogen-modules (line 356)
It then proceeds to compile everything just fine. But in the end it fails with
even though there is a generated Version.hs file at
dist-newstyle/build/x86_64-linux/ghc-8.0.2/darcs-2.14.2/build/autogen/Version.hs
Why does cabal-3.2 switch to a different cabal file parser depending on the ghc version?
How can I fix this?
The text was updated successfully, but these errors were encountered: