From 291d21748f159b1628d50354ab48de8f7457e960 Mon Sep 17 00:00:00 2001 From: Micha Reiser Date: Mon, 21 Jul 2025 16:25:00 +0200 Subject: [PATCH] [ty] Add warning for unknown `TY_MEMORY_REPORT` value --- crates/ty/src/lib.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/crates/ty/src/lib.rs b/crates/ty/src/lib.rs index f3a0bdaf26872..8a0c5b9fcd590 100644 --- a/crates/ty/src/lib.rs +++ b/crates/ty/src/lib.rs @@ -156,7 +156,12 @@ fn run_check(args: CheckCommand) -> anyhow::Result { Ok("short") => write!(stdout, "{}", db.salsa_memory_dump().display_short())?, Ok("mypy_primer") => write!(stdout, "{}", db.salsa_memory_dump().display_mypy_primer())?, Ok("full") => write!(stdout, "{}", db.salsa_memory_dump().display_full())?, - _ => {} + Ok(other) => { + tracing::warn!( + "Unknown value for `TY_MEMORY_REPORT`: `{other}`. Valid values are `short`, `mypy_primer`, and `full`." + ); + } + Err(_) => {} } std::mem::forget(db);