Skip to content

Conversation

Shunpoco
Copy link
Contributor

@Shunpoco Shunpoco commented Sep 28, 2025

Fixes #147105

Background

Current implementation of ensure_version_of_cargo_install uses bin_name to check if it exists, but it should use <tool_root_dir>/<tool_bin_dir>/<bin_name> instead. Otherwise the check fails every time, hence the function falls back to install the binary.

Change

Move lines which define bin_path at the top of the function, and use bin_path for the check

Current implementation uses bin_name to check if it exists,
but it should use tool_root_dir/tool_bin_dir/bin_name instead.
Otherwise the check fails every time, hence the function falls back to
install the binary.
@rustbot rustbot added A-tidy Area: The tidy tool S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Sep 28, 2025
@Shunpoco
Copy link
Contributor Author

r? @Kobzol

@Shunpoco Shunpoco marked this pull request as ready for review September 28, 2025 10:14
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Sep 28, 2025
@Kobzol
Copy link
Member

Kobzol commented Sep 28, 2025

Makes sense, thank you!

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Sep 28, 2025

📌 Commit 5e9cab3 has been approved by Kobzol

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 Sep 28, 2025
bors added a commit that referenced this pull request Sep 28, 2025
Rollup of 6 pull requests

Successful merges:

 - #140482 (std::net: update tcp deferaccept delay type to Duration.)
 - #141469 (Allow `&raw [mut | const]` for union field in safe code)
 - #144197 (TypeTree support in autodiff)
 - #146675 (Allow shared access to `Exclusive<T>` when `T: Sync`)
 - #147113 (Reland "Add LSX accelerated implementation for source file analysis")
 - #147120 (Fix --extra-checks=spellcheck to prevent cargo install every time)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 4eb6b8f into rust-lang:master Sep 28, 2025
10 checks passed
rust-timer added a commit that referenced this pull request Sep 28, 2025
Rollup merge of #147120 - Shunpoco:issue-147105, r=Kobzol

Fix --extra-checks=spellcheck to prevent cargo install every time

Fixes #147105

## Background
Current implementation of `ensure_version_of_cargo_install` uses `bin_name` to check if it exists, but it should use `<tool_root_dir>/<tool_bin_dir>/<bin_name>` instead. Otherwise the check fails every time, hence the function falls back to install the binary.

## Change
Move lines which define bin_path at the top of the function, and use bin_path for the check
@rustbot rustbot added this to the 1.92.0 milestone Sep 28, 2025
@Shunpoco Shunpoco deleted the issue-147105 branch September 28, 2025 21:27
github-actions bot pushed a commit to rust-lang/miri that referenced this pull request Sep 29, 2025
Rollup of 6 pull requests

Successful merges:

 - rust-lang/rust#140482 (std::net: update tcp deferaccept delay type to Duration.)
 - rust-lang/rust#141469 (Allow `&raw [mut | const]` for union field in safe code)
 - rust-lang/rust#144197 (TypeTree support in autodiff)
 - rust-lang/rust#146675 (Allow shared access to `Exclusive<T>` when `T: Sync`)
 - rust-lang/rust#147113 (Reland "Add LSX accelerated implementation for source file analysis")
 - rust-lang/rust#147120 (Fix --extra-checks=spellcheck to prevent cargo install every time)

r? `@ghost`
`@rustbot` modify labels: rollup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-tidy Area: The tidy tool 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.

run spellcheck in tidy forces bootstrap to install typos-cli every time
4 participants