Skip to content

Introduce a new ABI.VersionNumber type. #1239

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

Merged
merged 15 commits into from
Jul 29, 2025

Conversation

grynspan
Copy link
Contributor

@grynspan grynspan commented Jul 24, 2025

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.

The new type necessarily conforms to Comparable and Codable. I've adjusted __CommandLineArguments_v0 to 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:

  • Code and documentation should follow the style of the Style Guide.
  • If public symbols are renamed or modified, DocC references should be updated.

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.
@grynspan grynspan added this to the Swift 6.x (main) milestone Jul 24, 2025
@grynspan grynspan self-assigned this Jul 24, 2025
@grynspan grynspan added enhancement New feature or request tools integration 🛠️ Integration of swift-testing into tools/IDEs command-line experience ⌨️ enhancements to the command line interface labels Jul 24, 2025
@grynspan
Copy link
Contributor Author

@grynspan
Copy link
Contributor Author

@swift-ci test

@grynspan
Copy link
Contributor Author

@swift-ci test

@grynspan
Copy link
Contributor Author

@swift-ci test

@grynspan
Copy link
Contributor Author

@swift-ci test

@grynspan
Copy link
Contributor Author

@swift-ci test

@grynspan
Copy link
Contributor Author

@swift-ci test

@grynspan
Copy link
Contributor Author

@swift-ci test

@grynspan
Copy link
Contributor Author

@swift-ci test

@grynspan grynspan requested a review from stmontgomery July 29, 2025 16:39
@grynspan
Copy link
Contributor Author

@swift-ci test

Copy link
Contributor

@stmontgomery stmontgomery left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@grynspan
Copy link
Contributor Author

@swift-ci test

@grynspan
Copy link
Contributor Author

macOS CI is backlogged. Tested at desk.

@grynspan grynspan merged commit 4c5f9a4 into main Jul 29, 2025
2 of 3 checks passed
@grynspan grynspan deleted the jgrynspan/abi-version-number-type branch July 29, 2025 17:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
command-line experience ⌨️ enhancements to the command line interface enhancement New feature or request tools integration 🛠️ Integration of swift-testing into tools/IDEs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy