-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Distribute Rustfmt #45903
Distribute Rustfmt #45903
Conversation
src/bootstrap/dist.rs
Outdated
// Prepare the image directory | ||
// We expect RLS to build, because we've exited this step above if tool | ||
// state for RLS isn't testing. | ||
let rustfmt = builder.ensure(tool::Rls { |
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.
Shouldn't that be tool::Rustfmt?
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.
yes
src/bootstrap/dist.rs
Outdated
compiler: builder.compiler(stage, build.build), | ||
target | ||
}).expect("Rustfmt to build: toolstate is testing"); | ||
install(&rustfmt, &image.join("bin"), 0o755); |
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.
If I understand correctly, this will only install the rustfmt binary (and not cargo-fmt, for example), is that intentional?
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.
cargo fmt should be implementable as a stable tool with rustfmt distributed with rustup.
src/tools/build-manifest/src/main.rs
Outdated
|
||
if rls_present { | ||
manifest.renames.insert("rls".to_owned(), Rename { to: "rls-preview".to_owned() }); | ||
} | ||
if rustfmt_present { |
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 think we can omit this b/c we didn't have rustfmt
as a package originally, right?
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.
yes
Looks great! |
@alexcrichton updated to address comments |
@bors: r+ |
📌 Commit 97d21e2 has been approved by |
Distribute Rustfmt r? @alexcrichton
☀️ Test successful - status-appveyor, status-travis |
r? @alexcrichton