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. |
There was a problem hiding this comment.
Might be worth adding my comment from Clippy's derivation here, or just reference it.
There was a problem hiding this comment.
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.
winterqt
left a comment
There was a problem hiding this comment.
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. |
|
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 = trueset 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/)