-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Fix formats_source test requiring rustfmt. #10918
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This uses ProcessBuilder which provides much better error information (stdout and stderr). It's also less code, which is a bonus.
@ehuss: no appropriate reviewer found, use r? to override |
rust-highfive
added
the
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
label
Aug 2, 2022
@bors r+ |
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
Aug 2, 2022
bors
added a commit
that referenced
this pull request
Aug 2, 2022
Fix formats_source test requiring rustfmt. The requirements added in #9892 that `rustfmt` must be present doesn't work in the `rust-lang/rust` environment. There are two issues: * Cargo is run without using rustup. If you also have rustup installed, the test will fail because the `rustfmt` binary found in `PATH` will fail to choose a toolchain because HOME points to the sandbox home which does not have a rustup configuration. * rust-lang/rust CI uninstalls rustup, and does not have rustfmt in PATH at all. It is not practical to make rustfmt available there. The solution here is to just revert the behavior back to where it was where it checks if it can run `rustfmt` in the sandbox. This should work for anyone who has a normal rustup installation (including Cargo's CI). If running the testsuite without rustup, then the test will be skipped. This also includes a small enhancement to provide better error information when rustfmt fails.
💔 Test failed - checks-actions |
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
Aug 2, 2022
@bors retry |
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
Aug 2, 2022
☀️ Test successful - checks-actions |
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Aug 3, 2022
Update cargo, rls 14 commits in 85b500ccad8cd0b63995fd94a03ddd4b83f7905b..4fd148c47e733770c537efac5220744945d572ef 2022-07-24 21:10:46 +0000 to 2022-08-03 15:03:52 +0000 - Revert "Drop check for mingw32-make." (rust-lang/cargo#10934) - Add reasons to all ignored tests. (rust-lang/cargo#10929) - Grammar fixup unused patch message (rust-lang/cargo#10933) - Always allow hg to be missing on CI. (rust-lang/cargo#10931) - Fix formats_source test requiring rustfmt. (rust-lang/cargo#10918) - Disable scrape_examples_complex_reverse_dependencies (rust-lang/cargo#10921) - Contrib: Add docs on the rustbot ready command (rust-lang/cargo#10916) - Support for negative --jobs parameter, counting backwards from max CPUs (rust-lang/cargo#10844) - Add requirements to cargo_test. (rust-lang/cargo#9892) - Contrib: Document submodule update process (rust-lang/cargo#10913) - Contrib: Add docs on how to use crater (rust-lang/cargo#10912) - Contrib: Document new-release process (rust-lang/cargo#10914) - Override to resolver=1 in published package (rust-lang/cargo#10911) - fix(add): Update the lock file (rust-lang/cargo#10902) 1 commits in fcf1f94c9ab2acc18cfd4368a4aeb38e77da9649..4d8b0a19986a4daab37287a5b5fe2da0775d1873 2022-07-14 17:19:11 +0200 to 2022-08-02 22:34:34 -0400 - Update cargo (rust-lang/rls#1782)
RalfJung
pushed a commit
to RalfJung/rust-analyzer
that referenced
this pull request
Apr 20, 2024
Update cargo, rls 14 commits in 85b500ccad8cd0b63995fd94a03ddd4b83f7905b..4fd148c47e733770c537efac5220744945d572ef 2022-07-24 21:10:46 +0000 to 2022-08-03 15:03:52 +0000 - Revert "Drop check for mingw32-make." (rust-lang/cargo#10934) - Add reasons to all ignored tests. (rust-lang/cargo#10929) - Grammar fixup unused patch message (rust-lang/cargo#10933) - Always allow hg to be missing on CI. (rust-lang/cargo#10931) - Fix formats_source test requiring rustfmt. (rust-lang/cargo#10918) - Disable scrape_examples_complex_reverse_dependencies (rust-lang/cargo#10921) - Contrib: Add docs on the rustbot ready command (rust-lang/cargo#10916) - Support for negative --jobs parameter, counting backwards from max CPUs (rust-lang/cargo#10844) - Add requirements to cargo_test. (rust-lang/cargo#9892) - Contrib: Document submodule update process (rust-lang/cargo#10913) - Contrib: Add docs on how to use crater (rust-lang/cargo#10912) - Contrib: Document new-release process (rust-lang/cargo#10914) - Override to resolver=1 in published package (rust-lang/cargo#10911) - fix(add): Update the lock file (rust-lang/cargo#10902) 1 commits in fcf1f94c9ab2acc18cfd4368a4aeb38e77da9649..4d8b0a19986a4daab37287a5b5fe2da0775d1873 2022-07-14 17:19:11 +0200 to 2022-08-02 22:34:34 -0400 - Update cargo (rust-lang/rls#1782)
RalfJung
pushed a commit
to RalfJung/rust-analyzer
that referenced
this pull request
Apr 27, 2024
Update cargo, rls 14 commits in 85b500ccad8cd0b63995fd94a03ddd4b83f7905b..4fd148c47e733770c537efac5220744945d572ef 2022-07-24 21:10:46 +0000 to 2022-08-03 15:03:52 +0000 - Revert "Drop check for mingw32-make." (rust-lang/cargo#10934) - Add reasons to all ignored tests. (rust-lang/cargo#10929) - Grammar fixup unused patch message (rust-lang/cargo#10933) - Always allow hg to be missing on CI. (rust-lang/cargo#10931) - Fix formats_source test requiring rustfmt. (rust-lang/cargo#10918) - Disable scrape_examples_complex_reverse_dependencies (rust-lang/cargo#10921) - Contrib: Add docs on the rustbot ready command (rust-lang/cargo#10916) - Support for negative --jobs parameter, counting backwards from max CPUs (rust-lang/cargo#10844) - Add requirements to cargo_test. (rust-lang/cargo#9892) - Contrib: Document submodule update process (rust-lang/cargo#10913) - Contrib: Add docs on how to use crater (rust-lang/cargo#10912) - Contrib: Document new-release process (rust-lang/cargo#10914) - Override to resolver=1 in published package (rust-lang/cargo#10911) - fix(add): Update the lock file (rust-lang/cargo#10902) 1 commits in fcf1f94c9ab2acc18cfd4368a4aeb38e77da9649..4d8b0a19986a4daab37287a5b5fe2da0775d1873 2022-07-14 17:19:11 +0200 to 2022-08-02 22:34:34 -0400 - Update cargo (rust-lang/rls#1782)
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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The requirements added in #9892 that
rustfmt
must be present doesn't work in therust-lang/rust
environment. There are two issues:rustfmt
binary found inPATH
will fail to choose a toolchain because HOME points to the sandbox home which does not have a rustup configuration.The solution here is to just revert the behavior back to where it was where it checks if it can run
rustfmt
in the sandbox. This should work for anyone who has a normal rustup installation (including Cargo's CI). If running the testsuite without rustup, then the test will be skipped.This also includes a small enhancement to provide better error information when rustfmt fails.