xtask: print errors and hide vst build output

This commit is contained in:
Alex Janka 2024-10-23 10:59:19 +11:00
parent bf3ed7ff24
commit be585f91c2

View file

@ -298,7 +298,7 @@ fn cargo_exec(
println!("Building {package} with {renderer} renderer for target {triple}");
let args=format!("{verb} -q -p {package} --target {triple} {release} --no-default-features -F {renderer} --message-format=json");
let args=format!("{verb} -q -p {package} --target {triple} {release} --no-default-features -F {renderer} --message-format=json-render-diagnostics");
let args = args.split_whitespace().map(|s| s.to_string());
let args = if let Some(additional_flags) = additional_flags {
args.chain(additional_flags).collect::<Vec<_>>()
@ -347,6 +347,10 @@ fn cargo_exec(
| Ok(cargo_metadata::Message::CompilerArtifact(_)) => {
pb.inc();
}
Ok(cargo_metadata::Message::CompilerMessage(message)) => {
eprintln!("{message}");
}
_ => {}
}
}
@ -377,13 +381,15 @@ fn build_vst(
if !debug {
args.push("--release");
}
let more_args = "-p twinc_emu_vst --no-default-features -F plugin";
let more_args = "-q -p twinc_emu_vst --no-default-features -F plugin";
for arg in more_args.split_whitespace() {
args.push(arg);
}
args.push("-F");
args.push(renderer.as_feature());
eprintln!("building vst...");
nih_plug_xtask::main_with_args("cargo xtask", args.into_iter().map(String::from))?;
eprintln!("\t...complete!");
Ok(())
}