-
Notifications
You must be signed in to change notification settings - Fork 698
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
"nix: True" in .cabal/config causes parsing error #8452
Comments
Thanks for the report! V2-commands don't support this option anyway (#4646), so these are (probably) not the droids you're looking for, but we certainly shouldn't fail with a parse error! |
I get the same error if I do |
Since I'm not trying to say that If you don't want to manually enter the shell every time, you could look into ( |
It would seem like a bug to me that |
I think you may not be wrong. An issue and/or PR are welcome (and we're going to double-check removing this is a good idea in the discussion for the PR). |
Was a change to the "nix" config option intentional or accidental? The only thing mentioned in the change log is: "Make enable/disable nix flags easier to read" |
I didn't realized it's a 3.8 regression. I'd be very surprised if #8054 is the reason (thanks Chris for pointing to it!) -- it looks completely innocent, but otoh it's the most likely... Would be good is someone confirmed. |
I checked that #8054 is indeed the culprit. |
I tried to make sense of it but cabal flag combinators are simply above my head. I'm paging in @cbclemmer, the author of #8054, in case they want to work on fixing this regression. Simply rolling back the change is easy, but would be more interesting to retain the improved documentation and have the parser recognize the "nix" flag in config as before… Maybe rolling back for now and researching more in due course would be the right way to go. |
@ulysses4ever Yeah, I can look into it |
PR is up #8522 it fixes the issue and adds tests for the config file. |
Describe the bug
Nix integration not working as expected in cabal 3.8.1.0.
To Reproduce
Now edit
~/.cabal/config
, changing line 24 to:This used to work (e.g. in Cabal library and cabal-install version: 3.4.0.0), and it's what the documentation says to do.
Please use version-prefixed commands (e.g.
v2-build
orv1-build
) to avoid ambiguity.Expected behavior
cabal v2-update
should handle this setting, or if something has changed and this is no longer correct, the docs should be updated and cabal should warn me.System information
Additional context
I'm running NixOS.
The text was updated successfully, but these errors were encountered: