Skip to content

Conversation

grynspan
Copy link
Contributor

@grynspan grynspan commented Sep 23, 2025

This PR introduces an @_spi var filePath property on SourceLocation with the intent of replacing the existing underscored/unsupported _filePath property.

Because Xcode 16 through 26 directly encodes and decodes instances of SourceLocation, we can't just stop encoding/decoding the _filePath key and need to keep it there for at least a Swift release or two, until Apple's fork of Swift Testing has been updated to include the new encoding key. At that point we can remove the old one. (We'll need to introduce an EncodedSourceLocation structure at that point and keep including the underscored key for the v0 JSON stream, but that's not a "today" problem.)

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 introduces an `@_spi var filePath` property on `SourceLocation` with the
intent of replacing the existing underscored/unsupported `_filePath` property.

Because Xcode 16 through 26 directly encodes and decodes instances of
`SourceLocation`, we can't just stop encoding/decoding the `_filePath` key and
need to keep it there for at least a Swift release or two, until Apple's fork of
Swift Testing has been updated to include the new encoding key. At that point we
can remove the old one.
@grynspan grynspan added this to the Swift 6.x (main) milestone Sep 23, 2025
@grynspan grynspan self-assigned this Sep 23, 2025
@grynspan grynspan added the enhancement New feature or request label Sep 23, 2025
@grynspan grynspan added tools integration 🛠️ Integration of swift-testing into tools/IDEs public-api Affects public API issue-handling Related to Issue handling within the testing library tech-debt 💾 reduces technical debt labels Sep 23, 2025
@grynspan grynspan merged commit 0a38abb into main Sep 24, 2025
47 of 48 checks passed
@grynspan grynspan deleted the jgrynspan/filepath-property-api branch September 24, 2025 12:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request issue-handling Related to Issue handling within the testing library public-api Affects public API tech-debt 💾 reduces technical debt tools integration 🛠️ Integration of swift-testing into tools/IDEs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants