eminence / procfs

Rust library for reading the Linux procfs filesystem
Other
358 stars 105 forks source link

Fix build error with backtrace feature enabled #309

Closed mbrubeck closed 2 months ago

mbrubeck commented 2 months ago

The procfs/backtrace feature needs the procfs-core/backtrace feature.

mbrubeck commented 2 months ago

This fixes the following build error:

$ cargo build -p procfs --features backtrace
   Compiling procfs v0.16.0 (/home/mbrubeck/src/tmp/procfs/procfs)
error[E0560]: struct `procfs_core::InternalError` has no field named `backtrace`
  --> procfs/src/process/namespaces.rs:24:43
   |
24 | ..._err(|_| build_internal_error!(format!("Unable to get ns dir entry")))?;
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `procfs_core::InternalError` does not have this field
   |
   = note: all struct fields are already assigned
   = note: this error originates in the macro `build_internal_error` (in Nightly builds, run with -Z macro-backtrace for more info)

reported at https://users.rust-lang.org/t/ant-compile-memflow-qemu-crate/111463

eminence commented 2 months ago

I'm slightly embarrassed this basic issue wasn't caught by CI. I'll try to get this released soon. Thank you!