-
Notifications
You must be signed in to change notification settings - Fork 248
Upgrading to GHC 9.2.4 / cabal 3.8.1.0 causes package.db issues #1608
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
Comments
I will try to create a minimal repro in my bug repro project tomorrow so anyone can try to reproduce easily. |
Setting |
Ok so. It looks like we need a way to get the correct cabal store package db path into the For instance if I run this in the nix-shell it works:
Also if I copy the
I think we should try to find a good way to add this cabal store path to the generated CABAL_CONFIG file. We might need to do it in the It's not pretty, but try adding this to the
|
That does work. The main downside is it does slowly but surely leak tmp files with each I rigged up this It's a little weird since I didn't know a good way to get my hands on where the original config file was. I ended up creating a default |
Another option is to exclude
Then:
|
I encountered the same issue with the current version of haskell.nix. The proposed workarounds do work, however they require everyone who clones the repo to do manual work instead of relying on nix and direnv to get a working development environment. This is obviously very unfortunate. Beeing able to develop using cabal and getting the same result when building with nix was a core selling point of haskell.nix to me. Are there any new developments regarding this? How do others solve working with source-repository-package? I somehow can't imagine beeing only second to encounter this. Am I doing something wrong? |
This seems to be the core problem: #1367 |
I first got this error:
I tried manually created the package db in my
nix-shell
:But then I run into issues with my
source-repository-package
s in mycabal.project
file:My cabal versions are different pre- and post-upgrade fwiw:
9.2.3
vs 9.2.4
This is the extent of my changes:
If I revert to my old version (using GHC 9.2.3) it works fine even despite blowing everything away. It seems to have no trouble re-generating a valid
package.db
(whereas the 9.2.4 bump never even creates those files). So I can stick with that in the interim.I also checked out my upgrade branch on my laptop to see if it was my computer's environment specifically. This laptop did have some ghc 9.2.4 stuff already in
~/.cabal
(unrelated tohaskell.nix
). When I tried tocabal repl
, I got theThe following package dependencies were requested
error from above. So from that, I think I can say that haskell.nix at this version w/ghc 9.2.4 breaks my build for some reason 🤨I'm not sure if this is a
haskell.nix
issue or acabal
issue tbh.The text was updated successfully, but these errors were encountered: