rust-cbindgen: fix test failures due to env vars#348031
rust-cbindgen: fix test failures due to env vars#348031emilazy merged 1 commit intoNixOS:staging-nextfrom
Conversation
|
It fixes |
There was a problem hiding this comment.
this needs to be a stable url, like: https://github.com/mozilla/cbindgen/commit/f8efe01d7f23c56b593ec686f0b430e6d47404e0.patch?full_index=1, and the other commit, but also needs to be merged in the tree otherwise the commits can get garbage collected -- so with unmerged PRs we are just vendoring the patch rather than using fetchpatch.
There was a problem hiding this comment.
Good idea! I will wait till next week and see if it can get merged upstream. They are pretty responsive.
stable url, like:
https://github.com/mozilla/cbindgen/commit/f8efe01d7f23c56b593ec686f0b430e6d47404e0.patch?full_index=1
I have heard this before and will do so once upstream has responded. But just out of curiosity: how might https://patch-diff.githubusercontent.com/raw/*/*/pull/*.patch differ from the stable URL? Maybe the hash will change?
There was a problem hiding this comment.
https://github.com/mozilla/cbindgen/pull/1010.patch will change when the PR is updated, thus creating hash mismatch and breaking the package.
|
I didn't expect this to be a mass rebuild 💀 I will wait for ofborg to finish first and retarget Update: the mass rebuild is most probably due to $ nix why-depends --precise --derivation nixpkgs#mesa nixpkgs#rust-cbindgen
/nix/store/9wdy52gv1y9nvc4zyjl8nnziallqvz7a-mesa-24.2.2.drv
└───/: ….9.3.drv",["out"]),("/nix/store/r0dzbar9b3q3pq72ywffq4w50q8zsxww-rust-cbindgen-0.27.0.drv",["out…
→ /nix/store/r0dzbar9b3q3pq72ywffq4w50q8zsxww-rust-cbindgen-0.27.0.drv
$ nix derivation show nixpkgs#mesa | grep rust-cbindgen
"nativeBuildInputs": "/nix/store/idhgl5z435l1hid29af4hkp8v952w8v3-meson-1.5.1 /nix/store/02vzklfgfpaf457rq927fq3jj5hn133f-pkg-config-wrapper-0.29.2 /nix/store/m0g218hn4rbq2wj7szzg8a112alq1qvc-ninja-1.12.1 /nix/store/snk7p4lim2snqiy9339ghij0km41n46k-intltool-0.51.0 /nix/store/za1x44ayl8x3dga0ampj1prqsdnq2yxd-bison-3.8.2 /nix/store/9z7zqgsw0lcn79rdvmak680sjzi5pyzf-flex-2.6.4 /nix/store/xvsyiva0lnb60m6hihazkc11gdjgfy8i-file-5.45-dev /nix/store/h3i0acpmr8mrjx07519xxmidv8mpax4y-python3-3.12.5 /nix/store/zxl97260xfw4pd13jrnkaghkalbin3y5-python3.12-packaging-24.1 /nix/store/f4kd84nwjrac6sbkgb3w8q2jmfdnq9vn-python3.12-pycparser-2.22 /nix/store/77nakwgzax6xlj20zxx7i41lldlzkfsg-python3.12-mako-1.3.5 /nix/store/wxf86z24p2pk1vzrsj3051nal0d3mhf9-python3.12-ply-3.11 /nix/store/84b7b30qi2v9x63pqda03z0z1yfdgq0p-python3.12-pyyaml-6.0.2 /nix/store/rxj2fhgd3rh9fxcmwncvdza3sfylmgw1-jdupes-1.28.0 /nix/store/5q83mzmq7ifjahdf7wc8d51xggfcmsx4-glslang-14.3.0-bin /nix/store/n4nnqpcaxk621i8lwr86116fv5kfy3jl-rustc-wrapper-1.80.1 /nix/store/g637s3hvjgvm4xnypqg0ynr7xwxp1r62-rust-bindgen-0.69.4 /nix/store/sssc67hl67w7vhfx0l383b81vv58mk7b-rust-cbindgen-0.27.0 /nix/store/fhq35yg47i18i1zz8j7az904823r6cxr-rust-bindgen-hook /nix/store/0m1ggm1y9dj8r9cp4jd52k0k96rfinfp-wayland-scanner-1.23.1-dev /nix/store/xicrk4waf3kazyf96aaavsirgx241r0s-separate-debug-info.sh",
"/nix/store/r0dzbar9b3q3pq72ywffq4w50q8zsxww-rust-cbindgen-0.27.0.drv": {ofborg reports:
Update:
|
currently fails with:
```
error: builder for '/nix/store/7g13ladvphijvrhswzl6zdwx373ks6ac-rust-cbindgen-0.27.0.drv' failed with exit code 101;
last 25 log lines:
> left: ["release", "x86_64-unknown-linux-gnu"]
> right: ["release"]
> note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
>
> ---- bin_explicit_debug_build stdout ----
> thread 'bin_explicit_debug_build' panicked at tests/profile.rs:93:5:
> assertion `left == right` failed
> left: ["debug", "x86_64-unknown-linux-gnu"]
> right: ["debug"]
>
> ---- bin_default_uses_debug_build stdout ----
> thread 'bin_default_uses_debug_build' panicked at tests/profile.rs:87:5:
> assertion `left == right` failed
> left: ["debug", "x86_64-unknown-linux-gnu"]
> right: ["debug"]
>
>
> failures:
> bin_default_uses_debug_build
> bin_explicit_debug_build
> bin_explicit_release_build
>
> test result: FAILED. 0 passed; 3 failed; 0 ignored; 0 measured; 3 filtered out; finished in 0.42s
>
> error: test failed, to rerun pass `--test profile`
For full logs, run 'nix log /nix/store/7g13ladvphijvrhswzl6zdwx373ks6ac-rust-cbindgen-0.27.0.drv'.
````
Related to: NixOS#348031
... specifically, it's the `CARGO_BUILD_TARGET` env var introduced in commit: 683f97e
889d65f to
4b856fd
Compare
|
Since we already have a working patch (pending upstream), I think it would be better to vendor it (instead of disabling all the tests as is currently implemented in #348935). The patch is small and straightforward so it should be okay. What do you think? cc @alyssais @fabianhjr I have rebased this PR with the vendored patch on top of #348935. |
emilazy
left a comment
There was a problem hiding this comment.
I’m okay with the patch; even if upstream wants changes it’s “only” tests that we’re not running without them anyway. Thanks!
|
There is no cache available yet so I cannot test this on top of |
|
Don’t worry, something always blows up. |
... specifically, it's the
CARGO_BUILD_TARGETenv var introduced in commit: 683f97e. See: #298108.Targeted
masterbut tested against a cherry-picked 683f97e (which is currentlystaging).Upstream PR is linked in the code; not linking here to avoid excessive notifications to upstream.
cc @trofi for testing 🚀
Things done
nix.conf? (See Nix manual)sandbox = relaxedsandbox = truenix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)Add a 👍 reaction to pull requests you find important.