-
Notifications
You must be signed in to change notification settings - Fork 131
Bump ABI.CurrentVersion to 6.3 and ensure minor variances in JSON version numbers are permitted.
#1438
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
base: main
Are you sure you want to change the base?
Conversation
…ersion numbers are permitted. This PR ensures that the JSON schema version 6.3 is considered "supported" in Swift Testing 6.3. As well, it suppresses a thrown error when the `version` field of a JSON record is slightly higher than the expected schema. For example, if we ask Swift Testing the ABI version corresponding to `VersionNumber(6, 3, 1)`, we'll get back `v6_3`, but then if we try to decode a JSON record whose `version` field equals `"6.3.1"`, we'll throw a version mismatch error. This error is now suppressed unless the versions really do mismatch.
|
Did you intend to also modify |
|
@stmontgomery Looks like the git commit didn't pick up the change for some reason. Fixed. |
stmontgomery
left a comment
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.
Thanks! It looks like now one test is failing though:
✘ Test "New-but-not-experimental ABI version" recorded an issue at SwiftPMTests.swift:307:23: Expectation failed: ABI.version(forVersionNumber: versionNumber → 6.3.1) → nil
I can fix that up in a little while
|
Yeah it looks like git ate part of the PR. Am confused as I definitely fixed that test locally. |
…on(forVersionNumber:) more testable
|
I've pushed a commit which should fix the broken test, and modify the related |
Sources/Testing/ABI/ABI.swift
Outdated
| static func version(forVersionNumber versionNumber: VersionNumber = ABI.CurrentVersion.versionNumber) -> (any Version.Type)? { | ||
| static func version( | ||
| forVersionNumber versionNumber: VersionNumber, | ||
| givenSwiftCompilerVersion swiftCompilerVersion: VersionNumber = swiftCompilerVersion |
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.
Should this be an autoclosure? It may not be free to compute.
This PR ensures that the JSON schema version 6.3 is considered "supported" in Swift Testing 6.3. As well, it suppresses a thrown error when the
versionfield of a JSON record is slightly higher than the expected schema. For example, if we ask Swift Testing the ABI version corresponding toVersionNumber(6, 3, 1), we'll get backv6_3, but then if we try to decode a JSON record whoseversionfield equals"6.3.1", we'll throw a version mismatch error. This error is now suppressed unless the versions really do mismatch.Checklist: