Introduce a new ABI.VersionNumber type.#1239
Merged
Merged
Conversation
This PR introduces and plumbs through an internal `ABI.VersionNumber` type that represents the JSON event stream version that should be used during a test run. This type supports integers (such as the current version 0) and semantic versions (e.g. 6.3 or 6.3.0). Care is taken to ensure backwards compatibility for ABI versions -1 and 0 which do not accept a string in this position. > [!WARNING] > For technical reasons involving `__CommandLineArguments_v0`, this type is > exposed publicly as `__ABIVersionNumber`. This typealias may be removed in a > future update. The new type necessarily conforms to `Comparable` and `Codable`. It also conforms to `ExpressibleByIntegerLiteral` for compatibility with older versions of Xcode that set the `__CommandLineArguments_v0.eventStreamVersion` property to an integer literal value. For the moment, these are all implementation details that have no impact on our supported interface as there is no newer JSON schema than 0. We intend to make changes to the schema in the next Swift release (assumed to be 6.3) that will require a Swift Evolution review.
Contributor
Author
Contributor
Author
|
@swift-ci test |
Contributor
Author
|
@swift-ci test |
Contributor
Author
|
@swift-ci test |
Contributor
Author
|
@swift-ci test |
Contributor
Author
|
@swift-ci test |
…d 0) and public keyword
Contributor
Author
|
@swift-ci test |
Contributor
Author
|
@swift-ci test |
Contributor
Author
|
@swift-ci test |
Contributor
Author
|
@swift-ci test |
stmontgomery
approved these changes
Jul 29, 2025
stmontgomery
left a comment
Contributor
There was a problem hiding this comment.
LGTM, thank you for the iteration! My final comment was that I thought explicit labels e.g. majorComponent:... for the initializer usages would be helpful, but it's stylistic and I leave it up to you
Contributor
Author
|
@swift-ci test |
Contributor
Author
|
macOS CI is backlogged. Tested at desk. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR introduces and plumbs through an internal
ABI.VersionNumbertype that represents the JSON event stream version that should be used during a test run. This type supports integers (such as the current version 0) and semantic versions (e.g. 6.3 or 6.3.0). Care is taken to ensure backwards compatibility for ABI versions -1 and 0 which do not accept a string in this position.The new type necessarily conforms to
ComparableandCodable. I've adjusted__CommandLineArguments_v0to support this new type while maintaining backwards-compatibility with Xcode 16.For the moment, these are all implementation details that have no impact on our supported interface as there is no newer JSON schema than 0. We intend to make changes to the schema in the next Swift release (assumed to be 6.3) that will require a Swift Evolution review.
Checklist: