Skip to content

Conversation

@anferbui
Copy link
Contributor

@anferbui anferbui commented May 31, 2024

  • Explanation: This fixes a bug where alternate symbol declarations were only ever showing as being available only on one platform, regardless of the symbol being supported across different platforms.
  • Scope: Alternate symbol declarations, specifically their availability.
  • Issue: rdar://128573538
  • Risk: Low.
  • Testing: Validated by rendering symbol graphs locally and via unit testing.
  • Reviewer: @QuietMisdreavus
  • Original PR: Merge alternate symbol declarations across symbol graphs #933

* Merges alternate symbol declarations across symbol graphs

Fixes a bug with platform availability of a symbol's alternate declarations. This bug resulted in alternate symbol declarations only ever showing as having one supported platform, regardless of the symbol being declared across different symbol graphs for different platforms.

The issue was caused by alternate declarations not being merged across different symbol graphs, so that platform availability information was only stored for the first symbol graph that was processed, and further platform availability information was lost.

To fix this issue, `Symbol.mergeDeclaration(...)` now takes an extra parameter which takes in a list of alternate declarations from the symbol being merged in. Platform names are now merged across alternate declarations from different symbol graphs.

* Updates alternate declarations test to include multiple platforms

Updates `testAlternateDeclarations()` to validate that all supported platforms are propagated from the main declaration to any alternate declarations.

Resolves rdar://128573538.
@anferbui anferbui requested a review from franklinsch May 31, 2024 12:29
@anferbui
Copy link
Contributor Author

@swift-ci Please test

@anferbui anferbui merged commit 55ee1cb into swiftlang:release/6.0 Jun 3, 2024
@anferbui anferbui deleted the 6.0-merge-alternate-symbol-declarations branch June 3, 2024 12:37
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