Trying to build crossterm 0.28.0 from crates.io leads to failures related to signal-hook-mio missing the support-v0_8 feature (and instead having support-v1_0).
Looking at the Cargo.toml from the crate downloaded from crates.io, it indeed differs from the one in this repository.
diff -w <(
# The version from the git repo
curl -sL https://raw.githubusercontent.com/crossterm-rs/crossterm/0.28/Cargo.toml
) <(
# The version from crates.io
curl -sL 'https://crates.io/api/v1/crates/crossterm/0.28.0/download' |
tar Oxzf - crossterm-0.28.0/Cargo.toml.orig
)
84,86c84,86
< mio = { version = "0.8", features = ["os-poll"], optional = true }
< signal-hook-mio = { version = "0.2.3", features = [
< "support-v0_8",
---
> mio = { version = "1.0", features = ["os-poll"], optional = true }
> signal-hook-mio = { version = "0.2.4", features = [
> "support-v1_0",
93c93
< tokio = { version = "1.25", features = ["full"] }
---
> tokio = { version = "1.39", features = ["full"] }
Describe the bug
Trying to build crossterm 0.28.0 from crates.io leads to failures related to
signal-hook-mio
missing thesupport-v0_8
feature (and instead havingsupport-v1_0
).Looking at the
Cargo.toml
from the crate downloaded from crates.io, it indeed differs from the one in this repository.The rest of the archive matches the current repository, only
Cargo.toml
andCargo.lock
differ. So essentially it switched mio from 0.8 to 1.0 inCargo.toml
, but did not actually change the code to support mio 1.0: https://github.com/crossterm-rs/crossterm/blob/5d50d8da62c5e034ef8b2787a771a2c0f9b3b2f9/src/event/source/unix/mio.rs#L4To Reproduce
Output:
Expected behavior
Build succeeds.
Yanking 0.28.0 (or not? it doesn't build, but it's not exactly dangerous) and re-publishing the current git head as 0.28.1 would solve this issue.
Workaround
The
use-dev-tty
feature sounds like it could help by using rustix instead of mio, but it fails also for a different reason (#905).OS
Terminal/Console