Skip to content

Conversation

@purplesyringa
Copy link
Contributor

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
@neuschaefer
Copy link
Contributor

neuschaefer commented Sep 25, 2025

color-eyre 0.6.4 (and 0.6.5) has by now been released, so I think it's possible to make new progress here.

Meanwhile cargo-deny is also warning about the now-deprecated adler crate, which is also pulled in via color-eyre. The right version of backtrace to get adler2 but retain a low enough MSRV is 0.3.74

@Emilgardis
Copy link
Member

msrv can be bumped freely :)

github-merge-queue bot pushed a commit that referenced this pull request Sep 26, 2025
This PR is based on #1611 and uses @purplesyringa's work mostly
unmodified. In addition, I have updated the minimum set of crates to get
to a working and consistent state, esp. w.r.t. cargo-deny.

I didn't update *all* the dependencies, in order to do "one thing at a
time" and to avoid creating an undebuggable mess.
@purplesyringa
Copy link
Contributor Author

Since #1708 was merged, I'm closing this. Thanks everyone!

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.

3 participants