Skip to content

rust: support structuredAttrs in setup hooks#340862

Merged
emilazy merged 3 commits intoNixOS:stagingfrom
wolfgangwalther:structured-attrs-setup-hooks-rust
Sep 10, 2024
Merged

rust: support structuredAttrs in setup hooks#340862
emilazy merged 3 commits intoNixOS:stagingfrom
wolfgangwalther:structured-attrs-setup-hooks-rust

Conversation

@wolfgangwalther
Copy link
Contributor

Description of changes

Follow up to #318614 to support structuredAttrs in rust's setup hooks. The changes in those hooks are a bit bigger, so I split them into a separate PR.

Same as before: For each hook, I built a package (mentioned in the commit message) with and without structuredAttrs turned on. Those would fail with structuredAttrs on master, but succeed with structuredAttrs after this PR.

CC @emilazy @philiptaron @tie

Since the changed setup hooks won't trigger ofborg to mention the maintainers: @NixOS/rust

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.11 Release Notes (or backporting 23.11 and 24.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

This is required to test rust-analyzer with structuredAttrs turned on
once the cargo setup hooks support it.
@github-actions github-actions bot added the 6.topic: rust General-purpose programming language emphasizing performance, type safety, and concurrency. label Sep 9, 2024
@ofborg ofborg bot requested a review from oxalica September 9, 2024 22:06
@ofborg ofborg bot added 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 5001+ This PR causes many rebuilds on Darwin and must target the staging branches. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 5001+ This PR causes many rebuilds on Linux and must target the staging branches. labels Sep 9, 2024
Tested the following packages with and without structuredAttrs:
- rust-analyzer: cargo-build-hook, cargo-check-hook
- jujutsu: cargo-nextest-hook
- kornia-rs: maturin-build-hook
@wolfgangwalther wolfgangwalther force-pushed the structured-attrs-setup-hooks-rust branch from 7b9f6ca to d5013e9 Compare September 10, 2024 06:32
Copy link
Member

@emilazy emilazy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you so much 🥲 When doing #339702, before I fixed the SSH signing tests, I had a terribly hard time trying to figure out how to get it to pass cargo nextest run --filterset "not 'test(#test_ssh_signing::*)'" and eventually gave up and changed the syntax to !test(test_ssh_signing::).

@emilazy emilazy requested a review from alyssais September 10, 2024 14:31
@alyssais alyssais removed their request for review September 10, 2024 14:57
Copy link
Contributor

@philiptaron philiptaron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great and runs great as always, @wolfgangwalther. Thanks for your contributions.

@emilazy emilazy merged commit bf5f0b6 into NixOS:staging Sep 10, 2024
@philiptaron philiptaron mentioned this pull request Sep 10, 2024
13 tasks
@wolfgangwalther wolfgangwalther deleted the structured-attrs-setup-hooks-rust branch September 11, 2024 17:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: rust General-purpose programming language emphasizing performance, type safety, and concurrency. 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 5001+ This PR causes many rebuilds on Darwin and must target the staging branches. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 5001+ This PR causes many rebuilds on Linux and must target the staging branches.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants