-
-
Notifications
You must be signed in to change notification settings - Fork 14.4k
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
rustfmt: fix on darwin #231078
rustfmt: fix on darwin #231078
Conversation
The editorconfig check is failing, I can't find the error message in the web UI. I tried reproducing the failure locally but it doesn't seem to complain:
|
Blame GitHub -- I re-ran it, and it passed. |
@@ -15,6 +15,11 @@ rustPlatform.buildRustPackage rec { | |||
rustPlatform.rust.rustc.llvm | |||
] ++ lib.optional stdenv.isDarwin Security; | |||
|
|||
preFixup = lib.optionalString stdenv.isDarwin '' |
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.
Might be worth adding my comment from Clippy's derivation here, or just reference it.
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.
I agree that it should be commented. I was unsure on what was the best way to do so. I've copied the comment verbatim.
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.
Commit message needs to be in proper form, e.g. rustfmt: fix on darwin
.
I'd also argue that the commit message can be shortened significantly, as we already explain why this workaround is needed in the Clippy derivation/commits, but maybe I'm nitpicking too much :) |
469544f
to
580f3f3
Compare
Thanks for the swift review. I've updated the commit header line as requested and removed some of the specific details of the commit message. Let me know what you think |
Reading this [rust-issue] it seems that we have to link against rustc_driver. The [clippy.nix] expression already does something similar Of the 4 executables found in the result of building rustfmt only rustfmt and git-rustfmt needed to be linked. The other worked without linking to rustc_driver. [rust-issue]: rust-lang/rust#105609 [clippy.nix]: https://github.com/NixOS/nixpkgs/blob/c8cf570dae9b41f30395b71f9b432418b4ff0ebc/pkgs/development/compilers/rust/clippy.nix#L27-L36
580f3f3
to
4e00120
Compare
Just changed the commit message to remove the extraneous Darwin mention. |
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.
Tested, thanks!
Skipping OfBorg because I've already tested this extensively, and it seems to be very backed up right now. |
Description of changes
Without this patch rustfmt installs successfully but upon running it it throws the following error
Reading this rust-issue it seems that we have to link against rustc_driver. The clippy.nix expression already does something similar
Of the 4 executables found in the result of building rustfmt only rustfmt and git-rustfmt needed to be linked. The other worked without linking to rustc_driver.
Things done
sandbox = true
set innix.conf
? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)