Skip to content

[5.9][Macros] A few bug fixes for extension macros. #67189

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

Merged
merged 3 commits into from
Jul 9, 2023

Conversation

hborla
Copy link
Member

@hborla hborla commented Jul 8, 2023

  • Explanation: This fixes 3 small issues with extension macros that enable adopting extension macros in @Observable:
  1. When resolving extension macro protocol conformances, handle the case where a protocol has a null type repr because it was deserialized. This fixes an issue where imported extension macros with a conformances: list appeared to not add any conformances, and expansion was always passed an empty protocols array.
  2. In SILSymbolVisitor, skip local conformance entries from pre-expanded macros. This fixes an assertion failure in TBDGen due to duplicate conformances.
  3. Fix a silly copy-paste error in ASTGen that caused a bogus conformance list to be passed to extension macro expansion on the plugin server path.

hborla added 3 commits July 7, 2023 22:20
type repr because it was deserialized.

(cherry picked from commit b7a53f9)
…st to be

passed to extension macro expansion on the plugin server code path.

(cherry picked from commit 48637c6)
@hborla hborla requested a review from a team as a code owner July 8, 2023 05:27
@hborla
Copy link
Member Author

hborla commented Jul 8, 2023

@swift-ci please test

@hborla hborla merged commit 4895334 into swiftlang:release/5.9 Jul 9, 2023
@hborla hborla deleted the 5.9-extension-macro-fixes branch July 9, 2023 07:42
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