-
Notifications
You must be signed in to change notification settings - Fork 102
Fix crash when loading test content records from the type metadata section. #1015
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
Conversation
…ction. Looks like # caused a regression: the compiler appears to be dead-code-stripping the classes we emit to contain test content records. This PR changes the design back to using a protocol so that the members we need are always covered by `@_alwaysEmitConformanceMetadata`. This makes `_TestDiscovery` a little harder to use with legacy lookup, but it's all experimental and eventually going to be removed anyway. Resolves rdar://146809312.
@swift-ci test |
Windows CI is down right now. Self-reviewing due to potential impact on the toolchain. |
protocol TestContentRecordContainer: _TestDiscovery.TestContentRecordContainer {} | ||
|
||
/// An abstract base class describing a type that contains tests. | ||
/// A protocol base class describing a type that contains tests. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo here fixed on main already.
protocol TestContentRecordContainer: _TestDiscovery.TestContentRecordContainer {} | ||
|
||
/// An abstract base class describing a type that contains tests. | ||
/// A protocol base class describing a type that contains tests. | ||
/// | ||
/// - Warning: This class is used to implement the `@Test` macro. Do not use it |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo here fixed on main already.
Looks like #880 and/or #1010 caused a regression: the compiler appears to be dead-code-stripping the classes we emit to contain test content records. This PR changes the design back to using a protocol so that the members we need are always covered by
@_alwaysEmitConformanceMetadata
. This makes_TestDiscovery
a little harder to use with legacy lookup, but it's all experimental and eventually going to be removed anyway.Resolves rdar://146809312.
Checklist: