diwic / alsa-rs

Thin but safe ALSA wrappers for Rust
Apache License 2.0
139 stars 66 forks source link

Please yank 0.5.1 and release as 0.6.0 #81

Closed taiki-e closed 3 years ago

taiki-e commented 3 years ago

The nix dependency version has been updated in 0.5.1 (https://github.com/diwic/alsa-rs/commit/c444589a8398d365c77c07558ac1d9a8ee528a4e), but the nix's types are used in the public API of alsa, so this breaks downstreams such as cpal.

error[E0308]: mismatched types
   --> /home/parallels/.cargo/registry/src/github.com-1ecc6299db9ec823/cpal-0.13.4/src/host/alsa/mod.rs:245:26
    |
244 |         let handle = match handle_result {
    |                            ------------- this expression has type `std::result::Result<host::alsa::alsa::PCM, (host::alsa::alsa::Error, Option<host::alsa::alsa::nix::errno::Errno>)>`
245 |             Err((_, Some(nix::errno::Errno::EBUSY))) => {
    |                          ^^^^^^^^^^^^^^^^^^^^^^^^ expected enum `host::alsa::alsa::nix::errno::Errno`, found enum `nix::errno::Errno`
    |
    = note: perhaps two different versions of crate `nix` are being used?
ThatOneCalculator commented 3 years ago

Lmao I love how many things this instantly broke

diwic commented 3 years ago

Okay, I'll do this later today, but there is a re-export of nix::error in the Alsa crate just because one should not depend on the nix dependency being a specific version.

taiki-e commented 3 years ago

I'll do this later today

❤️

there is a re-export of nix::error in the Alsa crate just because one should not depend on the nix dependency being a specific version.

If nix changed the error-related APIs it could break the downstream anyway, so I think that wouldn't necessarily be enough as a workaround for such a problem.

diwic commented 3 years ago

Yanked now.

diwic commented 3 years ago

Released 0.6.0 now (with bumped dependencies all over).