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

Re-exports of items from own crate cannot be semver-checked #2

Closed
obi1kenobi opened this issue Jul 15, 2022 · 4 comments
Closed

Re-exports of items from own crate cannot be semver-checked #2

obi1kenobi opened this issue Jul 15, 2022 · 4 comments

Comments

@obi1kenobi
Copy link
Owner

Unfortunately, rustdoc JSON output does not seem to output re-export information in paths, so we don't seem to be able to get information on re-exports which we can query for semver issues.

Upstream tracking issue: rust-lang/rust#93522

@obi1kenobi
Copy link
Owner Author

Other related issues worth tracking:
rust-lang/rust#94336
rust-lang/rust#94338
rust-lang/rust#88758

@obi1kenobi
Copy link
Owner Author

Mostly resolved by tracking import items directly and reconstructing visibility rules and paths. Glob imports are still not supported, tracked by #34.

@mqudsi
Copy link

mqudsi commented Sep 1, 2022

I'm not sure if this is resolved (or if I'm misunderstanding your original issue and I need to file this as something else).

If a crate re-exports a type or trait from a dependency as part of its public api and that re-exported type suffers from semver-incompatible changes, cargo-semver-checks currently still reports the release as passing. (no glob import involved)

I can provide a (real world) example if need be.

@obi1kenobi obi1kenobi changed the title Re-exports of items cannot be semver-checked Re-exports of items from own crate cannot be semver-checked Sep 1, 2022
@obi1kenobi
Copy link
Owner Author

Hi! This issue was meant for re-exports that stay within one's own crate, and I've renamed it as such — thanks for pointing out the confusion.

What you're describing is definitely worth opening a new issue for. cargo-semver-checks currently makes no effort to scan anything coming from outside the one crate it's looking at at any given time. But this sounds like a worthwhile feature and I'd appreciate it if you could open an "enhancement" issue and include the real-world example you have found — it would help a lot!

staniewzki referenced this issue in tonowak/cargo-semver-check Nov 14, 2022
Signed-off-by: Michał Staniewski <m.staniewzki@gmail.com>
staniewzki referenced this issue in tonowak/cargo-semver-check Nov 14, 2022
Signed-off-by: Michał Staniewski <m.staniewzki@gmail.com>
obi1kenobi pushed a commit that referenced this issue Feb 25, 2023
* Add failing Windows test to CI (#2)

* Remove trailing whitespaces.

* Explain removing the index

* Add caching (#3)

* Convert slashes to back-slashes (#4)

* Bump crates-index version to 0.19.6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants