mirror of
				https://github.com/rust-lang/rust-analyzer.git
				synced 2025-10-29 19:17:12 +00:00 
			
		
		
		
	Unify formatting of progress messages
This commit is contained in:
		
							parent
							
								
									749288e0de
								
							
						
					
					
						commit
						3e6509f18b
					
				
					 3 changed files with 6 additions and 7 deletions
				
			
		|  | @ -356,7 +356,7 @@ impl WorkspaceBuildScripts { | ||||||
|                         }); |                         }); | ||||||
|                     } |                     } | ||||||
|                     Message::CompilerMessage(message) => { |                     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() { |                         if let Some(diag) = message.message.rendered.as_deref() { | ||||||
|                             push_err(diag); |                             push_err(diag); | ||||||
|  |  | ||||||
|  | @ -213,8 +213,7 @@ impl ProjectWorkspace { | ||||||
|         config: &CargoConfig, |         config: &CargoConfig, | ||||||
|         progress: &(dyn Fn(String) + Sync), |         progress: &(dyn Fn(String) + Sync), | ||||||
|     ) -> Result<ProjectWorkspace, anyhow::Error> { |     ) -> Result<ProjectWorkspace, anyhow::Error> { | ||||||
|         progress("Discovering sysroot".to_owned()); |         progress("discovering sysroot".to_owned()); | ||||||
| 
 |  | ||||||
|         let CargoConfig { |         let CargoConfig { | ||||||
|             features, |             features, | ||||||
|             rustc_source, |             rustc_source, | ||||||
|  | @ -270,7 +269,7 @@ impl ProjectWorkspace { | ||||||
|         let workspace_dir = cargo_toml.parent(); |         let workspace_dir = cargo_toml.parent(); | ||||||
| 
 | 
 | ||||||
|         tracing::info!(workspace = %cargo_toml, src_root = ?sysroot.rust_lib_src_root(), root = ?sysroot.root(), "Using sysroot"); |         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 toolchain_config = QueryConfig::Cargo(&sysroot, cargo_toml); | ||||||
|         let targets = |         let targets = | ||||||
|             target_tuple::get(toolchain_config, target.as_deref(), extra_env).unwrap_or_default(); |             target_tuple::get(toolchain_config, target.as_deref(), extra_env).unwrap_or_default(); | ||||||
|  | @ -461,12 +460,12 @@ impl ProjectWorkspace { | ||||||
|         config: &CargoConfig, |         config: &CargoConfig, | ||||||
|         progress: &(dyn Fn(String) + Sync), |         progress: &(dyn Fn(String) + Sync), | ||||||
|     ) -> ProjectWorkspace { |     ) -> ProjectWorkspace { | ||||||
|         progress("Discovering sysroot".to_owned()); |         progress("discovering sysroot".to_owned()); | ||||||
|         let mut sysroot = |         let mut sysroot = | ||||||
|             Sysroot::new(project_json.sysroot.clone(), project_json.sysroot_src.clone()); |             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"); |         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 sysroot_project = project_json.sysroot_project.take(); | ||||||
|         let query_config = QueryConfig::Rustc(&sysroot, project_json.path().as_ref()); |         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) |         let targets = target_tuple::get(query_config, config.target.as_deref(), &config.extra_env) | ||||||
|  |  | ||||||
|  | @ -428,7 +428,7 @@ impl GlobalState { | ||||||
|                     let expansion_res = match client { |                     let expansion_res = match client { | ||||||
|                         Ok(client) => match res { |                         Ok(client) => match res { | ||||||
|                             Ok((crate_name, path)) => { |                             Ok((crate_name, path)) => { | ||||||
|                                 progress(path.to_string()); |                                 progress(format!("loading proc-macros: {path}")); | ||||||
|                                 let ignored_proc_macros = ignored_proc_macros |                                 let ignored_proc_macros = ignored_proc_macros | ||||||
|                                     .iter() |                                     .iter() | ||||||
|                                     .find_map(|(name, macros)| { |                                     .find_map(|(name, macros)| { | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Vincent Esche
						Vincent Esche