Skip to content

Conversation

@grynspan
Copy link
Contributor

@grynspan grynspan commented Nov 10, 2025

This PR adopts the @section and @used attributes now available in the Swift 6.3 toolchain. These attributes replace the experimental @_section and @_used attributes verbatim and they are always enabled (so no need to check hasFeature(SymbolLinkageMarkers).)

Because these attributes are only available with the Swift 6.3 toolchain, we do not use them when building with Swift 6.2. Instead, if you build with Swift 6.2 you continue to use the "legacy" test discovery mechanism based on type metadata emission. The "legacy" mechanism will be removed in a future update.

Because the _TestDiscovery target needs to continue to compile with Swift 6.2, I have not switched us over to objectFormat() yet. See #1370 for details.

Resolves #1371.

Checklist:

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

This PR adopts the `@section` and `@used` attributes now available in the Swift
6.3 toolchain. These attributes replace the experimental `@_section` and
`@_used` attributes verbatim and they are always enabled (so no need to check
`hasFeature(SymbolLinkageMarkers)`.)

Because these attributes are only available with the Swift 6.3 toolchain, we do
not use them when building with Swift 6.2. Instead, if you build with Swift 6.2
you continue to use the "legacy" test discovery mechanism based on type metadata
emission. The "legacy" mechanism will be removed in a future update.

Resolves #1371.
@grynspan grynspan added this to the Swift 6.3.0 milestone Nov 10, 2025
@grynspan grynspan self-assigned this Nov 10, 2025
@grynspan grynspan added the enhancement New feature or request label Nov 10, 2025
@grynspan grynspan added performance 🏎️ Performance issues embedded-swift 📟 Embedded Swift issues discovery 🔎 test content discovery tech-debt 💾 reduces technical debt labels Nov 10, 2025
@grynspan
Copy link
Contributor Author

Blocked by swiftlang/swift#85411.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

discovery 🔎 test content discovery embedded-swift 📟 Embedded Swift issues enhancement New feature or request performance 🏎️ Performance issues tech-debt 💾 reduces technical debt

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Adopt @section and @used

2 participants