Skip to content

[5.9][IRGen] Visit members generated by peer macros in ClassDataBuilder. #67315

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

hborla
Copy link
Member

@hborla hborla commented Jul 14, 2023

  • Explanation: ClassDataBuilder was skipping members generated by peer macros because TypeMemberVisitor::visitImplementationMembers called getMembers() instead of getAllMembers(). This prevents @Observable from switching to peer macros that generate prefixed names instead of a member macro that generates arbitrary names.
  • Scope: Only impacts IRGen for code with synthesized or macro-generated members that aren't exposed via getMembers() such as peer macros.
  • Risk: Low, the only difference between getMembers() and getAllMembers() is the latter includes synthesized and macro-generated members.
  • Testing: Passed existing tests and the previously-failing tests in [Observation] Switch to peer instead of arbitrary macros #67289
  • Main branch PR: [IRGen] Visit members generated by peer macros in ClassDataBuilder. #67314

by calling getAllMembers() instead of getMembers() in
TypeMemberVisitor::visitImplementationMembers.

(cherry picked from commit d3c67ef)
@hborla hborla requested a review from a team as a code owner July 14, 2023 22:14
@hborla
Copy link
Member Author

hborla commented Jul 14, 2023

@swift-ci please test

in evaluateMembersRequest.

(cherry picked from commit 58ad17a)
@hborla
Copy link
Member Author

hborla commented Jul 17, 2023

@swift-ci please test

@hborla
Copy link
Member Author

hborla commented Jul 17, 2023

@swift-ci please test

@hborla hborla merged commit 91a8e45 into swiftlang:release/5.9 Jul 18, 2023
@hborla hborla deleted the 5.9-missing-peer-property-metadata branch July 18, 2023 03:31
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