Skip to content

Convert rustfmt from a submodule to a subtree#82208

Merged
bors merged 4926 commits into
rust-lang:masterfrom
jyn514:rustfmt-subtree
May 15, 2021
Merged

Convert rustfmt from a submodule to a subtree#82208
bors merged 4926 commits into
rust-lang:masterfrom
jyn514:rustfmt-subtree

Conversation

@jyn514

@jyn514 jyn514 commented Feb 17, 2021

Copy link
Copy Markdown
Member

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 (creader: Host crate loaded twice produces different CrateNums if host != target #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.

rchaser53 and others added 30 commits October 4, 2019 11:25
…nt-prefix

add static support for raw prefix identifiers
@Mark-Simulacrum

Copy link
Copy Markdown
Member

Going to temporarily close this - it seems to be causing some trouble on bors, which is stalling out builds for other PRs. I will reopen and investigate in more detail tomorrow, but don't want to stall the queue overnight (for me).

@RalfJung

Copy link
Copy Markdown
Member

Let's see if we can reopen now without harm. Also to be sure:
@bors r-

@RalfJung RalfJung reopened this May 15, 2021
@RalfJung

Copy link
Copy Markdown
Member

Can this be r+'d again? Looks like the merge conflict was resolved?

@Mark-Simulacrum

Copy link
Copy Markdown
Member

We can try. @bors r+ rollup=never

@bors

bors commented May 15, 2021

Copy link
Copy Markdown
Collaborator

📌 Commit 34368ec has been approved by Mark-Simulacrum

@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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels May 15, 2021
@bors

bors commented May 15, 2021

Copy link
Copy Markdown
Collaborator

⌛ Testing commit 34368ec with merge eac3c7c...

@bors

bors commented May 15, 2021

Copy link
Copy Markdown
Collaborator

☀️ Test successful - checks-actions
Approved by: Mark-Simulacrum
Pushing eac3c7c to master...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. T-rustfmt Relevant to the rustfmt team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

rustfmt no longer builds after rust-lang/rust#83813 Changing rustfmt from submod to subtree