Skip to content

Article reference can collide with top-level symbol #593

Open
@d-ronnqvist

Description

@d-ronnqvist

Description

If a catalog is named the same as the module and an article is named the same as a top-level symbol, then the article and the symbol both get the same ResolvedTopicReferences and DocC only emits a page for the article.

rdar://109177620

Checklist

  • If possible, I've reproduced the issue using the main branch of this package.
  • This issue hasn't been addressed in an existing GitHub issue.

Expected Behavior

The ResolvedTopicReferences should contain disambiguation so that nothing every page has a unique reference. Both pages should be emitted.

Actual behavior

Only the article page is emitted.

Steps To Reproduce

  1. Create a DocC catalog with the same name as the module it documents
  2. Create an article—not a documentation extension—and name it the same as one of the top-level symbols in the module
  3. Curate the article
  4. Build documentation and inspect the content of the output. There won't be a json file for the symbol.

Swift-DocC Version Information

At least a few versions back (5.5)

Swift Compiler Version Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions