Skip to content

Conversation

@natecook1000
Copy link
Member

This adopts @attached(peer) for generating an observable type's underscored storage when expanding the @ObservationTracked macro, instead of using arbitrary with the member macro on the observable type.

rdar://110327683

This adopts `@attached(peer)` for generating an observable type's
underscored storage when expanding the `@ObservationTracked` macro,
instead of using `arbitrary` with the member macro on the
observable type.
@natecook1000 natecook1000 requested review from hborla and phausler July 13, 2023 19:32
@natecook1000
Copy link
Member Author

Tests are currently crashing with this error, even if only instantiating an @Observable-annotated type:

stderr>>> Assertion failed: (dependentIvars->Count == numFields), function initObjCClass, file Metadata.cpp, line 3396.

@natecook1000
Copy link
Member Author

@swift-ci Please test

Copy link
Contributor

@phausler phausler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Provided we can alleviate the compiler crash, this seems correct to me

@hborla
Copy link
Member

hborla commented Jul 18, 2023

@swift-ci please test

@natecook1000
Copy link
Member Author

@swift-ci Please test

@natecook1000
Copy link
Member Author

@swift-ci Please test and merge

@natecook1000 natecook1000 force-pushed the observation_peer_macros branch from 8e9cca1 to e68395c Compare July 21, 2023 14:29
@natecook1000
Copy link
Member Author

@swift-ci Please test and merge

@swift-ci swift-ci merged commit 64ba7ff into swiftlang:main Jul 21, 2023
natecook1000 pushed a commit to natecook1000/swift that referenced this pull request Jul 24, 2023
…_macros

[Observation] Switch to peer instead of arbitrary macros
natecook1000 added a commit that referenced this pull request Jul 25, 2023
…67484)

[Observation] Switch to peer instead of arbitrary macros

Co-authored-by: swift-ci <[email protected]>
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.

4 participants