-
-
Notifications
You must be signed in to change notification settings - Fork 14.5k
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
Can not build stack projects that depend on hpack projects #84820
Comments
Hmm, this seems unfortunate. I'm somewhat surprised you were able to figure this out. I don't know what I would have done had I just been presented with the hash for the cabal files differing. (Although having the problem explained to me, it does make sense what is happening.) If you (or anyone else) wants to send a PR overriding stack's hpack dependency, I'll merge it in. I guess we should also make sure that stack in 19.09 and 20.03 are using the correct version of hpack. |
i'd love to but I have no idea how. Edit: found it https://github.com/NixOS/cabal2nix/tree/master/hackage2nix |
In general, you'd be editing the following file: Basically, you'd want to override the Here's the existing modifications to the nixpkgs/pkgs/development/haskell-modules/configuration-common.nix Lines 1071 to 1098 in 2901645
You can see that You can find what versions of Checkout the $ cd /some/path/to/nixpkgs
$ nix repl ./.
nix-repl> haskellPackages.hpack<TAB>
haskellPackages.hpack haskellPackages.hpack-convert haskellPackages.hpack-dhall
nix-repl> haskellPackages.hpack.version
"0.33.0" Looks like there isn't any version of hpack other than 0.33.0. You'll have to add something to this list, so that a new
See the following post for how this works: https://discourse.nixos.org/t/haskellpackages-stm-containers-fails-to-build/5416/4 If you can't or don't want to figure out how to fix this, I recommend posting on the nixos discourse about this. There are lots of Haskell Nix users that like to help with stuff like this, but not everyone follows the issues here on GitHub. edit: Oh, and there is the following post that talks about a couple different ways to figure out how Haskell stuff works here in nixpkgs: https://discourse.nixos.org/t/call-to-action-for-updating-haskell-packages-after-bump-to-lts-15/6071 |
Already mentioned by @arianvp, but sol/hpack#381 would help this. hpack really is causing the trouble here. |
Stack 2.3.1 ships with a 'fix' that excludes packages that don't have cabal files from the lockfile commercialhaskell/stack#5210 |
I marked this as stale due to inactivity. → More info |
We now ship the same version of hpack as upstream stack. Feel free to open a new issue if you find that this is not the case. |
Describe the bug
We do not ship the same version of
hpack
as is vendored withstack
upstream. This causesstack.yaml.lock
files to be invalid as ourstack
generates differentcabal
ifles than thestack
To Reproduce
Steps to reproduce the behavior:
have a stack file that has an extra-dep on a project that doesn't have cabal file .e.g https://github.com/wireapp/wire-server/blob/develop/stack.yaml#L93
Have lockfile mismatch because the
hpack
versions generate slightly different cabal filesExpected behavior
Our stack should vendor the same version of hpack as upstream stack
Other solutions
Stack authors seem to agree that relying on
hpack
is bad for reproducibility precisely becuase it's unstable across releases https://tech.fpcomplete.com/blog/storing-generated-cabal-filesScreenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.
Metadata
Please run
nix-shell -p nix-info --run "nix-info -m"
and paste the result.Maintainer information:
The text was updated successfully, but these errors were encountered: