Fix ./x fix compiler and allow --allow-dirty - #160417
Conversation
|
This PR modifies If appropriate, please update |
|
rustbot has assigned @Mark-Simulacrum. Use Why was this reviewer chosen?The reviewer was selected based on:
|
This comment has been minimized.
This comment has been minimized.
| ); | ||
|
|
||
| std_cargo(builder, target, &mut cargo, &self.crates); | ||
| if matches!(builder.config.cmd, Subcommand::Fix) { |
There was a problem hiding this comment.
Here I would have had to update the match to Subcommand::Fix { .. }, but I instead changed it to check builder.kind == Kind::Fix to bring it in line with other uses of builder.kind in this function.
This comment has been minimized.
This comment has been minimized.
|
The But it's a bit alarming to see this assertion fail for unclear reasons. Ah, bootstrap. |
|
Though actually ... if this |
The old code was accidentally replacing the `fix` subcommand with `check`.
This was already possible via `./x fix -- --allow-dirty`, but forwarding the argument from bootstrap is more user-friendly.
|
For now, let's remove the assertions and see if anything else breaks. |
|
Ok yeah the assert is actually a good idea. We want to run the compiler in check mode when you run clippy on rustc_private tools, to generate the .rmeta files. I think that the right solution is moving the kind to |
|
Hmm yeah, when |
|
The job Click to see the possible cause of the failure (guessed by this bot) |
|
Need to figure out what to do about the clippy problem. @rustbot author |
bootstrap: Store and use an explicit CheckKind in `check::Rustc` rust-lang#160417 tried to fix `./x fix compiler` by making the `check::Rustc` step properly use `builder.kind` instead of hardcoding `Kind::Check`. However, that ended up breaking `./x clippy`, which was relying on that hardcoded `Kind::Check` to really invoke `cargo check`. This PR therefore adds an explicit CheckKind to individual instances of `check::Rustc`, allowing command-line invocations to perform a `cargo check` or `cargo fix` as appropriate, without breaking other callers that were relying on the hardcoded `cargo check`. As a result, `./x fix compiler` now works. r? Kobzol (or bootstrap)
bootstrap: Store and use an explicit CheckKind in `check::Rustc` rust-lang#160417 tried to fix `./x fix compiler` by making the `check::Rustc` step properly use `builder.kind` instead of hardcoding `Kind::Check`. However, that ended up breaking `./x clippy`, which was relying on that hardcoded `Kind::Check` to really invoke `cargo check`. This PR therefore adds an explicit CheckKind to individual instances of `check::Rustc`, allowing command-line invocations to perform a `cargo check` or `cargo fix` as appropriate, without breaking other callers that were relying on the hardcoded `cargo check`. As a result, `./x fix compiler` now works. r? Kobzol (or bootstrap)
bootstrap: Store and use an explicit CheckKind in `check::Rustc` rust-lang#160417 tried to fix `./x fix compiler` by making the `check::Rustc` step properly use `builder.kind` instead of hardcoding `Kind::Check`. However, that ended up breaking `./x clippy`, which was relying on that hardcoded `Kind::Check` to really invoke `cargo check`. This PR therefore adds an explicit CheckKind to individual instances of `check::Rustc`, allowing command-line invocations to perform a `cargo check` or `cargo fix` as appropriate, without breaking other callers that were relying on the hardcoded `cargo check`. As a result, `./x fix compiler` now works. r? Kobzol (or bootstrap)
bootstrap: Store and use an explicit CheckKind in `check::Rustc` rust-lang#160417 tried to fix `./x fix compiler` by making the `check::Rustc` step properly use `builder.kind` instead of hardcoding `Kind::Check`. However, that ended up breaking `./x clippy`, which was relying on that hardcoded `Kind::Check` to really invoke `cargo check`. This PR therefore adds an explicit CheckKind to individual instances of `check::Rustc`, allowing command-line invocations to perform a `cargo check` or `cargo fix` as appropriate, without breaking other callers that were relying on the hardcoded `cargo check`. As a result, `./x fix compiler` now works. r? Kobzol (or bootstrap)
bootstrap: Store and use an explicit CheckKind in `check::Rustc` rust-lang#160417 tried to fix `./x fix compiler` by making the `check::Rustc` step properly use `builder.kind` instead of hardcoding `Kind::Check`. However, that ended up breaking `./x clippy`, which was relying on that hardcoded `Kind::Check` to really invoke `cargo check`. This PR therefore adds an explicit CheckKind to individual instances of `check::Rustc`, allowing command-line invocations to perform a `cargo check` or `cargo fix` as appropriate, without breaking other callers that were relying on the hardcoded `cargo check`. As a result, `./x fix compiler` now works. r? Kobzol (or bootstrap)
bootstrap: Store and use an explicit CheckKind in `check::Rustc` rust-lang#160417 tried to fix `./x fix compiler` by making the `check::Rustc` step properly use `builder.kind` instead of hardcoding `Kind::Check`. However, that ended up breaking `./x clippy`, which was relying on that hardcoded `Kind::Check` to really invoke `cargo check`. This PR therefore adds an explicit CheckKind to individual instances of `check::Rustc`, allowing command-line invocations to perform a `cargo check` or `cargo fix` as appropriate, without breaking other callers that were relying on the hardcoded `cargo check`. As a result, `./x fix compiler` now works. r? Kobzol (or bootstrap)
bootstrap: Store and use an explicit CheckKind in `check::Rustc` rust-lang#160417 tried to fix `./x fix compiler` by making the `check::Rustc` step properly use `builder.kind` instead of hardcoding `Kind::Check`. However, that ended up breaking `./x clippy`, which was relying on that hardcoded `Kind::Check` to really invoke `cargo check`. This PR therefore adds an explicit CheckKind to individual instances of `check::Rustc`, allowing command-line invocations to perform a `cargo check` or `cargo fix` as appropriate, without breaking other callers that were relying on the hardcoded `cargo check`. As a result, `./x fix compiler` now works. r? Kobzol (or bootstrap)
bootstrap: Store and use an explicit CheckKind in `check::Rustc` rust-lang#160417 tried to fix `./x fix compiler` by making the `check::Rustc` step properly use `builder.kind` instead of hardcoding `Kind::Check`. However, that ended up breaking `./x clippy`, which was relying on that hardcoded `Kind::Check` to really invoke `cargo check`. This PR therefore adds an explicit CheckKind to individual instances of `check::Rustc`, allowing command-line invocations to perform a `cargo check` or `cargo fix` as appropriate, without breaking other callers that were relying on the hardcoded `cargo check`. As a result, `./x fix compiler` now works. r? Kobzol (or bootstrap)
|
☔ The latest upstream changes (presumably #160725) made this pull request unmergeable. Please resolve the merge conflicts by rebasing. |
Rollup merge of #160606 - Zalathar:check-kind, r=Kobzol bootstrap: Store and use an explicit CheckKind in `check::Rustc` #160417 tried to fix `./x fix compiler` by making the `check::Rustc` step properly use `builder.kind` instead of hardcoding `Kind::Check`. However, that ended up breaking `./x clippy`, which was relying on that hardcoded `Kind::Check` to really invoke `cargo check`. This PR therefore adds an explicit CheckKind to individual instances of `check::Rustc`, allowing command-line invocations to perform a `cargo check` or `cargo fix` as appropriate, without breaking other callers that were relying on the hardcoded `cargo check`. As a result, `./x fix compiler` now works. r? Kobzol (or bootstrap)
bootstrap: Store and use an explicit CheckKind in `check::Rustc` rust-lang/rust#160417 tried to fix `./x fix compiler` by making the `check::Rustc` step properly use `builder.kind` instead of hardcoding `Kind::Check`. However, that ended up breaking `./x clippy`, which was relying on that hardcoded `Kind::Check` to really invoke `cargo check`. This PR therefore adds an explicit CheckKind to individual instances of `check::Rustc`, allowing command-line invocations to perform a `cargo check` or `cargo fix` as appropriate, without breaking other callers that were relying on the hardcoded `cargo check`. As a result, `./x fix compiler` now works. r? Kobzol (or bootstrap)
This PR makes
./x fix compileractually runcargo fixon compiler crates, instead of accidentally runningcargo check.Also, we now forward
--allow-dirtyfrom bootstrap to cargo, making./x fixmore convenient in general.