-
-
Notifications
You must be signed in to change notification settings - Fork 75
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
False positive: baseline rustdoc built from registry version only includes default features #147
Comments
@epage is loading the list of features from the index and adding it to the dependency line a good idea? Or is it better to try to match the crate version to a tag in the git repo using a set of heuristics like I don't fully understand the code around there — especially how we manage to get a crate's rustdoc by making a new manifest by declaring a dependency on it — so I'd love your take on how to go about this. |
Ideally we'd centralize our handling of features (
When we run rustdoc, we pass in |
I think that I was able to confirm by hand that the following sequence works:
That's my plan for moving forward since it seems to work well. |
When
cargo-semver-checks
constructs a baseline rustdoc JSON file, it (implicitly) activates the default features only. The "current" rustdoc is instead constructed with--all-features
.If a feature e.g. adds an enum variant, that variant is detected as being newly-added: exists in current, does not in baseline. This causes false-positive semver errors.
Example affected crate:
libp2p-core v0.37.0
The equivalent call using
--baseline-rev
reports no errors:cargo semver-checks check-release -p libp2p-core --baseline-rev libp2p-core-v0.37.0
Additional info:
cargo semver-checks
libp2p/rust-libp2p#2647cargo semver-checks
libp2p/rust-libp2p#2647 (comment)The text was updated successfully, but these errors were encountered: