Skip to content

Unify formatting of progress messages #20098

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 1 commit into from
Jun 25, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion crates/project-model/src/build_dependencies.rs
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ impl WorkspaceBuildScripts {
});
}
Message::CompilerMessage(message) => {
progress(message.target.name);
progress(format!("received compiler message for: {}", message.target.name));

if let Some(diag) = message.message.rendered.as_deref() {
push_err(diag);
Expand Down
9 changes: 4 additions & 5 deletions crates/project-model/src/workspace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -213,8 +213,7 @@ impl ProjectWorkspace {
config: &CargoConfig,
progress: &(dyn Fn(String) + Sync),
) -> Result<ProjectWorkspace, anyhow::Error> {
progress("Discovering sysroot".to_owned());

progress("discovering sysroot".to_owned());
let CargoConfig {
features,
rustc_source,
Expand Down Expand Up @@ -270,7 +269,7 @@ impl ProjectWorkspace {
let workspace_dir = cargo_toml.parent();

tracing::info!(workspace = %cargo_toml, src_root = ?sysroot.rust_lib_src_root(), root = ?sysroot.root(), "Using sysroot");
progress("Querying project metadata".to_owned());
progress("querying project metadata".to_owned());
let toolchain_config = QueryConfig::Cargo(&sysroot, cargo_toml);
let targets =
target_tuple::get(toolchain_config, target.as_deref(), extra_env).unwrap_or_default();
Expand Down Expand Up @@ -461,12 +460,12 @@ impl ProjectWorkspace {
config: &CargoConfig,
progress: &(dyn Fn(String) + Sync),
) -> ProjectWorkspace {
progress("Discovering sysroot".to_owned());
progress("discovering sysroot".to_owned());
let mut sysroot =
Sysroot::new(project_json.sysroot.clone(), project_json.sysroot_src.clone());

tracing::info!(workspace = %project_json.manifest_or_root(), src_root = ?sysroot.rust_lib_src_root(), root = ?sysroot.root(), "Using sysroot");
progress("Querying project metadata".to_owned());
progress("querying project metadata".to_owned());
let sysroot_project = project_json.sysroot_project.take();
let query_config = QueryConfig::Rustc(&sysroot, project_json.path().as_ref());
let targets = target_tuple::get(query_config, config.target.as_deref(), &config.extra_env)
Expand Down
2 changes: 1 addition & 1 deletion crates/rust-analyzer/src/reload.rs
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ impl GlobalState {
let expansion_res = match client {
Ok(client) => match res {
Ok((crate_name, path)) => {
progress(path.to_string());
progress(format!("loading proc-macros: {path}"));
let ignored_proc_macros = ignored_proc_macros
.iter()
.find_map(|(name, macros)| {
Expand Down