Skip to content
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

Add a mach command to run rustfmt #21374

Closed
jdm opened this issue Aug 9, 2018 · 3 comments
Closed

Add a mach command to run rustfmt #21374

jdm opened this issue Aug 9, 2018 · 3 comments

Comments

@jdm
Copy link
Member

@jdm jdm commented Aug 9, 2018

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.py which runs cargo fmt on a directory provided as a command argument. We will also need to add the rustfmt preview to the pinned Rust toolchain that Servo uses (via rustup component add rustfmt-preview --toolchain [...]) (docs).

Looks for uses of rustup in other files like python/servo/build_commands.rs for the recommended way to use our pinned toolchain.

@highfive
Copy link

@highfive highfive commented Aug 9, 2018

Hi! If you have any questions regarding this issue, feel free to make a comment here, or ask it in the #servo channel in IRC.

If you intend to work on this issue, then add @highfive: assign me to your comment, and I'll assign this to you. 😄

@JoshBrudnak
Copy link
Contributor

@JoshBrudnak JoshBrudnak commented Aug 10, 2018

Hi, I would like to work on this issue, @highfive: assign me

@highfive
Copy link

@highfive highfive commented Aug 10, 2018

Hey @JoshBrudnak! Thanks for your interest in working on this issue. It's now assigned to you!

@highfive highfive added the C-assigned label Aug 10, 2018
@JoshBrudnak JoshBrudnak mentioned this issue Aug 10, 2018
4 of 5 tasks complete
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 -->
@kingdido999 kingdido999 mentioned this issue Aug 11, 2018
53 of 53 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

3 participants
You can’t perform that action at this time.