Skip to content
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

Attachments! [Take 2] #796

Merged
merged 20 commits into from
Nov 3, 2024
Merged

Attachments! [Take 2] #796

merged 20 commits into from
Nov 3, 2024

Conversation

grynspan
Copy link
Contributor

@grynspan grynspan commented Nov 2, 2024

This PR introduces a new experimental feature, attachments. With this feature, you can "attach" values that conform to a new Test.Attachable protocol to a test. With the right command-line incantation (TBD), Swift Testing will automatically write attachments to disk for you.

Note

This PR does not teach Xcode or VS Code how to handle attachments produced by
Swift Testing, nor does it add the necessary command-line arguments to the
swift test command-line tool.

This PR is one of a series that I'll be posting to build out this feature.

As always, keep in mind that symbols marked @_spi(Experimental) are subject to change or removal without notice.

Resolves #714.
Resolves rdar://88648735.

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 swiftpm-integration Swift Package Manager integration tools integration Integration of swift-testing into tools/IDEs public-api Affects public API attachments/activities 🖇️ Work related to attachments and/or activities labels Nov 2, 2024
@grynspan grynspan self-assigned this Nov 2, 2024
@grynspan grynspan added this to the Swift 6.1 milestone Nov 2, 2024
This PR introduces a new experimental feature, attachments. With this feature,
you can "attach" values that conform to a new `Test.Attachable` protocol to a
test. With the right command-line incantation (TBD), Swift Testing will
automatically write attachments to disk for you.

> ![NOTE]
> This PR does not teach Xcode or VS Code how to handle attachments produced by
> Swift Testing, nor does it add the necessary command-line arguments to the
> `swift test` command-line tool.

This PR is one of a series that I'll be posting to build out this feature.

As always, keep in mind that symbols marked `@_spi(Experimental)` are subject to
change or removal without notice.

Resolves #714.
Resolves rdar://88648735.
@grynspan grynspan force-pushed the jgrynspan/attachments branch from e5d6a59 to 3e94088 Compare November 3, 2024 00:54
@grynspan
Copy link
Contributor Author

grynspan commented Nov 3, 2024

@swift-ci test

@grynspan
Copy link
Contributor Author

grynspan commented Nov 3, 2024

@swift-ci test Linux

@grynspan
Copy link
Contributor Author

grynspan commented Nov 3, 2024

@swift-ci test macOS

@grynspan grynspan merged commit 651e4fb into main Nov 3, 2024
3 checks passed
@grynspan grynspan deleted the jgrynspan/attachments branch November 3, 2024 01:05
@grynspan
Copy link
Contributor Author

grynspan commented Nov 3, 2024

Reapplies #770 after it was reverted in #793.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
attachments/activities 🖇️ Work related to attachments and/or activities enhancement New feature or request public-api Affects public API swiftpm-integration Swift Package Manager integration tools integration Integration of swift-testing into tools/IDEs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add attachments
2 participants