Skip to content

Commit b5487b4

Browse files
authored
Expose Attachment.sourceLocation as tools integration SPI (#1426)
This exposes the `Attachment.sourceLocation` property getter as `@_spi(ForToolsIntegrationOnly)`. ### Motivation: Having this property be accessible as SPI will allow integrated tools to access the source location where an attachment was recorded to provide useful context in the results about where an attachment originated. ### Checklist: - [x] Code and documentation should follow the style of the [Style Guide](https://github.com/apple/swift-testing/blob/main/Documentation/StyleGuide.md). - [x] If public symbols are renamed or modified, DocC references should be updated.
1 parent bb800da commit b5487b4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Sources/Testing/Attachments/Attachment.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,8 @@ public struct Attachment<AttachableValue> where AttachableValue: Attachable & ~C
104104
///
105105
/// The value of this property is used when recording issues associated with
106106
/// the attachment.
107-
var sourceLocation: SourceLocation
107+
@_spi(ForToolsIntegrationOnly)
108+
public internal(set) var sourceLocation: SourceLocation
108109
}
109110

110111
extension Attachment: Sendable where AttachableValue: Sendable {}

0 commit comments

Comments
 (0)