Skip to content

Conversation

@d-ronnqvist
Copy link
Contributor

Bug/issue #, if applicable: rdar://109177620

Summary

This adds a warning when an article's output JSON file would override the output JSON file of a symbol. To get a deterministic behavior across builds, DocC favors the symbol over the article.

Other tests that verify behavior that happens earlier than the JSON rendering need to be modified to expect this behavior until rdar://79745455 / #593 is fixed.

Dependencies

None

Testing

In a project with some symbol documentation:

  • Add an article with the same file name (except the file extension) as one of the top-level symbols.
  • Build documentation
    • There should be a warning about the article colliding with the symbol, suggesting to rename the article
    • The rendered documentation should contain the symbol page but not the article page (until it's renamed)

Checklist

Make sure you check off the following items. If they cannot be completed, provide a reason.

  • Added tests
  • Ran the ./bin/test script and it succeeded
  • Updated documentation if necessary

Copy link
Contributor

@patshaughnessy patshaughnessy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good 👍

Should we make this warning an error instead? Dropping an article entirely is a fairly dramatic problem, and maybe the author would miss the warning otherwise? ...for example if a Symbol was later introduced that happened to have the same name as an existing article?

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

Successfully merging this pull request may close these issues.

2 participants