-
Notifications
You must be signed in to change notification settings - Fork 911
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
Move rustfmt binariy crates to workspace #4002
Conversation
@@ -4,3 +4,5 @@ version = "0.1.0" | |||
authors = ["rustfmt devs <[email protected]>"] | |||
|
|||
[dependencies] | |||
|
|||
[workspace] |
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.
Now that these files are under the workspace, we need to exclude them from the workspace.
categories = ["development-tools"] | ||
edition = "2018" | ||
|
||
[[bin]] | ||
name = "rustfmt" | ||
path = "src/bin/main.rs" | ||
path = "rustfmt-core/rustfmt-bin/src/bin/main.rs" | ||
test = false |
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.
Disabled all the tests in the root package as they will be tested in rustfmt-core.
63c7697
to
8ccbacf
Compare
Just the bin names and paths right? |
backport not needed |
After I separated rustfmt into multiple crates, I realized that cargo builds rustfmt-core twice: for rustfmt-core itself and for rustfmt-nightly (the root crate that holds binaries). This duplication is not ideal during development.
The goal of this PR is to mitigate the overhead by moving binaries under the
rustfmt-core
workspace. The root Cargo.toml works as a shim to the actual binary crate, which is necessary for the rustc repository.The downside is that we now need to keep the root Cargo.toml in sync with rustfmt-core/rustfmt-bin/Cargo.toml.