Skip to content

🥅💄 Add color highlights to parse error details (default honors NO_COLOR)#609

Merged
nevans merged 3 commits intomasterfrom
response_parse_error-detailed_message-color-highlights
Feb 13, 2026
Merged

🥅💄 Add color highlights to parse error details (default honors NO_COLOR)#609
nevans merged 3 commits intomasterfrom
response_parse_error-detailed_message-color-highlights

Conversation

@nevans
Copy link
Collaborator

@nevans nevans commented Feb 13, 2026

Adding colors makes it much faster/easier for me to read and understand detailed debug messages. Of all the exception classes in net-imap, this one benefits the most from some extra formatting, IMO.

When ENV["NO_COLOR"] is not empty, highlights are monochromatic by default (only uses bold and underline).

Adding colors makes it much faster/easier for me to read and understand
detailed debug messages.  Of all the exception classes in net-imap, this
one benefits the most from some extra formatting, IMO.

When `ENV["NO_COLOR"]` is not empty, highlights are monochromatic by
default (only uses bold and underline).
Iterating on the prior highlighting approach, this a tidy solution to
the problem of only resetting what needs to be reset.  Specifically, I'd
like to add color highlighting, while keeping the NO_COLOR highlighting,
and I don't want to add a bunch of redundant reset sequences.

This is still annoyingly complex (and adding ractor support makes it
much worse), but I think it still comes out as simpler than the other
approaches I looked at.
This adds more distinct highlighting types, for color highlighting.
Monochrome highlighting simply ignores types it hasn't defined.
@nevans nevans force-pushed the response_parse_error-detailed_message-color-highlights branch from 217f9da to 8ed8949 Compare February 13, 2026 14:44
@nevans nevans merged commit 094d616 into master Feb 13, 2026
39 checks passed
@nevans nevans deleted the response_parse_error-detailed_message-color-highlights branch February 13, 2026 14:56
@nevans nevans added the enhancement New feature or request label Feb 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant