mozilla / cbindgen

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

Fix `..Default::default()` for struct `Config` #911

Closed jschwe closed 5 months ago

jschwe commented 6 months ago

Previously the depfile option added a new private member to the Config struct - a breaking change which many users complained about. Making the field public, but hiding it from the documentation and excluding it from serde reverts the breakage, while keeping the depfile functionality.

I also considered adding an InternalConfig struct, but this would require breaking changes to at least Config::from_file() and Config::from_root_or_default(), which is a lot more invasive than my PR.

Closes #908

jschwe commented 5 months ago

@emilio Any chance you could find some time to review this patch?