andrewdavidmackenzie / libproc-rs

A rust library for getting information about running processes for Mac and Linux
MIT License
57 stars 17 forks source link

Doesn't compile on latest macOS nightly #142

Closed CryZe closed 3 months ago

CryZe commented 3 months ago

rust version 1.81.0-nightly (bcf94dec5 2024-06-23)

Error:

error: expected one of `!` or `::`, found keyword `static`
Error:  --> /Users/runner/work/livesplit-core/livesplit-core/target/aarch64-apple-darwin/debug/build/libproc-b1136142c2e7f016/out/osx_libproc_bindings.rs:3:11
  |
3 | rewriting static
  |           ^^^^^^ expected one of `!` or `::`

error[E0432]: unresolved import `crate::osx_libproc_bindings::proc_bsdinfo`
Error:  --> /Users/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libproc-0.14.8/src/libproc/bsd_info.rs:3:9
  |
3 | pub use crate::osx_libproc_bindings::proc_bsdinfo as BSDInfo;
  |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `proc_bsdinfo` in `osx_libproc_bindings`
  |
help: consider importing this struct instead
  |
3 | pub use libc::proc_bsdinfo as BSDInfo;
  |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

[...]

Seems like bindgen fails and it generates some garbage rs file instead.

CryZe commented 3 months ago

Seems like you have daily builds in your CI, so this should reproduce for you on today's run as well. I specifically also didn't see this problem in the 2024-06-23 build of the Rust compiler.

CryZe commented 3 months ago

Seems to be caused by this: https://github.com/rust-lang/rustfmt/issues/6210

CryZe commented 3 months ago

Closing because they already fixed it and it should work again tomorrow.

andrewdavidmackenzie commented 3 months ago

Let's see!