Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upAdd a mach command to run rustfmt #21374
Closed
Labels
Comments
|
Hi! If you have any questions regarding this issue, feel free to make a comment here, or ask it in the If you intend to work on this issue, then add |
|
Hi, I would like to work on this issue, @highfive: assign me |
|
Hey @JoshBrudnak! Thanks for your interest in working on this issue. It's now assigned to you! |
bors-servo
added a commit
that referenced
this issue
Aug 10, 2018
Add rustfmt command to devenv commands Added the rustfmt command to devenv commands which runs cargo fmt on a specified directory. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #21374 <!-- Either: --> - [ ] There are tests for these changes OR - [X] These changes do not require tests because they only included a simple command that was added to the devenv_commands python script. <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/21376) <!-- Reviewable:end -->
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To make it easy to accomplish #21373, we need to make it easy to run the version of rustfmt that is part of the pinned version of rustc that Servo's build system uses. I propose a new rustfmt command added to
python/servo/devenv_commands.pywhich runscargo fmton a directory provided as a command argument. We will also need to add the rustfmt preview to the pinned Rust toolchain that Servo uses (viarustup component add rustfmt-preview --toolchain [...]) (docs).Looks for uses of rustup in other files like
python/servo/build_commands.rsfor the recommended way to use our pinned toolchain.