-
Notifications
You must be signed in to change notification settings - Fork 112
[SWT-0002] A stable JSON-based ABI for tools integration #479
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
Conversation
defa22b
to
5dc96fd
Compare
@younata This may be of interest to you as a tools author. :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall this looks great, and I think satisfies the needs of 3rd party tools in a way that can evolve gracefully if need be.
dac24fb
to
e7f4c5f
Compare
@swift-ci please test |
e7f4c5f
to
2df15d2
Compare
9267638
to
dd8988e
Compare
@swift-ci please test |
9d16cad
to
258d2ce
Compare
This PR changes the behavior of `swift test list` and its various synonyms to allow reporting the list of tests via the ABI-stable JSON mechanism described in #479. As it is not currently possible to directly call `swift test list --experimental-event-stream-output ... --experimental-event-stream-version 0`, it's a bit hard to test this code. However, it is possible to opt into this mode using `--experimental-configuration-path` and passing a path to a JSON file that includes `"listTests": true` (as noted by @allevato.) Resolves #506. Resolves rdar://130627856.
This PR changes the default JSON schema version for event stream output to version 0 (the version documented in #479.) Previously, if a caller did not specify a version number for the event stream, it would default to encoding "snapshots" of various values from the testing library. Xcode 16 Beta 1 uses this legacy format, so to continue supporting newer betas of Xcode 16 transitionally, this PR temporarily enables a "-1" JSON schema version that continues to emit snapshot encodings. This JSON schema version will be removed (along with the snapshots code in general) in a future update once Xcode has migrated. Resolves #527.
258d2ce
to
e2c41be
Compare
Rebased on main. |
@swift-ci please test |
This PR changes the behavior of `swift test list` and its various synonyms to allow reporting the list of tests via the ABI-stable JSON mechanism described in #479. As it is not currently possible to directly call `swift test list --experimental-event-stream-output ... --experimental-event-stream-version 0`, it's a bit hard to test this code. However, it is possible to opt into this mode using `--experimental-configuration-path` and passing a path to a JSON file that includes `"listTests": true` (as noted by @allevato.) Resolves #506. Resolves rdar://130627856.
This PR changes the default JSON schema version for event stream output to version 0 (the version documented in #479.) Previously, if a caller did not specify a version number for the event stream, it would default to encoding "snapshots" of various values from the testing library. Xcode 16 Beta 1 uses this legacy format, so to continue supporting newer betas of Xcode 16 transitionally, this PR temporarily enables a "-1" JSON schema version that continues to emit snapshot encodings. This JSON schema version will be removed (along with the snapshots code in general) in a future update once Xcode has migrated. Resolves #527. ### 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.
… event stream version
b001bd8
to
006545f
Compare
@swift-ci please test |
@swift-ci please test |
CI was passing prior to the last commit, which was documentation only. Merging. |
This PR changes the behavior of `swift test list` and its various synonyms to allow reporting the list of tests via the ABI-stable JSON mechanism described in #479. As it is not currently possible to directly call `swift test list --experimental-event-stream-output ... --experimental-event-stream-version 0`, it's a bit hard to test this code. However, it is possible to opt into this mode using `--experimental-configuration-path` and passing a path to a JSON file that includes `"listTests": true` (as noted by @allevato.) Resolves #506. Resolves rdar://130627856.
This PR changes the behavior of `swift test list` and its various synonyms to allow reporting the list of tests via the ABI-stable JSON mechanism described in #479. As it is not currently possible to directly call `swift test list --event-stream-output-path ... --event-stream-version 0`, it's a bit hard to test this code. However, it is possible to opt into this mode using `--configuration-path` and passing a path to a JSON file that includes `"listTests": true` (as noted by @allevato.) Support for these arguments with `swift test list` is tracked by swiftlang/swift-package-manager#7768. Resolves #506. Resolves rdar://130627856. ### 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.
Now that we've landed and tagged #479 in 0.11.0, we no longer need to keep building the snapshot types for non-Darwin platforms because we have a stable, permanent replacement for them. We need to keep them around on Darwin to support Xcode 16 betas.
Now that we've landed and tagged #479 in 0.11.0, we no longer need to keep building the snapshot types for non-Darwin platforms because we have a stable, permanent replacement for them. We need to keep them around on Darwin to support Xcode 16 betas. ### 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.
One of the core components of Swift Testing is its ability to interoperate with Xcode 16, VS Code, and other tools. Swift Testing has been fully open-sourced across all platforms supported by Swift, and can be added as a package dependency (or—eventually—linked from the Swift toolchain.)
Because Swift Testing may be used in various forms, and because integration with various tools is critical to its success, we need it to have a stable interface that can be used regardless of how it's been added to a package.
Read the full proposal here.
Checklist: