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

GHA fails with constraints on Cabal version #468

Open
andreasabel opened this issue Jan 17, 2021 · 4 comments
Open

GHA fails with constraints on Cabal version #468

andreasabel opened this issue Jan 17, 2021 · 4 comments

Comments

@andreasabel
Copy link
Contributor

I am testing hpack that has constraint Cabal >= 3.0.0.0, see https://github.com/andreasabel/hpack/actions/runs/492023303.
This fails for the ghc instances that come with a smaller cabal version, e.g. 8.0, see https://github.com/andreasabel/hpack/runs/1717674161.

rejecting: Cabal-1.24.2.0/installed-1.24.2.0 (conflict: hpack => Cabal>=3.0.0.0)
[__1] rejecting: Cabal-3.2.1.0, ..., Cabal-1.24.1.0
(constraint from project config TODO requires installed instance)

How would that be fixed?
Can I work around that?

@phadej
Copy link
Collaborator

phadej commented Jan 17, 2021

@andreasabel
Copy link
Contributor Author

andreasabel commented Jan 22, 2021

Thanks for the hint!

A related problem that I have is if I e.g. specify cabal-version: 2.0 in the .cabal file it does not install a sufficiently new version of cabal-install. E.g. when testing under GHC 8.0, see https://github.com/BNFC/bnfc/runs/1751241734?check_suite_focus=true , I get the error

Configuring BNFC-2.9.1...
setup: This package description follows version 2.0 of the Cabal
specification. This tool only supports up to version 1.24.2.0.

I didn't see a way to set the version of cabal-install (see also #470).

UPDATE: I managed to fix my problem by also requiring Cabal >= 2.0 in setup-depends: https://github.com/BNFC/bnfc/runs/1751716416?check_suite_focus=true

@phadej
Copy link
Collaborator

phadej commented Jan 23, 2021

setup: This package description follows version 2.0 of the Cabal
specification. This tool only supports up to version 1.24.2.0.

refers to Cabal-1.24.0.0 used to compile the custom setup. Why? I don't know. You should try to reproduce locally.

@andreasabel
Copy link
Contributor Author

See also: #168.

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

2 participants