Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add cargo-semver-checks #135

Open
3 tasks
JonathanWoollett-Light opened this issue Sep 18, 2023 · 1 comment
Open
3 tasks

Add cargo-semver-checks #135

JonathanWoollett-Light opened this issue Sep 18, 2023 · 1 comment
Labels
good first issue Good for newcomers

Comments

@JonathanWoollett-Light
Copy link

JonathanWoollett-Light commented Sep 18, 2023

Add a test using cargo-semver-checks to enforce semver.

This will require:

@epilys
Copy link
Member

epilys commented Jan 3, 2024

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:

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

Footnotes

  1. https://blog.rust-lang.org/inside-rust/2024/01/03/this-development-cycle-in-cargo-1-76.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants