git.delta.rocks / jrsonnet / refs/commits / a1a72ceb9060

difftreelog

feat reenable indicatif, since the eaten line was fixed

Lach2025-03-29parent: #4e5d91e.patch.diff
in: trunk

3 files changed

modifiedcmds/fleet/Cargo.tomldiffbeforeafterboth
--- a/cmds/fleet/Cargo.toml
+++ b/cmds/fleet/Cargo.toml
@@ -49,6 +49,7 @@
 fleet-base = { version = "0.1.0", path = "../../crates/fleet-base" }
 
 [features]
+default = ["indicatif"]
 # Not quite stable
 indicatif = [
 	"dep:tracing-indicatif",
modifiedcmds/fleet/src/main.rsdiffbeforeafterboth
--- a/cmds/fleet/src/main.rs
+++ b/cmds/fleet/src/main.rs
@@ -185,10 +185,6 @@
 #[tokio::main]
 async fn async_main(opts: RootOpts) -> ExitCode {
 	if let Err(e) = main_real(opts).await {
-		// If I remove this line, the next error!() line gets eaten.
-		// This is a bug in indicatif, it needs to be fixed
-		#[cfg(feature = "indicatif")]
-		info!("fixme: this line gets eaten by tracing-indicatif on levels info+");
 		error!("{e:#}");
 		return ExitCode::FAILURE;
 	}
modifiedcrates/fleet-base/src/opts.rsdiffbeforeafterboth
6 sync::{Arc, Mutex},6 sync::{Arc, Mutex},
7};7};
88
9use anyhow::Result;9use anyhow::{Context, Result};
10use clap::Parser;10use clap::Parser;
11use nix_eval::{nix_go, util::assert_warn, NixSessionPool, Value};11use nix_eval::{nix_go, util::assert_warn, NixSessionPool, Value};
12use nom::{12use nom::{
197 let mut fleet_data_path = directory.clone();197 let mut fleet_data_path = directory.clone();
198 fleet_data_path.push("fleet.nix");198 fleet_data_path.push("fleet.nix");
199 let bytes = std::fs::read_to_string(fleet_data_path)?;199 let bytes =
200 std::fs::read_to_string(fleet_data_path).context("reading fleet state (fleet.nix)")?;
200 let data: Mutex<FleetData> = nixlike::parse_str(&bytes)?;201 let data: Mutex<FleetData> = nixlike::parse_str(&bytes)?;
201202
202 let fleet_root = Value::binding(nix_session.clone(), "fleetConfigurations").await?;203 let fleet_root = Value::binding(nix_session.clone(), "fleetConfigurations").await?;