-
Notifications
You must be signed in to change notification settings - Fork 282
Revert hpack version comment from 0.37.0 to 0.36.0 #5780
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
Conversation
These were changed by unisonweb#5522. It doesn't seem like it should be a consequential change, but the nix build seems to be treating the following as a fatal error that breaks the build: ``` unison-runtime.cabal was generated with a newer version of hpack, please upgrade and try again. ```
We use Therefore, we all kind of need to be on the same version of The problem is when one person edits a We have a mix of I'm guessing the nix flake uses Can we update the flake to use |
^ @ceedubs :) |
@aryairani the short answer is that the hpack version is tied into the haskell.nix version that we depend on, and when I try to update our haskell.nix version I run into some other issues. I imagine that if people really want to update to hpack 0.37.0 then I can figure out a way. But if it's just that one contributor happened to be on that version, I'm not sure that it's worth figuring it out and making other ucm contributors figure out how to get there. |
@ceedubs It's a little more complicated because people are installing I think Travis had had us building a custom |
FWIW the current flake doesn't choose a particular At some point I can try to play around with updating the version of haskell.nix that we depend on. But I don't really know how to go about it if there's not really a target version of stack/ghc/hpack that we are aiming for. Ideally whatever we are using in CI? |
0.36.0 vs 0.35.2 will also be an issue potentially, it just depends on the exact order of operations. I actually don't understand how this PR fixed anything (apart from avoiding a warning). The target version is just whatever we can get all the developers onto most easily; though I don't know what that is. Or else we just deal with the occasional hiccups. Or we could exclude all the |
I think the usual issue with
is that the package.yaml changed, but the updated unison-runtime.cabal wasn’t committed. So, every build with It seems like the easiest way to achieve this currently is to build, and then do a git diff to make sure nothing has changed. @ceedubs is right about the way hpack is handled in Nix currently. More generally, there is nix/versions.nix that contains all of our “recommended” tool versions (some via imported JSON). These are then managed in a couple different ways. On the Nix side, we either check that the installed version matches the recommended version (done for hpack & stack) or we tell haskell.nix to install the recommended version explicitly (done for cabal, hls, & ormolu). In VS Code, we pin the subset of nix/versions.nix that comes from .vscode/settings.yaml (so, cabal, hls, & stack). Outside of those two toolchains, we don’t have any control. This most frequently seems to cause issues with hpack & ormolu.
This isn’t the worst thing, especially since Cabal isn’t officially supported. If we made this change, then maybe also add a script to run hpack across the repo and mention it in the docs for Cabal users? Another way to help on the hpack side is just to have our recommended version be pretty new, because then it will be contributors who use other versions that see errors like the above at the time they edit package.yaml, rather than those using the recommended version seeing it when building a clean checkout. I think I can update #5486 to make things a bit better. For one, hpack can be updated to at least 0.37.0. And I think it can be switched from grabbing the default Nixpkgs version to having haskell.nix install the requested version, which might allow us to push it newer – say to 0.38.0. |
These were changed by #5522. It doesn't seem like it should be a consequential
change, but the nix build seems to be treating the following as a fatal error
that breaks the build: