Skip to content

Conversation

lolbinarycat
Copy link
Contributor

the main thing this does is eliminate the "Fresh ..." output when --verbose is only passed once.

r? @Kobzol

the main thing this does is eliminate the "Fresh ..." output when
`--verbose` is only passed once.
@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. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Sep 15, 2025
Comment on lines -3421 to -3423
if builder.is_verbose() {
cargo.arg("--verbose");
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We're already setting verbosity in Builder::cargo, which is indirectly called by prepare_tool_cargo, so this is not needed.

cargo.arg("-v");
// verbose cargo output is very noisy, so only enable it with -vv
for _ in 0..self.verbosity.saturating_sub(1) {
cargo.arg("--verbose");
Copy link
Contributor Author

Choose a reason for hiding this comment

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

changed from -v to --verbose for consistency and grepability.

@Kobzol
Copy link
Member

Kobzol commented Sep 15, 2025

Thanks!

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Sep 15, 2025

📌 Commit 29ca09b 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 15, 2025
bors added a commit that referenced this pull request Sep 16, 2025
Rollup of 9 pull requests

Successful merges:

 - #145095 (Migrate `UnsizedConstParamTy`  to unstable impl of `ConstParamTy_`)
 - #145960 (Split `FnCtxt::report_args_error` into subfunctions)
 - #146402 (interpret: fix overlapping aggregate initialization)
 - #146466 (llvm-wrapper: other cleanup)
 - #146574 (compiletest: Enable new-output-capture by default)
 - #146599 (replace some `#[const_trait]` with `const trait`)
 - #146601 (compiletest: Make `./x test --test-args ...` work again)
 - #146608 (improve internal bootstrap docs)
 - #146609 (bootstrap: lower verbosity of cargo to one less than bootstrap's)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit that referenced this pull request Sep 16, 2025
Rollup of 9 pull requests

Successful merges:

 - #145095 (Migrate `UnsizedConstParamTy`  to unstable impl of `ConstParamTy_`)
 - #145960 (Split `FnCtxt::report_args_error` into subfunctions)
 - #146402 (interpret: fix overlapping aggregate initialization)
 - #146466 (llvm-wrapper: other cleanup)
 - #146574 (compiletest: Enable new-output-capture by default)
 - #146599 (replace some `#[const_trait]` with `const trait`)
 - #146601 (compiletest: Make `./x test --test-args ...` work again)
 - #146608 (improve internal bootstrap docs)
 - #146609 (bootstrap: lower verbosity of cargo to one less than bootstrap's)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit f0e8c2f into rust-lang:master Sep 16, 2025
10 checks passed
rust-timer added a commit that referenced this pull request Sep 16, 2025
Rollup merge of #146609 - lolbinarycat:bootstrap-less-verbose-cargo, r=Kobzol

bootstrap: lower verbosity of cargo to one less than bootstrap's

the main thing this does is eliminate the "Fresh ..." output when `--verbose` is only passed once.

r? `@Kobzol`
@rustbot rustbot added this to the 1.92.0 milestone Sep 16, 2025
}

if self.is_verbose() {
if self.is_verbose_than(1) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Huh, that's a weird (pre-existing) function name. I had to look at the code to understand what it meant. is_more_verbose_than would be clearer. Even clearer would be just removing it and using if self.verbosity > 1 directly. The related verbose_than function could also be removed.

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, the names are pretty terrible here, I plan to rename them, once I get to it.

github-actions bot pushed a commit to rust-lang/miri that referenced this pull request Sep 17, 2025
Rollup of 9 pull requests

Successful merges:

 - rust-lang/rust#145095 (Migrate `UnsizedConstParamTy`  to unstable impl of `ConstParamTy_`)
 - rust-lang/rust#145960 (Split `FnCtxt::report_args_error` into subfunctions)
 - rust-lang/rust#146402 (interpret: fix overlapping aggregate initialization)
 - rust-lang/rust#146466 (llvm-wrapper: other cleanup)
 - rust-lang/rust#146574 (compiletest: Enable new-output-capture by default)
 - rust-lang/rust#146599 (replace some `#[const_trait]` with `const trait`)
 - rust-lang/rust#146601 (compiletest: Make `./x test --test-args ...` work again)
 - rust-lang/rust#146608 (improve internal bootstrap docs)
 - rust-lang/rust#146609 (bootstrap: lower verbosity of cargo to one less than bootstrap's)

r? `@ghost`
`@rustbot` modify labels: rollup
@RalfJung
Copy link
Member

Hm, this is exact opposite of what I wanted last time I used -v -- I wanted to see the cargo output but it was already drowning in other stuff presumably emitted by bootstrap that I have no idea what it means.

@RalfJung
Copy link
Member

Or maybe it wasn't bootstrap output? I am talking about this:

   0.115594160s  INFO prepare_target{force=false package_id=rustc-main v0.0.0 (/home/r/src/rust/rustc/compiler/rustc) target="rustc-main"}: cargo::core::compiler::fingerprint: dependency on `rustc_target` is newer than we are 1757759486.271667715s > 1757759293.139616467s "/home/r/src/rust/rustc/compiler/rustc_codegen_ssa"
   0.116019242s  INFO prepare_target{force=false package_id=rustc-main v0.0.0 (/home/r/src/rust/rustc/compiler/rustc) target="rustc-main"}: cargo::core::compiler::fingerprint: dependency on `rustc_trait_selection` is newer than we are 1757759491.171783213s > 1757759292.603605485s "/home/r/src/rust/rustc/compiler/rustc_traits"
   0.116028065s  INFO prepare_target{force=false package_id=rustc-main v0.0.0 (/home/r/src/rust/rustc/compiler/rustc) target="rustc-main"}: cargo::core::compiler::fingerprint: dependency on `rustc_session` is newer than we are 1757759487.227690259s > 1757759293.467623188s "/home/r/src/rust/rustc/compiler/rustc_borrowck"
   0.116202713s  INFO prepare_target{force=false package_id=rustc-main v0.0.0 (/home/r/src/rust/rustc/compiler/rustc) target="rustc-main"}: cargo::core::compiler::fingerprint: dependency on `rustc_target` is newer than we are 1757759486.271667715s > 1757759293.055614746s "/home/r/src/rust/rustc/compiler/rustc_const_eval"
   0.116211300s  INFO prepare_target{force=false package_id=rustc-main v0.0.0 (/home/r/src/rust/rustc/compiler/rustc) target="rustc-main"}: cargo::core::compiler::fingerprint: dependency on `rustc_target` is newer than we are 1757759486.271667715s > 1757759293.391621631s "/home/r/src/rust/rustc/compiler/rustc_hir_analysis"
   0.116274443s  INFO prepare_target{force=false package_id=rustc-main v0.0.0 (/home/r/src/rust/rustc/compiler/rustc) target="rustc-main"}: cargo::core::compiler::fingerprint: dependency on `rustc_target` is newer than we are 1757759486.271667715s > 1757759293.187617451s "/home/r/src/rust/rustc/compiler/rustc_lint"
   0.116281472s  INFO prepare_target{force=false package_id=rustc-main v0.0.0 (/home/r/src/rust/rustc/compiler/rustc) target="rustc-main"}: cargo::core::compiler::fingerprint: dependency on `rustc_target` is newer than we are 1757759486.271667715s > 1757759294.271639660s "/home/r/src/rust/rustc/compiler/rustc_hir_typeck"
   0.116335707s  INFO prepare_target{force=false package_id=rustc-main v0.0.0 (/home/r/src/rust/rustc/compiler/rustc) target="rustc-main"}: cargo::core::compiler::fingerprint: dependency on `build_script_build` is newer than we are 1757758399.357387429s > 1757520736.531052239s "/home/r/src/rust/rustc/compiler/rustc_llvm"
   0.116343215s  INFO prepare_target{force=false package_id=rustc-main v0.0.0 (/home/r/src/rust/rustc/compiler/rustc) target="rustc-main"}: cargo::core::compiler::fingerprint: dependency on `rustc_target` is newer than we are 1757759486.271667715s > 1757759292.659606633s "/home/r/src/rust/rustc/compiler/rustc_sanitizers"
   0.116498955s  INFO prepare_target{force=false package_id=rustc-main v0.0.0 (/home/r/src/rust/rustc/compiler/rustc) target="rustc-main"}: cargo::core::compiler::fingerprint: dependency on `rustc_target` is newer than we are 1757759486.271667715s > 1757759294.487644085s "/home/r/src/rust/rustc/compiler/rustc_mir_transform"
   0.116618402s  INFO prepare_target{force=false package_id=rustc-main v0.0.0 (/home/r/src/rust/rustc/compiler/rustc) target="rustc-main"}: cargo::core::compiler::fingerprint: dependency on `rustc_target` is newer than we are 1757759486.271667715s > 1757759292.739608271s "/home/r/src/rust/rustc/compiler/rustc_ty_utils"
   0.116624344s  INFO prepare_target{force=false package_id=rustc-main v0.0.0 (/home/r/src/rust/rustc/compiler/rustc) target="rustc-main"}: cargo::core::compiler::fingerprint: dependency on `rustc_session` is newer than we are 1757759487.227690259s > 1757759292.867610894s "/home/r/src/rust/rustc/compiler/rustc_privacy"
   0.116629908s  INFO prepare_target{force=false package_id=rustc-main v0.0.0 (/home/r/src/rust/rustc/compiler/rustc) target="rustc-main"}: cargo::core::compiler::fingerprint: dependency on `rustc_target` is newer than we are 1757759486.271667715s > 1757759293.227618270s "/home/r/src/rust/rustc/compiler/rustc_passes"
   0.117675830s  INFO prepare_target{force=false package_id=rustc-main v0.0.0 (/home/r/src/rust/rustc/compiler/rustc) target="rustc-main"}: cargo::core::compiler::fingerprint: fingerprint dirty for rustc-main v0.0.0 (/home/r/src/rust/rustc/compiler/rustc)/Check { test: false }/TargetInner { name: "rustc-main", doc: true, ..: with_path("/home/r/src/rust/rustc/compiler/rustc/src/main.rs", Edition2024) }
   0.117687931s  INFO prepare_target{force=false package_id=rustc-main v0.0.0 (/home/r/src/rust/rustc/compiler/rustc) target="rustc-main"}: cargo::core::compiler::fingerprint:     dirty: FsStatusOutdated(StaleDepFingerprint { name: "rustc_driver_impl" })

That looks like cargo debug output? Normal cargo -v doesn't give me that so looks like bootstrap is doing something here.

@Kobzol
Copy link
Member

Kobzol commented Sep 17, 2025

That's manually configured by bootstrap:

if self.is_verbose() {

I haven't ever used this output, while on the other hand I do often want to see with which cmdline arguments Cargo invokes rustc commands (so my default is the opposite to yours, apparently :) ). This shows that people have different expectations from the "ordering" of the verbose levels (what should be shown in -v vs -vv etc.).

We could instead decide what is outputted on a more fine-grained level. For example, we could include the Cargo fingerprint output in our tracing system, so it would be BOOTSTRAP_TRACING=target=CARGO_FINGERPRINT ./x build, or something like that.

That being said, if we do order just on the literal verbosity of the output, the fingerprints are much more spammy than the rustc execution log, so from that point of view its current verbosity level makes sense.

@RalfJung
Copy link
Member

Seeing the command sis also definitely good, also something I ran into every now and then. So I agree with this PR, if you just want to see that then also seeing the huge rustc invocations cargo produces is often just a distraction (in particular since it's not actually the final rustc invocation as there's the bootstrap wrapper adjusting the arguments further).

github-actions bot pushed a commit to model-checking/verify-rust-std that referenced this pull request Oct 9, 2025
Rollup of 9 pull requests

Successful merges:

 - rust-lang#145095 (Migrate `UnsizedConstParamTy`  to unstable impl of `ConstParamTy_`)
 - rust-lang#145960 (Split `FnCtxt::report_args_error` into subfunctions)
 - rust-lang#146402 (interpret: fix overlapping aggregate initialization)
 - rust-lang#146466 (llvm-wrapper: other cleanup)
 - rust-lang#146574 (compiletest: Enable new-output-capture by default)
 - rust-lang#146599 (replace some `#[const_trait]` with `const trait`)
 - rust-lang#146601 (compiletest: Make `./x test --test-args ...` work again)
 - rust-lang#146608 (improve internal bootstrap docs)
 - rust-lang#146609 (bootstrap: lower verbosity of cargo to one less than bootstrap's)

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-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.

6 participants