diff --git a/src/build.rs b/src/build.rs index dcf734f..48a1c88 100644 --- a/src/build.rs +++ b/src/build.rs @@ -1251,7 +1251,7 @@ pub fn build(filter: &Option, path: &str, no_timing: bool) -> Resu num_dirty_modules, default_timing.unwrap_or(timing_ast_elapsed).as_secs_f64() ); - println!("{}", &err); + print!("{}", &err); } Err(err) => { logs::finalize(&build_state.project_root, &build_state.packages); @@ -1262,7 +1262,7 @@ pub fn build(filter: &Option, path: &str, no_timing: bool) -> Resu CROSS, default_timing.unwrap_or(timing_ast_elapsed).as_secs_f64() ); - println!("{}", &err); + print!("{}", &err); clean::cleanup_after_build(&build_state); return Err(()); } @@ -1616,7 +1616,6 @@ pub fn build(filter: &Option, path: &str, no_timing: bool) -> Resu if helpers::contains_ascii_characters(&compile_warnings) { println!("{}", &compile_warnings); } - println!("{}", &compile_errors); println!( "{}\r{} {}Compiled {} modules in {:.2}s", LINE_CLEAR, @@ -1625,11 +1624,9 @@ pub fn build(filter: &Option, path: &str, no_timing: bool) -> Resu num_compiled_modules, default_timing.unwrap_or(compile_duration).as_secs_f64() ); + print!("{}", &compile_errors); return Err(()); } else { - if helpers::contains_ascii_characters(&compile_warnings) { - println!("{}", &compile_warnings); - } println!( "{}\r{} {}Compiled {} modules in {:.2}s", LINE_CLEAR, @@ -1638,6 +1635,9 @@ pub fn build(filter: &Option, path: &str, no_timing: bool) -> Resu num_compiled_modules, default_timing.unwrap_or(compile_duration).as_secs_f64() ); + if helpers::contains_ascii_characters(&compile_warnings) { + print!("{}", &compile_warnings); + } } let timing_total_elapsed = timing_total.elapsed(); diff --git a/tests/snapshots/rename-file-with-interface.txt b/tests/snapshots/rename-file-with-interface.txt index 0f4664a..eeff94f 100644 --- a/tests/snapshots/rename-file-with-interface.txt +++ b/tests/snapshots/rename-file-with-interface.txt @@ -3,7 +3,6 @@  [2/7] ️✅ Found source files in 0.00s [3/7] 🧹 Cleaning up previous build... [3/7] ️✅ Cleaned 2/9 0.00s  [4/7] ️✅ Parsed 1 source files in 0.00s -  [5/7] ️✅ Collected deps in 0.00s  [6/7] ️✅ Compiled 3 modules in 0.00s  [7/7] ️✅ Finished Compilation in 0.00s diff --git a/tests/snapshots/rename-file.txt b/tests/snapshots/rename-file.txt index a9d55d1..004c040 100644 --- a/tests/snapshots/rename-file.txt +++ b/tests/snapshots/rename-file.txt @@ -2,7 +2,6 @@ [2/7] 🔍 Finding source files... [2/7] ️✅ Found source files in 0.00s [3/7] 🧹 Cleaning up previous build... [3/7] ️✅ Cleaned 1/9 0.00s  [4/7] ️✅ Parsed 1 source files in 0.00s -  [5/7] ️✅ Collected deps in 0.00s  [6/7] ️✅ Compiled 3 modules in 0.00s  [7/7] ️✅ Finished Compilation in 0.00s diff --git a/tests/snapshots/rename-interface-file.txt b/tests/snapshots/rename-interface-file.txt index 5ecc407..75b08cb 100644 --- a/tests/snapshots/rename-interface-file.txt +++ b/tests/snapshots/rename-interface-file.txt @@ -3,7 +3,6 @@  [2/7] ️✅ Found source files in 0.00s [3/7] 🧹 Cleaning up previous build... [3/7] ️✅ Cleaned 1/9 0.00s  [4/7] ️✅ Parsed 1 source files in 0.00s -  [5/7] ️✅ Collected deps in 0.00s  [6/7] ️✅ Compiled 3 modules in 0.00s  [7/7] ️✅ Finished Compilation in 0.00s