-
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
cabal install --lib doesn't work any more with GHC 9.2 #7819
Comments
We are working on it for a decade now: #680 (three digits!), but I guess it's time to speed it up. |
This is not about #680, but about fixing cabal/Cabal/src/Distribution/Simple/GHC.hs Lines 370 to 374 in 5b4258c
which would need to take the GHC version now. |
Right, so one option is to use XDG when working with [edit: new versions of] GHC, but not use it when doing our own cabal things. And it seems we have good support for this distinction? Edit: and we have no choice other than mixing XDG and no-XDG, because old GHCs don't use XDG, right? :( |
The release notes for 9.2.1 say:
So why 9.2.1 doesn't work? |
This is bug in GHC, I opened an upstream issue https://gitlab.haskell.org/ghc/ghc/-/issues/20684 |
This seems to fix the problem, but I'm not 100% sure it's going to be backported to 9.2: https://gitlab.haskell.org/ghc/ghc/-/merge_requests/7010 |
Good news, the GHC fix has just been backported and merged to GHC 9.2.2 (to be released). |
It seems we don't need to do anything, but let's keep this issue open until GHC 9.2.2 and possibly until somebody verifies it works. |
It would still be good to move towards respecting the XDG spec, but it is not a pressing concern as of now. |
Yes, if anybody would like to help, that'd be awesome. We track that work in another ticket mentioned above. |
The fix for this is in the next ghc -- 9.2.2. |
As mentioned by the release notes of GHC 9.2.1, GHC now respects the XDG specification for its user data directory (which includes package environments as well as GHCi configuration files). Howver, cabal hasn't been updated to reflect these changes yet, which means it still writes package environments to
~/.ghc
, instead of$XDG_DATA_HOME
.This is the function in cabal that needs to be updated:
cabal/Cabal/src/Distribution/Simple/GHC.hs
Line 373 in 3bab1db
The change to GHC was introduced in https://gitlab.haskell.org/ghc/ghc/-/merge_requests/4567
The text was updated successfully, but these errors were encountered: