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

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

Closed
skrap opened this issue Feb 23, 2022 · 4 comments
Closed

Comments

@skrap
Copy link
Contributor

skrap commented Feb 23, 2022

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

Ref: nix-rust/nix@475da53

To reproduce:

  • change nix dependency to nix = { git = "https://github.com/nix-rust/nix.git", branch = "master" }
  • cargo build

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
Copy link
Owner

lucab commented Feb 23, 2022

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. nix-rust/nix#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
Copy link
Owner

lucab commented Feb 24, 2022

@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.

@lucab lucab changed the title Build fails with nix master branch Breaking changes upcoming for nix API (current master branch, future 0.24) Feb 24, 2022
skrap added a commit to skrap/libsystemd-rs that referenced this issue Feb 24, 2022
@skrap
Copy link
Contributor Author

skrap commented Feb 24, 2022

Done! See #108

@swsnr
Copy link
Collaborator

swsnr commented May 27, 2022

Closing since the upgrade was merged

@swsnr swsnr closed this as completed May 27, 2022
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

No branches or pull requests

3 participants