RustAudio / coreaudio-sys

Raw bindings to the OSX CoreAudio framework generated by bindgen (see coreaudio-rs for a more rust-esque wrapper).
MIT License
69 stars 38 forks source link

Updated version to 0.2.10 #59

Closed simlay closed 2 years ago

simlay commented 2 years ago

Follow up from #54.

est31 commented 2 years ago
error: reference to packed field is unaligned
 --> /Users/runner/work/coreaudio-sys/coreaudio-sys/target/debug/build/coreaudio-sys-a84fa5dfbcccf0c4/out/coreaudio.rs:3:128047
  |
3 | ...ingify ! (wide))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < wide > ())) . lo as * const _ as usize } , 0usize , concat ...
  |                                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: `#[deny(unaligned_references)]` on by default
  = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
  = note: for more information, see issue #82523 <https://github.com/rust-lang/rust/issues/82523>

Seems kinda serious to me. This is among a ton of warnings. I guess they are all in the bindgen generated tests, at which point it might be interesting to maybe create a bindgen isue (if there isn't one already).

@simlay does cargo test work for you locally?

simlay commented 2 years ago

Seems kinda serious to me. This is among a ton of warnings. I guess they are all in the bindgen generated tests, at which point it might be interesting to maybe create a bindgen isue (if there isn't one already).

@simlay does cargo test work for you locally?

Interesting. Yeah, cargo +nightly test --all-feature fails. This issue is tracked in https://github.com/rust-lang/rust/issues/82523 and https://github.com/rust-lang/rust-bindgen/issues/1651. I think that in rust nightly, that warning is now a hard error. cargo +beta test --all-features does pass though.

Should we choose to do the quick fix of simply removing nightly from CI, I think we will end up with actual errors with rust 1.62 in ~10 weeks.

I can't say that bindgen has always had lots of warnings but as the compiler has grown, it's added more and more warnings to enable better safety and so that's there's so many.

Anyway, it's unclear what the correct work around is as this is explicitly in the generated unit tests.

est31 commented 2 years ago

Oh no, I hope they revert https://github.com/rust-lang/rust/pull/95372 , at least until there is a solution for it on stable.

est31 commented 2 years ago

There aren't any real tests except for the ones generated by bindgen, whose failing is beyond our control, so maybe one can switch to cargo build instead of cargo test in the CI? Personally I believe that they will either revert that PR or fix bindgen, one of the two will happen, or at least I hope. Edit: but until then one has to find a solution, and that could be just doing cargo build.