Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update owo-colors #1611

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

purplesyringa
Copy link

The goal here is to remove a transitive dependency on the deprecated atty crate, which trips cargo deny because it's unmaintained.

This currently does not eliminate the dependency completely, as we're still waiting on color-eyre to release 1, and merging this PR as-is would result in cargo deny being even more angry at using different versions of the same crate, so this PR is a draft for now.

The update is non-trivial because owo-colors no longer supports checking whether stdin supports colors, which is, well, reasonable.

Semantically, this cements the Stream trait as something that can be printed onto, rather than a generic-purpose stream. Uses of as_tty are replaced with a direct call to the std is_terminal function, and Stream (now called OwoStream) now exclusively handles mapping std I/O streams to owo-colors streams.

The goal here is to remove a transitive dependency on the deprecated
`atty` crate, which trips `cargo deny` because it's unmaintained.

This currently does not eliminate the dependency completely, as we're
still waiting on `color-eyre` to release [1], and merging this PR as-is
would result in `cargo deny` being even more angry at using different
versions of the same crate, so this PR is a draft for now.

The update is non-trivial because `owo-colors` no longer supports
checking whether stdin supports colors, which is, well, reasonable.

Semantically, this cements the `Stream` trait as something that can be
printed onto, rather than a generic-purpose stream. Uses of `as_tty` are
replaced with a direct call to the `std` `is_terminal` function, and
`Stream` (now called `OwoStream`) now exclusively handles mapping `std`
I/O streams to `owo-colors` streams.

[1]: eyre-rs/eyre#215
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant