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

Document RUSTFMT environment variable #8767

Merged
merged 2 commits into from
Oct 13, 2020
Merged

Document RUSTFMT environment variable #8767

merged 2 commits into from
Oct 13, 2020

Conversation

MonliH
Copy link
Contributor

@MonliH MonliH commented Oct 10, 2020

This PR documents the RUSTFMT enviorment variable, as specified in rust-lang/rustfmt/4426 and rust-lang/rustfmt/4419.

@rust-highfive
Copy link

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @ehuss (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 10, 2020
@ehuss
Copy link
Contributor

ehuss commented Oct 10, 2020

Thanks for the PR! I'm a little uncertain about how to document this, since cargo-fmt is an external tool. We generally don't document those in the Cargo book. I think an exception could probably be made here, but maybe the text could be tweaked to make it clearer that this is for a different tool? Perhaps instead of saying Cargo will execute, it could be something like [`cargo fmt`](https://github.com/rust-lang/rustfmt) will execute?

@MonliH
Copy link
Contributor Author

MonliH commented Oct 10, 2020

I'm a little uncertain about how to document this, since cargo-fmt is an external tool. We generally don't document those in the Cargo book. I think an exception could probably be made here

Yeah, rustdoc has something similar (RUSTDOC env var), which is also documented here. I understand rustdoc actually lives in the rustc repo, but I think rustfmt is an agreed-upon standard tool that it's worth documenting here.

Perhaps instead of saying Cargo will execute, it could be something like cargo fmt will execute?

I agree with you here, it's more clear this way. Perhaps even "rustfmt will execute"?

@calebcartwright
Copy link
Member

Perhaps even "rustfmt will execute"?

The var is controlling which rustfmt will be invoked by cargo fmt (rustfmt isn't running itself), so I'd echo @ehuss's suggested text using cargo fmt instead of Cargo

@ehuss
Copy link
Contributor

ehuss commented Oct 13, 2020

Thanks!
@bors r+

@bors
Copy link
Contributor

bors commented Oct 13, 2020

📌 Commit f6abaa6 has been approved by ehuss

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 13, 2020
@bors
Copy link
Contributor

bors commented Oct 13, 2020

⌛ Testing commit f6abaa6 with merge 0e37d515bb440472c368117a67586c1633dff298...

@bors
Copy link
Contributor

bors commented Oct 13, 2020

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Oct 13, 2020
@ehuss
Copy link
Contributor

ehuss commented Oct 13, 2020

@bors retry

E: Failed to fetch https://packages.microsoft.com/ubuntu/18.04/prod/dists/bionic/main/binary-amd64/Packages.bz2 File has unexpected size (139863 != 139695). Mirror sync in progress? [IP: 40.117.131.251 443]

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 13, 2020
@bors
Copy link
Contributor

bors commented Oct 13, 2020

⌛ Testing commit f6abaa6 with merge 31e1f1f...

@bors
Copy link
Contributor

bors commented Oct 13, 2020

☀️ Test successful - checks-actions
Approved by: ehuss
Pushing 31e1f1f to master...

@bors bors merged commit 31e1f1f into rust-lang:master Oct 13, 2020
bors added a commit to rust-lang-ci/rust that referenced this pull request Oct 15, 2020
Update cargo

11 commits in 9d1a4863abd9237dbf9d1b74c78632b6a205f6bb..12db56cdedbc2c26a9aa18f994c0188cdcc67df5
2020-10-05 18:29:52 +0000 to 2020-10-14 23:07:45 +0000
- Reinstate CARGO_PRIMARY_PACKAGE (take 2) (rust-lang/cargo#8758)
- Add actionable help message for --features (rust-lang/cargo#8773)
- Fix panic in `cargo doc` with -Zfeatures=itarget (rust-lang/cargo#8777)
- Update git2. (rust-lang/cargo#8778)
- Document RUSTFMT environment variable (rust-lang/cargo#8767)
- Update crossbeam-utils requirement from 0.7 to 0.8 (rust-lang/cargo#8769)
- Update toml dependency (rust-lang/cargo#8772)
- Mark proc-macro crates (rust-lang/cargo#8765)
- cargo-tree: mention special target `all` in CLI help text (rust-lang/cargo#8766)
- Bump to 0.50.0, update changelog (rust-lang/cargo#8764)
- Update deprecated GitHub add-path in workflows. (rust-lang/cargo#8760)
@ehuss ehuss added this to the 1.49.0 milestone Feb 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants