Skip to content

Checking recursive item re-exports #152

@obi1kenobi

Description

@obi1kenobi

Modules are allowed to re-export themselves, leading to infinite recursive expansion of the paths by which their items are importable. Plausibly, one can probably construct more complex (e.g. co-recursive) cases as well.

Playground link by @aDotInTheVoid:
https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=95e2b6a2d02c2c1d012202ff9d6c1932

cargo public-api handles recursive re-exports:
rust-lang/rust#103085 (comment)

We may need to tweak the schema, implementation, and some of the queries to properly support recursive re-exports. Right now, it's possible that the infinite recursive expansion may cause an infinite loop or OOM error when running cargo-semver-checks.

More info here:
rust-lang/rust#103085 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: doesn't meet expectationsC-enhancementCategory: raise the bar on expectations

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions