You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Change to the created testing folder and edit src/lib.rs so it contains the following:
pubstructWrapper(pubi32);
Create a commit:
git add .&& git commit -m "Initial commit"
Change the type from i32 to f32
Run semver checks:
cargo semver-checks check-release --baseline-rev HEAD
(Bonus) Transform Wrapper into a unit type and perform semver checks again.
Actual Behaviour
A breaking change should be detected, but the the semver check passes successfully. It should be a breaking change because the field is pub. It is worth noting that using a named struct correctly triggers the semver checks.
Needless to say, removing the inner field from the tuple is breaking, and tests pass as well.
Expected Behaviour
cargo-semver-checks should raise a breaking issue.
Same reasoning as here, we don't yet have a lint for this yet but it's already part of the tracking issue: #5
It's additionally blocked on #149, which is possible to fix but requires probably a month or two of focused work to put all the prerequisites in.
This issue isn't a great one to get started with, but if you're interested in contributing to the project by writing lints, adding test cases for missing lints, etc. I'd be happy to point you to something that'd be a good on-ramp!
Steps to reproduce the bug with the above code
Create a new testing lib crate:
Change to the created
testing
folder and editsrc/lib.rs
so it contains the following:Create a commit:
Change the type from
i32
tof32
Run semver checks:
(Bonus) Transform
Wrapper
into a unit type and perform semver checks again.Actual Behaviour
A breaking change should be detected, but the the semver check passes successfully. It should be a breaking change because the field is
pub
. It is worth noting that using a named struct correctly triggers the semver checks.Needless to say, removing the inner field from the tuple is breaking, and tests pass as well.
Expected Behaviour
cargo-semver-checks
should raise a breaking issue.Generated System Information
Software version
cargo-semver-checks 0.20.0 (cf03e7f)
Operating system
Linux 6.2.13-arch1-1
Command-line
cargo version
Compile time information
Build Configuration
Should not be relevant, but here the
~/.cargo/config.toml
:Additional Context
The issue has been discovered while exploring issue #447.
CC @lu-zero
The text was updated successfully, but these errors were encountered: