Skip to content
This repository has been archived by the owner on Dec 12, 2020. It is now read-only.

Install fails with "cabal: unrecognized 'user-config' option `-a'" #20

Open
gallais opened this issue May 21, 2020 · 3 comments · Fixed by #22
Open

Install fails with "cabal: unrecognized 'user-config' option `-a'" #20

gallais opened this issue May 21, 2020 · 3 comments · Fixed by #22

Comments

@gallais
Copy link

gallais commented May 21, 2020

github actions suddenly fails with an 'unrecognized option' error on a PR to
our project https://github.com/msp-strath/mary

The error is:

  /opt/cabal/2.0/bin/cabal user-config update -a http-transport: plain-http -v3
  cabal: unrecognized 'user-config' option `-a'

Has actions/setup-haskell@v1 been changed?

@hazelweakly
Copy link
Contributor

hazelweakly commented Jun 5, 2020

Looks like cabal v2.0 doesn't support the -a flag to user-config. The action automatically runs cabal update and adds the http-transport on a recommendation from Herbert (hvr). I think I had tested this successfully with cabal v2.4 but had failed to see that it wasn't supported in cabal 2.0. (it doesn't help that I have read through the entire set of docs for cabal v3, and v2.4 and have failed to see any mention of the -a flag at all).

Between this issue and other issues about wanting to skip cabal update entirely if you're using stack, I'm thinking it might just be best to remove all implicit updating behavior. It seems to be getting in the way more than its helping, and many people include it in their pipelines anyway.

@gallais
Copy link
Author

gallais commented Jun 5, 2020

I'm not married to v2.0, I think I just picked version numbers based on what
I saw listed on the ghc download page of each version.

Looking at the README, I see that you are not listing 2.0 (anymore?) as a
supported version of cabal so it's probably my fault for relying on that.

I have just bumped the version number to 2.2 and it seems to be happily
building now.

@hazelweakly
Copy link
Contributor

Excellent! I'm not sure why I "dropped" 2.0; I suspect it has to do with only supporting recent-ish GHC versions and I picked the versions of cabal that corresponded with those. That being said, I'm pretty sure cabal v2.0 was around when GHC 7.10 was?

Either way, I'm working on a fix to support cabal 2.0. The bigger goal here is remaining fully backwards compatible with v1.

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

Successfully merging a pull request may close this issue.

2 participants