mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Resolves rdar://152676102 In Objective-C, it's reasonable to sort extensions of your dependency's types into headers that match the name of that type. However, this runs into a bug in SymbolGraphGen when it comes time to generate Swift symbol graphs for that Objective-C code: At the moment, it only differentiates between modules based on their base name, regardless of their parent modules (if any). This causes these extensions to be incorrectly sorted into the _extending module's_ symbol graph, rather than in an extension symbol graph where it can be displayed with the _extended module_. When processed with Swift-DocC, it would cause these symbols to disappear. This PR updates the `areModulesEqual` function used by the `SymbolGraphASTWalker` to consider the fully-qualified module name for comparisons, rather than just the module's base name, causing situations like the test's `Dependency.DependencyClass` and `HeaderCollision.DependencyClass` to be properly distinguished from each other.
17 KiB
17 KiB