Skip to content

[5.9][Macros] Accept "freeStandingDeclaration" as 'MacroRole.declaration' #1839

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

Conversation

rintaro
Copy link
Member

@rintaro rintaro commented Jun 24, 2023

Cherry-pick #1838 into release/5.9

  • Explanation: Due to diverged PluginMessage.MacroRole between swift and swift-syntax repo, the compiler mistakingly sends "freeStandingDeclaration" as .declaration via serialized IPC message. To keep the compatibility, accept it as a valid value
  • Scope: Executable macro plugin including swift-plugin-server
  • Risk: Low. This change only accept additional serialization as a valid value
  • Testing: Add executable plugin tests for every macro role
  • Issue: rdar://111267075
  • Reviewer: Doug Gregor (@DougGregor)

Also add actual plugin test for every macro role.

(cherry picked from commit 7d864db)
@rintaro rintaro requested a review from ahoppen as a code owner June 24, 2023 16:15
@rintaro
Copy link
Member Author

rintaro commented Jun 24, 2023

@swift-ci Please test

@rintaro rintaro merged commit 1a20c6d into swiftlang:release/5.9 Jun 26, 2023
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