!FBuJyWXTGcGtHTPphC:nixos.org

Nix Rust

708 Members
Rust158 Servers

Load older messages


SenderMessageTime
25 Mar 2025
@tomasajt:matrix.orgTomayes, I believe13:58:25
@emilazy:matrix.orgemilyright13:58:32
@emilazy:matrix.orgemilyis your concern that people need to be able to write packages compatible with both 24.11 and 25.05?13:58:41
@emilazy:matrix.orgemily I believe they can do that by setting it explicitly to true. 13:58:58
@emilazy:matrix.orgemilywe can't avoid 25.05 having a breaking change from 24.11, because 1.85 already broke all the hashes13:59:03
@tomasajt:matrix.orgTomaTrue, and they will get warned anyways13:59:10
@emilazy:matrix.orgemilyso since we're locked in to a breaking change, we should make it the safest and most ergonomic one that avoids old hashes being used from the cache and makes things work without setting a flag manually13:59:21
@emilazy:matrix.orgemily shipping with useFetchCargoVendor = false; as the default means either (a) dangerous reuse of cached FODs that now don't reproduce, if we keep the old mechanism or (b) if we remove the old mechanism (which I think we ought to), you have to set a flag on every Rust package just to get it to eval, which is silly 14:00:15
@emilazy:matrix.orgemily BTW, one thing we could do is have the FOD derivation print "hey, btw, if the hash mismatches after you upgraded to 25.05 this is expected because of Rust 1.85, just update it, and if you need 24.11 back-compat then set useFetchCargoVendor = true; explicitly", right before failing 14:00:58
@emilazy:matrix.orgemilyif we're worried about users getting confused when updating14:01:05
@emilazy:matrix.orgemilyI don't think that's strictly mandatory though, stuff breaks in Nixpkgs with less handholding than that 🫠14:02:05
@emilazy:matrix.orgemily

I would suggest that after we drop kubernix we

  1. flip useFetchCargoVendor to true by default, add an assertion that it's not false
  2. rip out the old fetching machinery entirely
  3. document that in the release notes
14:02:49
@tomasajt:matrix.orgTomakubernix uses importCargoLock, no need to wait for that14:03:39
@emilazy:matrix.orgemilyfair enough14:03:52
@emilazy:matrix.orgemilywe should probably drop it anyway though…14:03:55
@tomasajt:matrix.orgTomayeh14:03:59
@emilazy:matrix.orgemily like it looks pretty knownVulnerabilities, it pins Kubernetes components from over half a decade ago 14:04:11
@emilazy:matrix.orgemily does importCargoLock handle the "same package from two different registries" thing btw? 14:04:48
@tomasajt:matrix.orgTomaI don't think so14:04:56
@emilazy:matrix.orgemily I am wondering if it makes sense to allow fetchCargoVendor to be driven by a Cargo.lock to avoid maintaining two paths for all of this altogether. but that's not release-blocking 14:07:20
@tomasajt:matrix.orgTomaafter my last few migrations to fetchCargoVendor get merged, almost all other packages that still have a Cargo.lock vendored do it because of upstream not publishing it14:07:29
@tomasajt:matrix.orgTomanot sure I understand14:08:08
@emilazy:matrix.orgemily we could have a mode where you supply a Cargo.lock and a hash, right? 14:08:38
@emilazy:matrix.orgemily which would meet the "no upstream Cargo.lock" use case and ~obsolete importCargoLock 14:08:53
@tomasajt:matrix.orgTomaI guess very much like with fetchYarnDeps14:09:44
@tomasajt:matrix.orgToma but for historical reasons almost everyone uses ${src}/yarn.lock instead of inherit src there (it's not IFD, since it only uses that in the build process) 14:10:37
@emilazy:matrix.orgemily

https://github.com/NixOS/nixpkgs/blob/15f3d37c73c8c1090f8fef7b8508675c9260eab6/pkgs/build-support/rust/import-cargo-lock.nix

  • https://github.com/NixOS/nixpkgs/blob/15f3d37c73c8c1090f8fef7b8508675c9260eab6/pkgs/build-support/rust/replace-workspace-values.py

isn't a trivial maintenance burden, so if 25.05 is doing breaking changes anyway, it might be best to eliminate it

14:11:05
@emilazy:matrix.orgemily * https://github.com/NixOS/nixpkgs/blob/15f3d37c73c8c1090f8fef7b8508675c9260eab6/pkgs/build-support/rust/import-cargo-lock.nix + https://github.com/NixOS/nixpkgs/blob/15f3d37c73c8c1090f8fef7b8508675c9260eab6/pkgs/build-support/rust/replace-workspace-values.py isn't a trivial maintenance burden, so if 25.05 is doing breaking changes anyway, it might be best to eliminate it 14:11:09
@emilazy:matrix.orgemily ah I guess we use the latter in fetchCargoVendor too 14:11:34
@emilazy:matrix.orgemilyso it's not so bad14:11:35

Show newer messages


Back to Room ListRoom Version: 6