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

cabal 3.2 can't build happy-lib #311

Closed
leonschoorl opened this issue Sep 23, 2024 · 2 comments · Fixed by #312
Closed

cabal 3.2 can't build happy-lib #311

leonschoorl opened this issue Sep 23, 2024 · 2 comments · Fixed by #312

Comments

@leonschoorl
Copy link

root@6116f1f2e872:~# cabal --version
cabal-install version 3.2.0.0
compiled using version 3.2.0.0 of the Cabal library 
root@6116f1f2e872:~# ghc --version
The Glorious Glasgow Haskell Compilation System, version 8.10.7
root@6116f1f2e872:~# cabal install happy --dry-run
Resolving dependencies...
Error:
    Dependency cycle between the following components: library
    In the package 'happy-lib-2.0.1'

root@6116f1f2e872:~# cabal-3.4.0.0 install happy --dry-run
Resolving dependencies...
Build profile: -w ghc-8.10.7 -O1
In order, the following would be built (use -v for more details):
 - happy-lib-2.0.1 (lib:grammar) (requires download & build)
 - happy-lib-2.0.1 (lib:tabular) (requires download & build)
 - happy-lib-2.0.1 (lib:frontend) (requires download & build)
 - happy-lib-2.0.1 (lib:backend-lalr) (requires download & build)
 - happy-lib-2.0.1 (lib:backend-glr) (requires download & build)
 - happy-lib-2.0.1 (lib) (requires download & build)
 - happy-2.0.1 (exe:happy) (requires download & build)
root@6116f1f2e872:~# 

So it's probably good to set cabal-version to 3.4

Although if I do that on a local copy, cabal 3.2 reports:

Errors encountered when parsing cabal file lib/happy-lib.cabal:

lib/happy-lib.cabal:0:0: error:
Unsupported cabal-version. See https://github.com/haskell/cabal/issues/4899.

I don't know, but I'm assuming that when cabal sees this on hackage then it will fallback to an earlier version.

@sgraf812
Copy link
Collaborator

Thanks. Indeed it sounds like the following cabal bug: haskell/cabal#6894, perhaps triggered by our use of multiple private library components.

Requiring cabal version 3.4 seems like the best solution because it gives a much clearer error message.

@sgraf812
Copy link
Collaborator

I just released version 2.0.2 on hackage and deprecated versions 2.0 and 2.0.1.

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

Successfully merging a pull request may close this issue.

2 participants