lucab / libsystemd-rs

A pure-Rust client library to work with systemd
https://crates.io/crates/libsystemd
Other
106 stars 19 forks source link

Breaking changes upcoming for `nix` API (current master branch, future 0.24) #107

Closed skrap closed 2 years ago

skrap commented 2 years ago

It appears that nix has changed the mq_getattr API in the master branch such that libsystemd no longer builds.

Ref: https://github.com/nix-rust/nix/commit/475da53d562293553934d0e579e91f2bf3be30f7

To reproduce:

Result:

   Compiling libsystemd v0.5.0 (/home/skrap/Documents/sense/libsystemd-rs)
error[E0308]: mismatched types
   --> src/activation.rs:195:20
    |
195 |         mq_getattr(*self).is_ok()
    |                    ^^^^^ expected `&MqdT`, found `i32`

For more information about this error, try `rustc --explain E0308`.
error: could not compile `libsystemd` due to previous error

I'm not sure if this is considered a semver issue with nix or a usage issue with libsystemd.

lucab commented 2 years ago

Thanks for the report.

I'm not sure if this is considered a semver issue with nix or a usage issue with libsystemd.

I think it's neither of those. https://github.com/nix-rust/nix/pull/1639 is listed as breaking change in the changelog, so we'll pick up the new API and adapt to it once the next nix version is released.

lucab commented 2 years ago

@skrap if you want to draft a PR for this library using nix master branch, I'll be happy to keep it around until they actually tag a new release. Otherwise I think we can directly close this ticket.

skrap commented 2 years ago

Done! See #108

swsnr commented 2 years ago

Closing since the upgrade was merged