Open cartazio opened 3 years ago
cabal-version 3.2 doesn't exist. the error could be nicer though (Cannot parse Cabal specification version: 3.2, this version doesn't exist, check this url...
).
Did cabal generate that section? That would be a bug
Nope. I wanted to specify a version in the 3.x series and made one up.
What version values does this config suport?
On Wed, Feb 24, 2021 at 11:29 AM Francesco Gazzetta < notifications@github.com> wrote:
cabal-version 3.2 doesn't exist https://cabal.readthedocs.io/en/3.4/file-format-changelog.html. the error could be nicer though (Cannot parse Cabal specification version: 3.2, this version doesn't exist, check this url...).
Did cabal generate that section? That would be a bug
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/haskell/cabal/issues/7300#issuecomment-785200078, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAABBQVRMENY7AHE3AVAOOTTAUSNFANCNFSM4YEYB7ZQ .
Just to reiterate my suggestion here:
cabal-version
describes a version spec, which makes the flag slightly misleading. I would propose two possible solutions:
cabal-spec
in the future, so as to avoid confusion. This is a bit of a deep change, I"m not sure if i want to go down this route. It is a rough edge as is. If it's tripping up power users like Carter, it's tripping up everyone else too.
Even simply an enumeration of allowed spec versions and url for further reading would be helpful
On Wed, Feb 24, 2021 at 12:26 PM Emily Pillmore notifications@github.com wrote:
Just to reiterate my suggestion here:
cabal-version describes a version spec, which makes the flag slightly misleading. I would propose two possible solutions:
- we look at calling this cabal-spec in the future, so as not to avoid confusion. This is a bit of a deep change, I"m not sure if i want to go down this route.
- we change the parser to locate a least upper spec bound for valid cabal versions. No code really has to change besides the additional parsing cases.
It is a rough edge as is. If it's tripping up power users like Carter, it's tripping up everyone else too.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/haskell/cabal/issues/7300#issuecomment-785241596, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAABBQU2NCT2AXED6LOJADDTAUZFPANCNFSM4YEYB7ZQ .
Yeah, I think this is one of those cases where just a better error message goes a long way. @emilypi's second option is clever though
In the latter case, a warning and the change suggestion/ reading ref would still be nice.
On Wed, Feb 24, 2021 at 3:06 PM Francesco Gazzetta notifications@github.com wrote:
Yeah, I think this is one of those cases where just a better error message goes a long way. @emilypi https://github.com/emilypi's second option is clever though
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/haskell/cabal/issues/7300#issuecomment-785339674, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAABBQRGX4YYTSGCH53GPXTTAVL55ANCNFSM4YEYB7ZQ .
Yeah, a warning blurb e.g. like
Warning: `cabal-version 3.2` defaults to the 3.0 parser specification. To remove these warnings, please set `cabal-version: 3.0` in your `.cabal` file.
Or something. I'm not a writer :)
config section in ~/.cabal/config for the init workflow crashes when specifying newer cabal versions
this is fine
this is not
yields this error