-
Notifications
You must be signed in to change notification settings - Fork 101
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
Define and implement a strawman stable JSON schema for output. #383
Conversation
@swift-ci please test |
@swift-ci please test Linux |
4a13767
to
b6f6b87
Compare
@swift-ci please test |
dcb933e
to
6cdc0ca
Compare
6cdc0ca
to
fb2d51a
Compare
fb2d51a
to
f0a4206
Compare
@swift-ci please test |
/// This event is the first event posted after ``Runner/run()`` is called. | ||
case runStarted | ||
indirect case runStarted(_ plan: Runner.Plan) |
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.
I suspect this is added because it's used elsewhere, but isn't this quite a large payload potentially? I wonder about the impact of that
But also (ironically): if we do add this here, for parity should we also be adding it to the corresponding run ended event?
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.
It's pretty chunky, yes, but remember that the value is CoW, so not as large as you might think. I'm open to alternative designs.
I left it out of the runEnded
case precisely because it was relatively large.
// | ||
|
||
/// A namespace for ABI version 0 symbols. | ||
enum ABIv0: Sendable {} |
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.
Not for right now, but if/when we expose this outside the module I'd like to bikeshed alternative naming conventions
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.
This enum is definitely not ever meant to be API. It's a namespace for ABI-version-0 symbols only.
I'm open to alternatives.
Sources/Testing/EntryPoints/ABIv0/Encoded/ABIv0.EncodedMessage.swift
Outdated
Show resolved
Hide resolved
Sources/Testing/EntryPoints/ABIv0/Encoded/ABIv0.EncodedMessage.swift
Outdated
Show resolved
Hide resolved
Sources/Testing/EntryPoints/ABIv0/Encoded/ABIv0.EncodedEvent.swift
Outdated
Show resolved
Hide resolved
Sources/Testing/EntryPoints/ABIv0/Encoded/ABIv0.EncodedEvent.swift
Outdated
Show resolved
Hide resolved
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.
Left a few more data modeling suggestions but generally this is looking great to me now, thanks!
@swift-ci please test |
Follow-on to #7534. swift-testing has an additional argument specifying the schema version of the JSON being used that we also need to pass through SwiftPM. See: swiftlang/swift-testing#383
…7551) Follow-on to #7534. swift-testing has an additional argument specifying the schema version of the JSON being used that we also need to pass through SwiftPM. See: swiftlang/swift-testing#383
…wiftlang#7551) Follow-on to swiftlang#7534. swift-testing has an additional argument specifying the schema version of the JSON being used that we also need to pass through SwiftPM. See: swiftlang/swift-testing#383
…7551) Follow-on to #7534. swift-testing has an additional argument specifying the schema version of the JSON being used that we also need to pass through SwiftPM. See: swiftlang/swift-testing#383
…wiftlang#7551) Follow-on to swiftlang#7534. swift-testing has an additional argument specifying the schema version of the JSON being used that we also need to pass through SwiftPM. See: swiftlang/swift-testing#383
This PR defines a JSON schema for events output from swift-testing via either
--experimental-event-stream-output
orabiEntryPoint_v0()
. The JSON schema needs to be formally reviewed separately.We are already writing an experimental JSON stream using "snapshot" types and we don't want to break folks experimenting with it before we have a final JSON schema, so for now that remains the default. To opt into the new schema, pass
--experimental-event-stream-version 0
(note that this argument is not forwarded fromswift test
. See swiftlang/swift-package-manager#7534.)Resolves #368.
Checklist: