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

x.py check doesn't allow checking tools other than clippy and rustdoc #80639

Closed
jyn514 opened this issue Jan 3, 2021 · 1 comment
Closed
Labels
A-contributor-roadblock Area: Makes things more difficult for new contributors to rust itself C-bug Category: This is a bug. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Comments

@jyn514
Copy link
Member

jyn514 commented Jan 3, 2021

I tried this code:

x.py check src/tools/rustfmt

I expected to see this happen: x.py checks rustfmt

Instead, this happened:

thread 'main' panicked at 'error: no rules matched src/tools/rustfmt', src/bootstrap/builder.rs:225:17

Note I am not asking for the default x.py check to be changed at all, just for it to be possible to check rustfmt in-tree. Right now you have to use x.py build --stage 1 src/tools/rustfmt which compiles the compiler 3 times (two of them unnecessarily - rustfmt uses rustc_ap_*, not the compiler in-tree).

Meta

HEAD is currently 18d855b.

@jyn514 jyn514 added T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) C-bug Category: This is a bug. A-contributor-roadblock Area: Makes things more difficult for new contributors to rust itself labels Jan 3, 2021
JohnTitor added a commit to JohnTitor/rust that referenced this issue May 11, 2021
Allow checking miri and RLS with `x.py check src/tools/{miri,rls}`

Helps with rust-lang#80639.

`@Xanewok` would you find this useful for RLS too?
bors added a commit to rust-lang-ci/rust that referenced this issue May 15, 2021
…crum

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 (rust-lang#56935). The regression is that this rebuilds dependencies more often than strictly necessary. See the commit for details.

Fixes rust-lang#85226 (permanently). Closes rust-lang#82385. Helps with rust-lang#70651. Helps with rust-lang#80639.
@jyn514
Copy link
Member Author

jyn514 commented Oct 11, 2021

Fixed in #82208 and #85051.

@jyn514 jyn514 closed this as completed Oct 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-contributor-roadblock Area: Makes things more difficult for new contributors to rust itself C-bug Category: This is a bug. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

No branches or pull requests

1 participant