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
Our cargo semver-checks CI steps currently fail for libp2p-dcutr and libp2p-relay, even though neither of them merged any changes since the last libp2pv0.50.0 release.
I was able to replicate the issue locally. The generated rustdoc for libp2p-dcutr at first glance doesn't seem to have anything out of place. I spot-checked one of the enums and variants that reported an error, and they were present in both the baseline and current rustdoc with identical IDs and reasonable-looking data.
This issue needs further triage.
The text was updated successfully, but these errors were encountered:
Unfortunately, I found that this is because of a combination of renaming re-exports causing confusion between multiple enums with the same name. For example, a pub enum UpgradeError exists in all of:
The false-positives happen because the lint tries to match up all the variants across different enums, which obviously isn't going to do the right thing.
cargo-semver-checks doesn't currently handle re-export renames (and re-exports are already tricky because of the possibility of having infinitely many re-exported names for each item: #152 ), so this isn't a trivial fix.
That said, it's still important to fix and this should be sufficient motivation to come up with a permanent solution to the re-exports problem :)
obi1kenobi
changed the title
False-positives for libp2p-dcutr and libp2p-relay when the crates haven't changed
False-positives due to renaming re-exports + name collisions in the same crate
Dec 7, 2022
It's tempting to use the canonical_path edge instead of importable_path edge in the affected lints. Right now, this wouldn't work, since re-exported items do not currently have a canonical_path available, since that path uses the rustdoc index information which currently does not include re-exported items.
Originally posted by @mxinden in libp2p/rust-libp2p#2647 (comment)
I was able to replicate the issue locally. The generated rustdoc for
libp2p-dcutr
at first glance doesn't seem to have anything out of place. I spot-checked one of the enums and variants that reported an error, and they were present in both the baseline and current rustdoc with identical IDs and reasonable-looking data.This issue needs further triage.
The text was updated successfully, but these errors were encountered: