.cabal was modified manually, please use --force to overwrite.
Hi, I'm trying to use an external git repo as an extra-dep in stack-to-nix and getting the error
.cabal was modified manually, please use --force to overwrite.
It doesn't seem like this is the case as I've tried regenerating it from the hpack but it reports the same. If I delete the cabal file, then it works.
Log here:
https://gitlab.com/shakebook-site/shakebook-lib/-/jobs/645114372
Hm, maybe different versions of hpack? I would hope that different versions would produce the same .cabal file from something with the same spec-version...
Is there a way to grab the generated copy of the cabal file for the nix version of that build to compare?
Maybe just run the hpack yourself? If you build haskell-nix.haskellPackages.hpack.components.exes.hpack and run the hpack from there yourself on your package.yaml that'll presumably give you the same objection.
I think this might be a bug in haskell.nix. If both a .cabal file and a package.yaml file are present in a directory should we be running hpack at all or just using the .cabal file?
I hit this error by having both a .cabal file and package.yaml file.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
I think this has been fixed for cabalProject (it now prefers .cabal file over package.yaml if both are present). I am not sure about stackProject though.