rust-bindgen icon indicating copy to clipboard operation
rust-bindgen copied to clipboard

(Almost) every `cargo` invocation rebuilds bindgen and all its downstream dependencies

Open glittershark opened this issue 4 years ago • 5 comments

I'm really not sure where to go with this one - is it a cargo issue? a bindgen issue? an issue with my local setup? If it's the last, I'm not sure how I'd begin debugging it - I haven't seen if there's anything within cargo that'll allow you to ask it to tell you why a crate is rebuilding (besides https://github.com/rust-lang/cargo/issues/2904, which doesn't really seem to give me much to go on).

All that said, I have a project that depends on rocksdb, which depends on librocksdb-sys, which uses bindgen, and having to recompile librocksdb-sys every time I run cargo test is getting to be quite a lot.

glittershark avatar Sep 08 '21 20:09 glittershark

Did you ever have any more luck diagnosing this? Just added a dependency that uses 0.59.1, and now I'm seeing the exact same behavior. I can't downgrade bindgen in a fork of that dependency, unfortunately.

I'll scrap the feature that needed the upgraded bindgen for now.

Thanks.

ndarilek avatar Sep 29 '21 14:09 ndarilek

No, unfortunately this is still happening for me

glittershark avatar Sep 29 '21 15:09 glittershark

This is still happening to me almost 3 years later, so I guess this issue isn't encountered by everyone? I'd like to help, but I have no idea how to diagnose this.

TristanCottam avatar Jun 27 '24 08:06 TristanCottam

is there any other detail that might be relevant to reproduce this? I created a crate with rocksdb as a dependency and running cargo test after changing a test file won't trigger a rebuild in my case.

pvdrz avatar Jun 27 '24 16:06 pvdrz

It happens to me too in the project sherpa-rs

thewh1teagle avatar Jul 06 '24 06:07 thewh1teagle