Skip to content

Conversation

Shunpoco
Copy link
Contributor

@Shunpoco Shunpoco commented Oct 4, 2025

Context

ensure_version_or_cargo_install uses -Copt-level=0 for quicker installation. However, the flag affects the tool's performance. For example, typos-cli with opt-level=0 takes 15 seconds for checking /compiler on my local, but the tool with default opt-level only takes less than 1 sec.

It fixes #147331

Changes

This PR enables the option only when the test tidy is run on CI.
We've discussed that opt-level=1 should be enough, so I also change the level from 0 to 1.

@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 Oct 4, 2025
@Shunpoco Shunpoco changed the title Set opt-level option for installing tool only on CI Set opt-level flag for installing tool only on CI Oct 4, 2025
@Shunpoco
Copy link
Contributor Author

Shunpoco commented Oct 4, 2025

r? @Kobzol

@Shunpoco Shunpoco marked this pull request as ready for review October 4, 2025 12:46
@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 Oct 4, 2025
ensure_version_or_cargo_install uses -Copt-level=0 for quicker installation.
However, the flag affects the tool's performance. For example, typos-cli with opt-level=0 takes 15 seconds for checking ./compiler, but the tool with default opt-level only takes less than 1 sec.
This commit enables the option only when the test tidy is run on CI.
@Kobzol
Copy link
Member

Kobzol commented Oct 5, 2025

Thank you! :)

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Oct 5, 2025

📌 Commit 8a31837 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 Oct 5, 2025
bors added a commit that referenced this pull request Oct 5, 2025
Rollup of 4 pull requests

Successful merges:

 - #147327 (cg_llvm: Remove inherent methods from several LLVM FFI types)
 - #147332 (Set opt-level flag for installing tool only on CI)
 - #147374 (bootstrap: don't build book redirect pages during dry-run/test)
 - #147376 (bootstrap: relax `compiler-rt` root assertion)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 23d1cc7 into rust-lang:master Oct 5, 2025
10 checks passed
@rustbot rustbot added this to the 1.92.0 milestone Oct 5, 2025
rust-timer added a commit that referenced this pull request Oct 5, 2025
Rollup merge of #147332 - Shunpoco:fast-spellcheck, r=Kobzol

Set opt-level flag for installing tool only on CI

## Context
ensure_version_or_cargo_install uses -Copt-level=0 for quicker installation. However, the flag affects the tool's performance. For example, typos-cli with opt-level=0 takes 15 seconds for checking /compiler on my local, but the tool with default opt-level only takes less than 1 sec.

It fixes #147331

## Changes
This PR enables the option only when the test tidy is run on CI.
We've discussed that opt-level=1 should be enough, so I also change the level from 0 to 1.
@Shunpoco Shunpoco deleted the fast-spellcheck branch October 5, 2025 22:21
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.

typos-cli installed by bootstrap is slow

4 participants