Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Originally found while debugging #1084, and recently updated the logic in swiftlang/swift-docc-symbolkit#101 to match this version, which was used in preference of the SymbolKit version.
Summary
This removes the logic from DocC, favoring the loading in SymbolKit, and consolidating the logic into a single place. This was originally opened at #1091, but the code had changed significantly since that update, so it was easier to create a new PR with the change after applying feedback from the earlier PR.
The equivalent logic that I'm consolidating towards is https://github.com/swiftlang/swift-docc-symbolkit/blob/main/Sources/SymbolKit/UnifiedSymbolGraph/GraphCollector.swift#L121-L178
Testing
The existing tests within DocC work this logic extensively.
Checklist
Make sure you check off the following items. If they cannot be completed, provide a reason.
./bin/test
script and it succeeded