Skip to content

Relax the alignment requirement for DiscoverableAsTestContent.Context. #1076

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 4 commits into from
Apr 17, 2025

Conversation

grynspan
Copy link
Contributor

@grynspan grynspan commented Apr 14, 2025

This PR allows DiscoverableAsTestContent.Context to be less-aligned than UInt so long as its stride remains the same. It also removes the sneaky conformance of ExitTest to DiscoverableAsTestContent, opting instead to use an internal type. Since the conformance to DiscoverableAsTestContent and the implementation of __store() form a closed system (where all type information is controlled by Swift Testing at runtime), we can do this without breaking any ABI. I've updated ABI/TestContent.md to remove some of the relevant implementation details.

Checklist:

  • Code and documentation should follow the style of the Style Guide.
  • If public symbols are renamed or modified, DocC references should be updated.

@grynspan grynspan added enhancement New feature or request exit-tests ☠️ Work related to exit tests discovery 🔎 test content discovery labels Apr 14, 2025
@grynspan grynspan added this to the Swift 6.x milestone Apr 14, 2025
@grynspan grynspan self-assigned this Apr 14, 2025
@grynspan
Copy link
Contributor Author

@swift-ci test

1 similar comment
@grynspan
Copy link
Contributor Author

@swift-ci test

grynspan and others added 3 commits April 17, 2025 10:53
This PR allows `DiscoverableAsTestContent.Context` to be less-aligned than
`UInt` so long as its stride remains the same. It also removes the sneaky
conformance of `ExitTest` to `DiscoverableAsTestContent`, opting instead to use
an internal type. Since the conformance to `DiscoverableAsTestContent` and the
implementation of `__store()` form a closed system (where all type information
is controlled by Swift Testing at runtime), we can do this without breaking any
ABI. I've updated ABI/TestContent.md to remove some of the relevant
implementation details.
@stmontgomery stmontgomery force-pushed the jgrynspan/relax-record-context-alignment branch from 64dca31 to 9b93602 Compare April 17, 2025 15:57
@stmontgomery
Copy link
Contributor

@swift-ci test

@stmontgomery
Copy link
Contributor

@swift-ci test

Copy link
Contributor

@stmontgomery stmontgomery left a comment

Choose a reason for hiding this comment

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

I'm not the author of this PR but reviewed it and resolved conflicts in his absence, which he subsequently reviewed. Planning to merge it once CI looks good

@stmontgomery
Copy link
Contributor

The macOS CI failure is expected to be resolved by swiftlang/swift#80830.

@stmontgomery stmontgomery merged commit 9342542 into main Apr 17, 2025
2 of 3 checks passed
@stmontgomery stmontgomery deleted the jgrynspan/relax-record-context-alignment branch April 17, 2025 16:43
@stmontgomery stmontgomery modified the milestones: Swift 6.x, Swift 6.2 Apr 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discovery 🔎 test content discovery enhancement New feature or request exit-tests ☠️ Work related to exit tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants