Skip to content

Fix CLI completion check in tidy #143452

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

Merged
merged 2 commits into from
Jul 5, 2025
Merged

Conversation

Kobzol
Copy link
Member

@Kobzol Kobzol commented Jul 4, 2025

The list of CLI completion files that were generated and that were checked by x test tidy was not synced. Recently, some PR only updated some of the files, which caused the rest of the files (not checked by x test tidy) to be dirty on master. This PR fixes the logic in bootstrap to always synchronize the list of completion paths.

Fixes: #143451

r? @jieyouxu

@rustbot rustbot added A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 4, 2025
@rustbot
Copy link
Collaborator

rustbot commented Jul 4, 2025

This PR modifies src/bootstrap/src/core/config.

If appropriate, please update CONFIG_CHANGE_HISTORY in src/bootstrap/src/utils/change_tracker.rs.

@rustbot rustbot added the T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) label Jul 4, 2025
@rust-log-analyzer

This comment has been minimized.

@Kobzol
Copy link
Member Author

Kobzol commented Jul 4, 2025

The job pr-check-2 failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)

[RUSTC-TIMING] build_helper test:false 0.669
error: function call inside of `expect`
   --> src/bootstrap/src/core/build_steps/run.rs:315:22
    |
315 |                     .expect(&format!("writing {} completion", path.display()));
    |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("writing {} completion", path.display()))`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call
    = note: `-D clippy::expect-fun-call` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(clippy::expect_fun_call)]`

Funny, clippy didn't detect this when it was inside a macro.

@Kobzol Kobzol force-pushed the completions-fix branch from 6a0b04b to 1a1f561 Compare July 4, 2025 20:10
@jieyouxu
Copy link
Member

jieyouxu commented Jul 5, 2025

Funny, clippy didn't detect this when it was inside a macro.

Aren't many lints intentionally not fired against code whose span comes from macro expansions? Anyway

Copy link
Member

@jieyouxu jieyouxu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@jieyouxu
Copy link
Member

jieyouxu commented Jul 5, 2025

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Jul 5, 2025

📌 Commit 1a1f561 has been approved by jieyouxu

It is now in the queue for this repository.

@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-review Status: Awaiting review from the assignee but also interested parties. labels Jul 5, 2025
bors added a commit that referenced this pull request Jul 5, 2025
Rollup of 11 pull requests

Successful merges:

 - #142440 (`tests/ui`: A New Order [14/N])
 - #143040 (Add `const Rem`)
 - #143086 (Update poison.rs to fix the typo (sys->sync))
 - #143202 (`tests/ui`: A New Order [18/N])
 - #143296 (`tests/ui`: A New Order [21/N])
 - #143297 (`tests/ui`: A New Order [22/N])
 - #143299 (`tests/ui`: A New Order [24/N])
 - #143300 (`tests/ui`: A New Order [25/N])
 - #143397 (test passing a `VaList` from rust to C)
 - #143410 (Block SIMD in transmute_immediate; delete `OperandValueKind`)
 - #143452 (Fix CLI completion check in `tidy`)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 77ae270 into rust-lang:master Jul 5, 2025
11 checks passed
rust-timer added a commit that referenced this pull request Jul 5, 2025
Rollup merge of #143452 - Kobzol:completions-fix, r=jieyouxu

Fix CLI completion check in `tidy`

The list of CLI completion files that were generated and that were checked by `x test tidy` was not synced. Recently, some PR only updated some of the files, which caused the rest of the files (not checked by `x test tidy`) to be dirty on `master`. This PR fixes the logic in bootstrap to always synchronize the list of completion paths.

Fixes: #143451

r? `@jieyouxu`
@rustbot rustbot added this to the 1.90.0 milestone Jul 5, 2025
@Kobzol Kobzol deleted the completions-fix branch July 5, 2025 12:42
@klensy
Copy link
Contributor

klensy commented Jul 5, 2025

Sorry, i've updated only ones that caused build or tidy fails.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CLI completion check is broken
6 participants