-
Notifications
You must be signed in to change notification settings - Fork 89
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
Stop fabricating PackageId and look it up instead #341
Conversation
Hey @pacak, thanks for trying to address this! I believe the general direction is the right one, even though I forgot much about the context in the code since it is quite a long time that I wrote (parts of) it. Let me comment on the easy to agree with parts:
Note that this is code copied from elsewhere, so potentially it would be worth it to keep it closer to the source, but hey, I merged it.
Makes sense, since it doesn't reuse anything anyways |
I noticed that you removed quite some tests, can you comment on that? |
@@ -66,88 +82,6 @@ impl EncodableResolve { | |||
} | |||
} | |||
|
|||
#[test] | |||
fn test_no_legacy_checksums() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please don't delete them, rather add some for the new cases :)
I don't have strong opinions about it, but knowing that we are working with
New code relies on info from |
instead of trying to create ourselves using information available: internal representation is not stable. Sadly tests had to go
I would like the code supporting for the old legacy formats tested. Not sure how to decide that it is not needed anymore, then the code could be removed and the tests as well. But I'd not like to do that without a deprecation period. |
Comment calling it legacy was added in January 2020, so at most 1.42 - 35 rust releases ago. |
Still, can we add tests for the new stuff? Sure, it will probably fail elsewhere if there is a problem. But it is usually easier to understand with more specific tests. |
Will look into that when I have free time. |
@kolloch can you publish a release with this? |
Done, hopefully not too rushed. |
Thanks! I opened NixOS/nixpkgs#303309 so nixpkgs has the fix too. |
Not sure if that's relevant but IFD code seems to still generate such IDs with old format to store them in |
I'm seeing stuff like this which suggests new format. Old format comes from old version of cargo.
|
And in case of #340 it was working, but wasn't able to use cache so I don't think it's related. |
Even with rust 1.77.1 being used everywhere, I see IFD like this:
with {
"lightgbm-sys 0.3.0 (git+https://github.com/Ten0/lightgbm-rs.git?branch=for_proj_main#ebc5262299d75cc770e21416f9e3ef8204427fba)": "0nr42asw4sg7q7xrkg565ivl1s9b6g75kflzy9hvl3srqrnxf10z"
} which seems to be old format. Isn't it generated on the nix side in the case of IFD? Line 64 in cf03486
Indeed it does not seem related to #348. |
Lines 246 to 249 in cf03486
Looks like it indeed. That's not going to work... |
I just ran Note it however still builds for me… |
Is this using |
Hmmh, no, indeed I'm still on 0.13.0 for some reason. I'll get this bumped and will report back. |
Indeed, this fixed it. Sorry for the noise! |
Since a recent nixpkgs bump bringing a version of cargo with rust-lang/cargo#12914, crate2nix creates a crate-hashes.json with all crate hashes from Cargo.lock (and downloads a lot of stuff while producing it). nix-community/crate2nix#341 prevents this from happening, but our hardcoded crate2nix pin prevented us from getting the fix included in 0.14.0, which did land in nixpkgs. Replace the pin with a simply override, carrying our only leftover patch on top of it, and link to that PR. Change-Id: I9503898e15d61fa6a2b1589d141bec1b4ed3d616 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11581 Autosubmit: flokli <flokli@flokli.de> Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org>
Fixes #340