-
Notifications
You must be signed in to change notification settings - Fork 128
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
Document how to disambiguate symbol links using type signature information #1095
Document how to disambiguate symbol links using type signature information #1095
Conversation
rdar://136207820
rdar://136207820
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great David. Kind of jealous of the text-graphics skill in some of those examples. And hugely looking forward to this capability in 6.1+, the symbols are hugely easier to understand while writing!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great! 🎉
Sources/docc/DocCDocumentation.docc/linking-to-symbols-and-other-content.md
Outdated
Show resolved
Hide resolved
Sources/docc/DocCDocumentation.docc/linking-to-symbols-and-other-content.md
Outdated
Show resolved
Hide resolved
Sources/docc/DocCDocumentation.docc/linking-to-symbols-and-other-content.md
Outdated
Show resolved
Hide resolved
Symbol paths are case-sensitive, meaning that symbols with the same name in | ||
different text casing don't need disambiguation. | ||
Symbol type suffixes can include a source language identifier prefix---for example, `-swift.enum` instead of `-enum`. | ||
However, the language identifier doesn't disambiguate the link. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it doesn't disambiguate the link, why would someone use this suffix?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the first few releases of DocC (before Xcode 14.3) DocC required the language identifier prefix for unrelated and uninteresting implementation detail reasons, even though the that information wasn't useful for disambiguation purposes. Links created during those releases continue to work but can be shortened.
Co-authored-by: Maya Epps <[email protected]>
@swift-ci please test |
Bug/issue #, if applicable: rdar://136207820
Summary
This adds user facing documentation about disambiguating symbol links using type signature information, added in #643 and #1087
At first I tried to insert a section about type signature into the existing documentation structure but I found that the current order made the documentation hard to follow. Specifically, these two changes made the flow of the documentation somewhat confusing:
So, before adding new documentation I addressed some of the issues with the flow of the existing documentation:
With those changes done, it felt more natural to:
Sloth/update(_:)
to give a basic description of type signature disambiguationDependencies
None.
Testing
Read the new documentation.
Checklist
Make sure you check off the following items. If they cannot be completed, provide a reason.
[ ] Added testsThis only changes documentation../bin/test
script and it succeeded