From 17e4bf92c09c151cd59f2721127da5f6cccd64f3 Mon Sep 17 00:00:00 2001 From: Will Lillis Date: Mon, 4 May 2026 23:33:42 -0400 Subject: [PATCH] fix(cli): account for process versions > 5 in the parse command's pretty debug output. The initial implementation of `--debug pretty` assumed process version was bounded by `MAX_VERSION_COUNT`. However, we also have to account for `MAX_VERSION_COUNT_OVERFLOW` as well as `halted_version_count`. (cherry picked from commit 5cac4316dbc167f3a75b1dccfa4edd9983798ff5) --- crates/cli/src/parse.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/crates/cli/src/parse.rs b/crates/cli/src/parse.rs index 26020f2c1..52a4f6616 100644 --- a/crates/cli/src/parse.rs +++ b/crates/cli/src/parse.rs @@ -306,13 +306,13 @@ pub fn parse_file_at_path( } writeln!(&mut io::stderr(), "{message}").unwrap(); } else { + #[rustfmt::skip] let colors = &[ - AnsiColor::White, - AnsiColor::Red, - AnsiColor::Blue, - AnsiColor::Green, - AnsiColor::Cyan, - AnsiColor::Yellow, + AnsiColor::White, AnsiColor::Red, AnsiColor::Blue, AnsiColor::Green, + AnsiColor::Cyan, AnsiColor::Yellow, AnsiColor::Magenta, + AnsiColor::BrightWhite, AnsiColor::BrightRed, AnsiColor::BrightBlue, + AnsiColor::BrightGreen, AnsiColor::BrightCyan, AnsiColor::BrightYellow, + AnsiColor::BrightMagenta, ]; if message.starts_with("process version:") { let comma_idx = message.find(',').unwrap(); @@ -321,7 +321,7 @@ pub fn parse_file_at_path( .unwrap(); } let color = if use_color { - Some(colors[curr_version]) + Some(colors[curr_version % colors.len()]) } else { None };