fix: dx bundle progress output off-by-one in log lines (#4014)
* fix: dx bundle progress output off-by-one in log lines * fix: Emit the name of the last compiled unit (feedback from @DogeDark) * fix: Log "Compiled" instead of "Compiling", since the log refers to completed units, not in-progress ones --------- Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>
This commit is contained in:
1 parent
f002cef2e1
commit
7392d7882b
2 files changed
+8
-10
No files matched your search
@@ -359,7 +359,7 @@ impl AppBuilder {
|
|||||||
krate,
|
krate,
|
||||||
..
|
..
|
||||||
} => {
|
} => {
|
||||||
tracing::info!("Compiling [{current:>3}/{total}]: {krate}");
|
tracing::info!("Compiled [{current:>3}/{total}]: {krate}");
|
||||||
}
|
}
|
||||||
BuildStage::RunningBindgen => tracing::info!("Running wasm-bindgen..."),
|
BuildStage::RunningBindgen => tracing::info!("Running wasm-bindgen..."),
|
||||||
BuildStage::CopyingAssets {
|
BuildStage::CopyingAssets {
|
||||||
@@ -367,7 +367,11 @@ impl AppBuilder {
|
|||||||
total,
|
total,
|
||||||
path,
|
path,
|
||||||
} => {
|
} => {
|
||||||
tracing::info!("Copying asset ({current}/{total}): {}", path.display());
|
tracing::info!(
|
||||||
|
"Copying asset ({}/{total}): {}",
|
||||||
|
current + 1,
|
||||||
|
path.display()
|
||||||
|
);
|
||||||
}
|
}
|
||||||
BuildStage::Bundling => tracing::info!("Bundling app..."),
|
BuildStage::Bundling => tracing::info!("Bundling app..."),
|
||||||
_ => {}
|
_ => {}
|
||||||
|
|||||||
@@ -843,14 +843,8 @@ session_cache_dir: {}"#,
|
|||||||
}
|
}
|
||||||
Message::CompilerArtifact(artifact) => {
|
Message::CompilerArtifact(artifact) => {
|
||||||
units_compiled += 1;
|
units_compiled += 1;
|
||||||
match artifact.executable {
|
ctx.status_build_progress(units_compiled, crate_count, artifact.target.name);
|
||||||
Some(executable) => output_location = Some(executable.into()),
|
output_location = artifact.executable.map(Into::into);
|
||||||
None => ctx.status_build_progress(
|
|
||||||
units_compiled,
|
|
||||||
crate_count,
|
|
||||||
artifact.target.name,
|
|
||||||
),
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
// todo: this can occasionally swallow errors, so we should figure out what exactly is going wrong
|
// todo: this can occasionally swallow errors, so we should figure out what exactly is going wrong
|
||||||
// since that is a really bad user experience.
|
// since that is a really bad user experience.
|
||||||
|
|||||||
Reference in new issue
Block a user