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

Unsatisfactory UX when items are no longer importable by the old path #35

Open
obi1kenobi opened this issue Aug 7, 2022 · 0 comments
Open
Labels
A-lint Area: new or existing lint C-bug Category: doesn't meet expectations E-help-wanted Call for participation: Help is requested to fix this issue.

Comments

@obi1kenobi
Copy link
Owner

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.

@epage epage added A-lint Area: new or existing lint C-bug Category: doesn't meet expectations E-help-wanted Call for participation: Help is requested to fix this issue. labels Aug 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-lint Area: new or existing lint C-bug Category: doesn't meet expectations E-help-wanted Call for participation: Help is requested to fix this issue.
Projects
None yet
Development

No branches or pull requests

2 participants