-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #82208 - jyn514:rustfmt-subtree, r=Mark-Simulacrum
Convert rustfmt from a submodule to a subtree r? `@calebcartwright` cc `@Manishearth` `@Mark-Simulacrum` The motivation is that submodule updates cause rustfmt to not be available on nightly a lot; most recently it was unavailable for over 10 days, causing the beta release to be delayed. Additionally this is much less work on the part of the rustfmt maintainers to keep the rustfmt compiling, since now people making breaking changes will be responsible for fixing them. I kept the rustfmt git history so it looks like there are thousands of commits. The important commits are https://github.com/rust-lang/rust/compare/851dee3af9404bf399c3c4ffefe5105edb3debad~..pull/82208/head. This adds about 10 MB of git history, which is not terribly much compared to the 702 MB that already exist. - Add `src/tools/rustfmt` to `x.py check` - Fix CRLF issues with rustfmt tests (see commit for details) - Use `rustc_private` instead of crates.io dependencies This was already switched upstream and would have landed in the next submodule bump anyway. This just updates Cargo.lock for rust-lang/rust. - Add `yansi-term` to the list of allowed dependencies. This is a false positive - rustc doesn't actually use it, only rustfmt, but because it's activated by the cargo feature of a dependency, tidy gets confused. It's fairly innocuous in any case, it's used for color printing. This would have happened in the next submodule bump. - Remove rustfmt from the list of toolstate tools. - Give a hard error if testing or building rustfmt fails. - Update log to 0.4.14 This avoids a warning about semicolons in macros; see the commit for details. - Don't add tools to the sysroot when they finish building. This is the only change that could be considered a regression - this avoids a "colliding StableCrateId" error due to a bug in resolve (#56935). The regression is that this rebuilds dependencies more often than strictly necessary. See the commit for details. Fixes #85226 (permanently). Closes #82385. Helps with #70651. Helps with #80639.
- Loading branch information
Showing
1,276 changed files
with
78,110 additions
and
37 deletions.
There are no files selected for viewing
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 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 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 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 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 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 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 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 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 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
Submodule rustfmt
deleted from
2a3635
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
indent_size = 2 | ||
indent_style = space | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false | ||
|
||
[*.rs] | ||
indent_size = 4 | ||
|
||
[tests/**/*.rs] | ||
charset = utf-8 | ||
end_of_line = unset | ||
indent_size = unset | ||
indent_style = unset | ||
trim_trailing_whitespace = unset | ||
insert_final_newline = unset | ||
|
||
[appveyor.yml] | ||
end_of_line = unset |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
* text=auto eol=lf | ||
tests/source/issue-3494/crlf.rs -text | ||
tests/source/comment_crlf_newline.rs -text | ||
tests/source/configs/enum_discrim_align_threshold/40.rs -text | ||
tests/target/issue-3494/crlf.rs -text | ||
tests/target/comment_crlf_newline.rs -text | ||
tests/target/configs/enum_discrim_align_threshold/40.rs -text |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
name: integration | ||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
|
||
jobs: | ||
integration-tests: | ||
runs-on: ubuntu-latest | ||
name: ${{ matrix.integration }} | ||
strategy: | ||
# https://help.github.com/en/actions/getting-started-with-github-actions/about-github-actions#usage-limits | ||
# There's a limit of 60 concurrent jobs across all repos in the rust-lang organization. | ||
# In order to prevent overusing too much of that 60 limit, we throttle the | ||
# number of rustfmt jobs that will run concurrently. | ||
max-parallel: 4 | ||
fail-fast: false | ||
matrix: | ||
integration: [ | ||
bitflags, | ||
error-chain, | ||
log, | ||
mdbook, | ||
packed_simd, | ||
rust-semverver, | ||
tempdir, | ||
futures-rs, | ||
rust-clippy, | ||
failure, | ||
] | ||
include: | ||
# Allowed Failures | ||
# Actions doesn't yet support explicitly marking matrix legs as allowed failures | ||
# https://github.community/t5/GitHub-Actions/continue-on-error-allow-failure-UI-indication/td-p/37033 | ||
# https://github.community/t5/GitHub-Actions/Why-a-matrix-step-will-be-canceled-if-another-one-failed/td-p/30920 | ||
# Instead, leverage `continue-on-error` | ||
# https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idstepscontinue-on-error | ||
# | ||
# Failing due to breaking changes in rustfmt 2.0 where empty | ||
# match blocks have trailing commas removed | ||
# https://github.com/rust-lang/rustfmt/pull/4226 | ||
- integration: chalk | ||
allow-failure: true | ||
- integration: crater | ||
allow-failure: true | ||
- integration: glob | ||
allow-failure: true | ||
- integration: stdsimd | ||
allow-failure: true | ||
# Using old rustfmt configuration option | ||
- integration: rand | ||
allow-failure: true | ||
# Keep this as an allowed failure as it's fragile to breaking changes of rustc. | ||
- integration: rust-clippy | ||
allow-failure: true | ||
# Using old rustfmt configuration option | ||
- integration: packed_simd | ||
allow-failure: true | ||
# calebcartwright (2019-12-24) | ||
# Keeping this as an allowed failure since it was flagged as such in the TravisCI config, even though | ||
# it appears to have been passing for quite some time. | ||
# Original comment was: temporal build failure due to breaking changes in the nightly compiler | ||
- integration: rust-semverver | ||
allow-failure: true | ||
# Can be moved back to include section after https://github.com/rust-lang-nursery/failure/pull/298 is merged | ||
- integration: failure | ||
allow-failure: true | ||
|
||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v2 | ||
|
||
# Run build | ||
- name: install rustup | ||
run: | | ||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > rustup-init.sh | ||
sh rustup-init.sh -y --default-toolchain none | ||
- name: run integration tests | ||
env: | ||
INTEGRATION: ${{ matrix.integration }} | ||
TARGET: x86_64-unknown-linux-gnu | ||
run: ./ci/integration.sh | ||
continue-on-error: ${{ matrix.allow-failure == true }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: linux | ||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
name: (${{ matrix.target }}, nightly) | ||
strategy: | ||
# https://help.github.com/en/actions/getting-started-with-github-actions/about-github-actions#usage-limits | ||
# There's a limit of 60 concurrent jobs across all repos in the rust-lang organization. | ||
# In order to prevent overusing too much of that 60 limit, we throttle the | ||
# number of rustfmt jobs that will run concurrently. | ||
max-parallel: 1 | ||
fail-fast: false | ||
matrix: | ||
target: [ | ||
x86_64-unknown-linux-gnu, | ||
] | ||
|
||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v2 | ||
|
||
# Run build | ||
- name: install rustup | ||
run: | | ||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > rustup-init.sh | ||
sh rustup-init.sh -y --default-toolchain none | ||
rustup target add ${{ matrix.target }} | ||
- name: build | ||
run: | | ||
rustc -Vv | ||
cargo -V | ||
cargo build | ||
- name: test | ||
run: cargo test |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: mac | ||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
|
||
jobs: | ||
test: | ||
# https://help.github.com/en/actions/automating-your-workflow-with-github-actions/virtual-environments-for-github-hosted-runners#supported-runners-and-hardware-resources | ||
# macOS Catalina 10.15 | ||
runs-on: macos-latest | ||
name: (${{ matrix.target }}, nightly) | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
target: [ | ||
x86_64-apple-darwin, | ||
] | ||
|
||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v2 | ||
|
||
# Run build | ||
- name: install rustup | ||
run: | | ||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > rustup-init.sh | ||
sh rustup-init.sh -y --default-toolchain none | ||
rustup target add ${{ matrix.target }} | ||
- name: build | ||
run: | | ||
rustc -Vv | ||
cargo -V | ||
cargo build | ||
- name: test | ||
run: cargo test |
Oops, something went wrong.