cargo-semver-checks
cargo-semver-checks copied to clipboard
Unsatisfactory UX when items are no longer importable by the old path
Consider the following code, in an imaginary lib
crate.
pub mod foo {
pub struct Bar;
}
pub use foo::Bar;
Bar
is now importable both directly as lib::Bar
and as lib::foo::Bar
. If one of these import paths becomes unavailable in a future release, that's a breaking change.
I believe (but haven't verified) that this should get caught by the current checks, but the error message will be misleading: it will say that the item was removed or renamed, and will not provide the import path that stopped being available.
There is currently a test case that non-breaking moves do not cause false-positive errors. We'll also need a test that breaking moves and import changes cause true-positive errors with a good error message.