refactor(cli): Replace tracing-indicatif with shared MultiProgress

tracing-indicatif pulled in vt100, arrayvec, and its own indicatif
integration layer. Replace it with a minimal SuspendingWriter that
coordinates tracing output with progress bars via a global LazyLock
MultiProgress.

- Add src/cli/progress.rs: shared MultiProgress singleton via LazyLock
  and a SuspendingWriter that suspends bars before writing log lines,
  preventing interleaving/flicker
- Wire all progress bar creation through multi().add() in sync and
  ingest commands
- Replace IndicatifLayer in main.rs with SuspendingWriter for
  tracing-subscriber's fmt layer
- Remove tracing-indicatif from Cargo.toml (drops vt100 and arrayvec
  transitive deps)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Taylor Eernisse
2026-02-03 17:36:31 -05:00
parent a92e176bb6
commit c35f485e0e
6 changed files with 125 additions and 48 deletions

View File

@@ -41,21 +41,20 @@ async fn main() {
libc::signal(libc::SIGPIPE, libc::SIG_DFL);
}
// Initialize logging with indicatif support for clean progress bar output
let indicatif_layer = tracing_indicatif::IndicatifLayer::new();
// Initialize logging with progress-bar-aware writer.
// SuspendingWriter suspends the shared MultiProgress before each log line,
// preventing log output from interleaving with progress bar animations.
tracing_subscriber::registry()
.with(
tracing_subscriber::fmt::layer()
.with_target(false)
.with_writer(indicatif_layer.get_stderr_writer()),
.with_writer(lore::cli::progress::SuspendingWriter),
)
.with(
EnvFilter::from_default_env()
.add_directive("lore=info".parse().unwrap())
.add_directive("warn".parse().unwrap()),
)
.with(indicatif_layer)
.init();
let cli = Cli::parse();