Skip to content
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

rust: support structuredAttrs in setup hooks #340862

Merged

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.
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
24 of 26 checks passed
@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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants