-
-
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
nixpkgs stack uses different hpack than upstream binary release #223390
Comments
It would also be great to have some automation to make sure this doesn't regress. I guess that would involve downloading an official matching version stack binary and checking what the |
In what way does this issue present? Supposedly stack has become more resistant to this problem: commercialhaskell/stack#5210 It seems ridiculous that we'd have to track what stack binaries ship for all eternity. |
The concrete issue is that
I don't really understand this - for dev facing tools, isn't it expected that |
But the real problem here is not an incompatibility between stack and hpack versions. It is like with very many tools, that you using another hpack version than your coworkers does not work. I am uncertain what the best solution for that is. But in general nixpkgs downgrading software because other distribution methods are not as fast is a bit unsatisfying. Additionally, I find it mighty confusing, that the stack binaries are not build with hpack version from stackage. Using the hpack version from stackage LTS, which we do, is the most blessing one can generally achieve for a package version. So all of this is me shouting like a five year old: “Not our fault!” The question is what to do about it. Have you considered using an older nixpkgs version which uses the right hpack version? Apparently the whole process is super sensitive to the hpack version, so if we downgrade hpack now we probably annoy other people. If there is no better solution maybe we need to supply different hpack versions and stack with different hpack versions and the user can choose? |
I agree
I agree
I would guess that if you bless the version that the official stack bindist ships, nobody would complain, except maybe a single instance of other nixpkgs stack users, after which it should be fine? I guess a more principled approach would be to instead live with this for now and wait until stack bindists bump hpack version, at which point start tracking the hpack version provided with bindists.
Of course I can work (and actively am working) around this. And also I do not expect that miraculously software from nixpkgs will be bug for bug compatible with official bindists. But this feels like a relatively simple(perhaps? I do not know how easy it is to have an additional |
In the past we have overridden the version of I guess a newer hpack version was recently released and it slipped through. @googleson78 would you be able to send a PR overriding the hpack version used by stack so that it is in sync with upstream? If you could figure out a simple test to add in |
I've created a small patch to adding a test. However, that requires an internet connection, and from what I understand, nixpkgs tests run in a sandbox, and that won't be available(?) Should I:
Additionally, I couldn't find how to make |
That's correct.
I like what you currently have in your commit, but you'll have to pin the upstream (non-nixpkgs) stack version with a commit hash (and ideally fetch it with something like
A lot of these types of overrides are in
You'll likely have to do something similar for hpack with stack. |
Currently Upstream
I've just pushed cbc30e4 in #223827, which drops I'm going to keep this issue open in case anyone is able to send a PR implementing some sort of test in Nixpkgs that upstream stack and our stack use the same hpack version. |
Just so I understand this right: If someone's team uses “stack-2.9.3: hpack-0.35.1” but they themselves get our “stack-2.9.1: hpack-0.35.0” do they still have this problem? |
Thanks @cdepillabout and sorry for not getting back to this earlier. I'll still have in mind trying to write a test for this.
It did somehow become an issue for my workplace, because this causes the original issue but in reverse - I was using a newer hpack(from nix) and someone was using the older one, causing some kind of issues for the other person. However, I currently can't dig out the exact complaints. |
My understanding is that this is correct. If you're using |
What's the state of this issue? |
I fixed the underlying problem in cbc30e4. But we don't have any assurance that the same problem won't crop up again the next time Stack releases a new version. I was leaving this issue open so that hopefully someone would send a PR adding some sort of test that the hpack version used by Stack in Nixpkgs is the same as the hpack version used by the upstream Stack release. Although I don't have a good idea of how to write this test in such a way that we won't have to manually bump a version/URL/hash every time there is a new release of Stack, which is quite annoying. It is the git-annex problem all over again. |
I implemented the check for the upstream stack/hpack version in #243798 |
Describe the bug
The
stack
that's currently in nixpkgs useshpack-0.35.2
, the official stack binary release useshpack-0.35.1
For more details, I think the core issue is basically the same as #84820.
I think the fix is to change the version of
hpack
which thestack
in nixpkgs is built with from0.35.2
(which is the version of thehpack
package in nixpkgs) to0.35.1
.Notify maintainers
@cdepillabout @expipiplus1 @maralorn @sternenseemann
The text was updated successfully, but these errors were encountered: