Skip to content

Support semver prerelease IDs in ABI.VersionNumber - #1860

Open
grynspan wants to merge 2 commits into
mainfrom
jgrynspan/semver-prerelease-ids
Open

grynspan wants to merge 2 commits into
mainfrom
jgrynspan/semver-prerelease-ids

Conversation

@grynspan

@grynspan grynspan commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

This PR adds support for representing development versions of the JSON schema independently of release versions by specifying the "-dev" suffix, e.g. --event-stream-version 6.5-dev.

This is useful if we want to enable functionality only on a development branch, for instance. A separate PR will adopt this new logic when parsing VERSION.txt so we always know what our own branch is, which will make ABI.version(forVersionNumber:) play nicer whenever main moves to a new version (shout-out to @bkhouri for noticing that "--event-stream-version 6.5" didn't work after we branched release/6.4 and retargetted main until we explicitly added ABI.v6_5.).

This PR adds the necessary infrastructure to support other suffixes in the future that can be used to enable or disable functionality dynamically. (No, I don't have specific ideas in mind, it's just a useful tool for the toolbox.)

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 force-pushed the jgrynspan/semver-prerelease-ids branch from 544e57c to 6e3807e Compare September 10, 2026 14:44
@grynspan grynspan changed the title [WIP, DNM] Support semver prerelease IDs in ABI.VersionNumber Support semver prerelease IDs in ABI.VersionNumber Sep 10, 2026
@grynspan grynspan self-assigned this Sep 10, 2026
@grynspan grynspan added enhancement New feature or request tools integration 🛠️ Integration of swift-testing into tools/IDEs labels Sep 10, 2026
@grynspan grynspan added this to the Swift 6.5.0 (main) milestone Sep 10, 2026
@grynspan
grynspan marked this pull request as ready for review September 10, 2026 15:46
return "-" + prereleaseIDs.joined(separator: ".")
}

init?<S>(prereleaseID: S) where S: StringProtocol, S.SubSequence == Substring {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Documentation?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'm a little unclear how the changes in this file connect to the rest of the PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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