-
-
Notifications
You must be signed in to change notification settings - Fork 79
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 for removed feature from Cargo.toml
#1070
Comments
This is actually a true positive: the optional crate and implicit feature are named Proof:
If you remove the optional crate, the implicit feature If anything, I wish |
Oh wow! Thanks for the investigation and sorry for the bug report! Could |
No worries at all. It took me a while to spot the problem too, it's definitely a sneaky one. I also thought "Features that differ only in a single confusable character" seems like it would be a good lint candidate for clippy or cargo too, as it's a good warning completely independent of versioning. I've opened an issue in clippy suggesting this lint, and so we should see what clippy folks think before deciding on our own next step: rust-lang/rust-clippy#13969 |
Awesome! Yeah I agree that it would be good to prevent such duplicated features in the first place! That is likely the best direction to go in here. If not added in clippy, it could be added in |
Yes, definitely a good candidate as a potential semver hazard and we have a number of those kinds of lints in the wish list at #5. I'll add this one as well. |
Which lint or lints are the issue
feature_missing
Known issues that might be causing this
Steps to reproduce the bug with the above code
See https://github.com/firezone/boringtun/actions/runs/12651147994/job/35251141325?pr=45.
Actual Behaviour
It appears that when removing an
optional
crate,cargo-semver-checks
thinks that the entire feature is gone when in fact it is still there but doesn't activate any optional crates any more.Expected Behaviour
Removing an optional crate but keeping the feature flag should be semver-compatible
Verbose Lint Output
Generated System Information
System information:
Software version
cargo-semver-checks 0.38.0
Operating system
Linux 6.12.8
Command-line
cargo version
Compile time information
Cargo build configuration:
Please file an issue on GitHub reporting your bug.
Consider adding the diagnostic information above, either manually or automatically through the link below:
https://github.com/obi1kenobi/cargo-semver-checks/issues/new?labels=C-bug&template=3-bug-report.yml&sys-info=%23%23%23%23%20Software%20version%0A%0Acargo-semver-checks%200.38.0%0A%0A%23%23%23%23%20Operating%20system%0A%0ALinux%206.12.8%0A%0A%23%23%23%23%20Command-line%0A%0A%60%60%60bash%0A%2Fnix%2Fstore%2Fhgr8sg2c0dj0jlmm0r7n3faclwjwxx3n-cargo-semver-checks-0.38.0%2Fbin%2Fcargo-semver-checks%20semver-checks%20--bugreport%20%0A%60%60%60%0A%0A%23%23%23%23%20cargo%20version%0A%0A%60%60%60%0A%3E%20cargo%20-V%20%0Acargo%201.83.0%20%285ffbef321%202024-10-29%29%0A%60%60%60%0A%0A%23%23%23%23%20Compile%20time%20information%0A%0A-%20Profile%3A%20release%0A-%20Target%20triple%3A%20x86_64-unknown-linux-gnu%0A-%20Family%3A%20unix%0A-%20OS%3A%20linux%0A-%20Architecture%3A%20x86_64%0A-%20Pointer%20width%3A%2064%0A-%20Endian%3A%20little%0A-%20CPU%20features%3A%20fxsr%2Csse%2Csse2%0A-%20Host%3A%20x86_64-unknown-linux-gnu%0A%0A&build-config=
Build Configuration
No response
Additional Context
No response
The text was updated successfully, but these errors were encountered: