about summary refs log tree commit diff
diff options
context:
space:
mode:
authorVova Kryachko <v.kryachko@gmail.com>2024-11-01T14·57-0400
committerVladimir Kryachko <v.kryachko@gmail.com>2024-11-01T15·30+0000
commit4ec9a4b7dfb7a22fca39715e20f4973d299fd7fa (patch)
tree30fe8fdbae203888ff0cbffb1387bfbb320a9790
parent9e294db8206ee8f8ed99887367222c2197c5c83c (diff)
fix(tvix/tracing): Enable tracing in tvix-build. r/8879
Change-Id: Ica9734d7774da4d5e2a5cacab6b9feb27becc3e2
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12720
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
-rw-r--r--tvix/build/src/bin/tvix-build.rs4
-rw-r--r--tvix/cli/src/main.rs2
-rw-r--r--tvix/tracing/src/lib.rs1
3 files changed, 5 insertions, 2 deletions
diff --git a/tvix/build/src/bin/tvix-build.rs b/tvix/build/src/bin/tvix-build.rs
index cb92f333effb..ffdbc3ca4148 100644
--- a/tvix/build/src/bin/tvix-build.rs
+++ b/tvix/build/src/bin/tvix-build.rs
@@ -50,7 +50,9 @@ enum Commands {
 async fn main() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
     let cli = Cli::parse();
 
-    let _ = tvix_tracing::TracingBuilder::default().enable_progressbar();
+    tvix_tracing::TracingBuilder::default()
+        .enable_progressbar()
+        .build()?;
 
     match cli.command {
         Commands::Daemon {
diff --git a/tvix/cli/src/main.rs b/tvix/cli/src/main.rs
index 338486195e3d..e16127692211 100644
--- a/tvix/cli/src/main.rs
+++ b/tvix/cli/src/main.rs
@@ -57,7 +57,7 @@ fn lint(code: &str, path: Option<PathBuf>, args: &Args) -> bool {
 fn main() {
     let args = Args::parse();
 
-    let _ = tvix_tracing::TracingBuilder::default()
+    tvix_tracing::TracingBuilder::default()
         .enable_progressbar()
         .build()
         .expect("unable to set up tracing subscriber");
diff --git a/tvix/tracing/src/lib.rs b/tvix/tracing/src/lib.rs
index 41f294cf499a..1305778a3d9a 100644
--- a/tvix/tracing/src/lib.rs
+++ b/tvix/tracing/src/lib.rs
@@ -145,6 +145,7 @@ impl TracingHandle {
     }
 }
 
+#[must_use = "Don't forget to call build() to enable tracing."]
 #[derive(Default)]
 pub struct TracingBuilder {
     progess_bar: bool,