From d0aa1b7a13131062bc10ab12fe8b95a970879bb8 Mon Sep 17 00:00:00 2001 From: Shadaj Laddad Date: Tue, 4 Feb 2025 20:25:37 -0800 Subject: [PATCH] fix(hydro_deploy): always write logs to stdout Previously, some logs may have gone to stderr depending on the status of the `ProgressBar`. Also enables `rust-lld` linker on Apple Silicon to improve compilation times. --- .cargo/config.toml | 3 +++ hydro_deploy/core/src/progress.rs | 6 ++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.cargo/config.toml b/.cargo/config.toml index e604c11a1087..1bec339b0c99 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -5,6 +5,9 @@ rustflags = [ '--cfg=HYDROFLOW_GENERATE_DOCS', ] +[target.aarch64-apple-darwin] +linker = "rust-lld" + [target.x86_64-apple-darwin] linker = "rust-lld" diff --git a/hydro_deploy/core/src/progress.rs b/hydro_deploy/core/src/progress.rs index 545773db67d8..3507ae79cc3d 100644 --- a/hydro_deploy/core/src/progress.rs +++ b/hydro_deploy/core/src/progress.rs @@ -370,11 +370,9 @@ impl ProgressTracker { .lock() .unwrap(); - if progress_bar.current_count == 0 - || progress_bar.multi_progress.println(msg.as_ref()).is_err() - { + progress_bar.multi_progress.suspend(|| { println!("{}", msg.as_ref()); - } + }); } pub fn with_group<'a, T, F: Future>(