Open JonathanWoollett-Light opened 10 months ago
RFC #3516 (public/private dependencies) was merged,^1
which will help users identify when they leak their dependencies in their public API, helping prevent unintentional breaking changes. This is behind cargo-features = ["public-dependency"]. A good amount of the implementation was done as part of the superseded RFC #1977.
https://doc.rust-lang.org/cargo/reference/unstable.html#public-dependency:
Tracking Issue: [#44663](https://github.com/rust-lang/rust/issues/44663)
The ‘public-dependency’ feature allows marking dependencies as ‘public’ or ‘private’. When this feature is enabled, additional information is passed to rustc to allow the ‘exported_private_dependencies’ lint to function properly.
This requires the appropriate key to be set in cargo-features:
cargo-features = ["public-dependency"] [dependencies] my_dep = { version = "1.2.3", public = true } private_dep = "2.0.0" # Will be 'private' by default
Add a test using cargo-semver-checks to enforce semver.
This will require: