mozilla / cbindgen

A project for generating C bindings from Rust code
Mozilla Public License 2.0
2.37k stars 305 forks source link

Incorrect (outdated?) `fetch_all_dependencies` config suggestion #936

Closed rockboynton closed 1 month ago

rockboynton commented 6 months ago

When parsing deps fails I get the following suggestions:

Parsing crate `strum_macros`: can't find lib.rs with `cargo metadata`. The crate may be available only on a particular platform, so consider setting `fetch_all_dependencies` in your cbindgen configuration.

fetch_all_dependencies doesn't appear anywhere in the codebase besides this error message currently.

emilio commented 5 months ago

Ugh, yeah, so this is from 93c06c5c9d319f481788c9670700097b4e46d270. The warning mentions the original option name, but it landed with the name flipped (only_target_dependencies) and off-by-default, and I overlooked that when reviewing.

So the (bad?) news is that unless you're using only_target_dependencies=true that's not the source of the problem.

So:

Thanks!

rockboynton commented 5 months ago

Hi, @emilio, thank you for looking in to this.

You're correct that it wasn't actually the source of the problem, and I don't have this issue anymore 🤷🏻‍♂️ so I don't remember the cause...maybe someone else will into a similar issue and can comment, or I will if I see this again

emilio commented 1 month ago

Let's close for now, if someone runs into it again we can reopen.