Skip to content

Update all mnemonics - #4406

Merged
UebelAndre merged 2 commits into
bazelbuild:mainfrom
UebelAndre:message
Nov 18, 2026
Merged

UebelAndre merged 2 commits into
bazelbuild:mainfrom
UebelAndre:message

Conversation

@UebelAndre

@UebelAndre UebelAndre commented Nov 10, 2026 •

Copy link
Copy Markdown
Collaborator

This change updates all mnemonics part of the public interface to be consistent with each other.

@krasimirgg krasimirgg left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I like the addition of labels in these messages, but could we keep them as English prose. That seems to be the status quo for such messages in other languages' rulesets too.

@UebelAndre

Copy link
Copy Markdown
Collaborator Author

I like the addition of labels in these messages, but could we keep them as English prose. That seems to be the status quo for such messages in other languages' rulesets too.

Where is this the status quo? One thing I value about having the mnemonic in the progress message is it helps me locate where the action is implemented and tends to be the most consistent pattern across rules.

Comment thread cargo/private/cargo_toml_env_vars.bzl Resolved
@krasimirgg

Copy link
Copy Markdown
Collaborator

I like the addition of labels in these messages, but could we keep them as English prose. That seems to be the status quo for such messages in other languages' rulesets too.

Where is this the status quo? One thing I value about having the mnemonic in the progress message is it helps me locate where the action is implemented and tends to be the most consistent pattern across rules.

Internally, we get glimpses of progress messages from all sorts of language integrations and they seem to mostly use a sentence. I think the idea is this is intended to be displayed to users that don't necessarily understand where the meaning of mnemonics and internal details of rulesets. I like to to think of it in terms of https://xkcd.com/303: you could shout back the progress message :)

In Bazel, mnemonic is defined as "A one-word description of the action, for example, CppCompile or GoLink", whereas progress_message is defined as "Progress message to show to the user during the build, for example, "Compiling foo.cc to create foo.o"".
Examples of actions using English prose include:

  • Bazel-internal ones ("Testing ...", "Writing file ...", "Expanding template ...", "Creating symlink ...", "Creating runfiles tree ...");
  • rules_cc ("Compiling ", "Linking %{output}")
  • rules_python ("Python precompiling %{input} into %{output}", "Building Python zip: %{label}", "Building wheel ")
  • rules_java ("Building ( source files)...", "Compiling Java headers ( source files)", "Building source jar %{output}")

At the same time, I agree that the label and mnemonic are useful pieces of information to include -- so I suggest keep the high-level format as a single sentence that explains roughly what's happening, while using labels to disambiguate crates with the same name and also mentioning the mnemonic, like:
"Compiling Rust rlib //label/of:rlib (RustcCompile)"

(aside, I don't think mentioning the number of files is super useful, and sometimes it's actively misleading when we have generated source files -- you can have 1 "source file" but a huge generated one that takes a lot of time to compile, or a whole directory of generated source files counted as one).

@UebelAndre

Copy link
Copy Markdown
Collaborator Author

How about this, can folks propose progress messages for the following mnemonics? I care more about consistency than I do my proposed format.

Mnemonic Produced by Current progress message
Rustc rust_library, rust_binary, rust_test, rust_proc_macro, rust_shared_library, rust_static_library, cargo_build_script script compile Compiling Rust {crate_type} {name} v{version} ({N} files)
Rustc (bootstrap wrapper) same rules, while process_wrapper itself is being built Compiling Rust (without process_wrapper) {crate_type} {name} v{version} ({N} files)
RustcMetadata same rules, with pipelined_compilation Compiling Rust metadata {crate_type} {name} v{version} ({N} files)
Clippy rust_clippy_aspect, rust_clippy, rust_clippy_test Clippy %{label}
Rustfmt rustfmt_aspect, rustfmt_test Rustfmt %{label}
Rustdoc rust_doc Generating Rustdoc for {label}
RustdocZip rust_doc zip output Creating RustdocZip for {label}
RustdocTestCompile rust_doc_test with experimental_compile_rustdoc_tests RustdocTestCompile {label}
RustdocTestWriter rust_doc_test Generating Rustdoc test runner for {label}
RustUnpretty{Mode} rust_unpretty_aspect, rust_unpretty none (Bazel default)
CargoBuildScriptRun cargo_build_script Running Cargo build script {pkg_name}
CargoDepEnv cargo_dep_env none (Bazel default)
CargoLints extract_cargo_lints Reading Cargo metadata to get Lints for {name}
ExtractCargoTomlEnvVars cargo_toml_env_vars none (Bazel default)
RustBindgen rust_bindgen Generating bindings for {header path}..
RustWasmBindgen rust_wasm_bindgen, rust_wasm_bindgen_aspect Generating WebAssembly bindings for {label or wasm path}
ProstGenProto rust_prost_library via proto_common ProstGenProto %{label}
PyO3StubGen pyo3_extension stub generation none (Bazel default)
MdBookBuild mdbook none (Bazel default)

@UebelAndre

Copy link
Copy Markdown
Collaborator Author

I'm also not confident in the need for a flag for this change. I would be happy to just update the progress messages.

@krasimirgg

Copy link
Copy Markdown
Collaborator

Agreed on dropping the experimental_simple_progress_messages flag and just updating the progress messages directly — that keeps things much simpler and avoids carrying a flag for formatting.

What do you think about setting up some rules of thumb across all actions:

  • Use verb-first English prose for every action (including the ones that currently have no progress_message).
  • Use %{label} consistently instead of {name} / {pkg_name} / file paths / crate.label (which also avoids Starlark string formatting for labels and disambiguates multiple targets wrapping the same crate).
  • Drop the file count (and v{version} on Rustc*, since %{label} already disambiguates versions).
  • Append (<Mnemonic>) at the end when the exact mnemonic isn't already in the sentence.
Mnemonic Produced by Proposed progress message
Rustc rust_library, rust_binary, rust_test, rust_proc_macro, rust_shared_library, rust_static_library, cargo_build_script script compile Compiling Rust {crate_type} %{label} (Rustc)
Rustc (bootstrap wrapper) same rules, while process_wrapper itself is being built Compiling Rust (without process_wrapper) {crate_type} %{label} (Rustc)
RustcMetadata same rules, with pipelined_compilation Compiling Rust metadata {crate_type} %{label} (RustcMetadata)
Clippy rust_clippy_aspect, rust_clippy, rust_clippy_test Running Clippy on %{label}
Rustfmt rustfmt_aspect, rustfmt_test Checking Rustfmt for %{label}
Rustdoc rust_doc Generating Rustdoc for %{label}
RustdocZip rust_doc zip output Creating RustdocZip for %{label}
RustdocTestCompile rust_doc_test with experimental_compile_rustdoc_tests Compiling Rustdoc tests for %{label} (RustdocTestCompile)
RustdocTestWriter rust_doc_test Generating Rustdoc test runner for %{label} (RustdocTestWriter)
RustUnpretty{Mode} rust_unpretty_aspect, rust_unpretty Running Rust unpretty ({mode}) for %{label} (RustUnpretty{Mode})
CargoBuildScriptRun cargo_build_script Running Cargo build script %{label} (CargoBuildScriptRun)
CargoDepEnv cargo_dep_env Creating Cargo dep env for %{label} (CargoDepEnv)
CargoLints extract_cargo_lints Extracting Cargo lints for %{label} (CargoLints)
ExtractCargoTomlEnvVars cargo_toml_env_vars Extracting Cargo.toml env vars for %{label} (ExtractCargoTomlEnvVars)
RustBindgen rust_bindgen Generating bindings for %{label} (RustBindgen)
RustWasmBindgen rust_wasm_bindgen, rust_wasm_bindgen_aspect Generating WebAssembly bindings for %{label} (RustWasmBindgen)
ProstGenProto rust_prost_library via proto_common Generating Prost Rust proto for %{label} (ProstGenProto)
PyO3StubGen pyo3_extension stub generation Generating PyO3 stubs for %{label} (PyO3StubGen)
MdBookBuild mdbook Building mdBook %{label} (MdBookBuild)

@UebelAndre UebelAndre changed the title Add experimental_simple_progress_messages Update all mnemonics Nov 18, 2026
@UebelAndre

Copy link
Copy Markdown
Collaborator Author

re: #4406 (comment)
@krasimirgg updated!

@krasimirgg krasimirgg left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thank you!

@UebelAndre
UebelAndre disabled auto-merge November 18, 2026 15:51
@UebelAndre
UebelAndre enabled auto-merge November 18, 2026 15:52
@UebelAndre
UebelAndre disabled auto-merge November 18, 2026 16:05
@UebelAndre
UebelAndre added this pull request to the merge queue Nov 18, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 18, 2026
@UebelAndre
UebelAndre added this pull request to the merge queue Nov 18, 2026
Merged via the queue into bazelbuild:main with commit 3284633 Nov 18, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants