You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR does things to `ABI.VersionNumber`:
- Renames it to `VersionNumber` as we do have some use cases that aren't
related to JSON schema versioning. I initially didn't want to make this
type a general version number type, but it's just too useful not to do
so. Alas.
- Changes the type of the `swiftStandardLibraryVersion` global variable
to `VersionNumber?`.
- Changes the type of the `glibcVersion` global variable to
`VersionNumber`.
- Adds `swiftCompilerVersion` representing the version of the Swift
compiler used to compile Swift Testing. We need this value when
computing the JSON schema version (see next bullet.)
- Clamps the range of supported JSON schema versions to the Swift
compiler version _unless_ we've explicitly defined a schema version
higher than it:
| Compiler | Highest Defined Schema | Requested | Result |
|-|-|-|-|
| 1.0 | 1.0 | 1.0 | 1.0 | | 2.0 | 1.0 | 1.0 | 1.0 | | 1.0 | 2.0 | 1.0 |
1.0 |
| 1.0 | 1.0 | 2.0 | `nil` |
| 2.0 | 2.0 | 1.0 | 1.0 |
| 2.0 | 1.0 | 2.0 | 1.0 |
| 1.0 | 2.0 | 2.0 | 2.0 |
| 2.0 | 2.0 | 2.0 | 2.0 |
The reasoning here is that, when we're built with a given compiler
version, we presumably know about all JSON schema versions up to and
including the one aligned with that compiler, so if you ask for the
schema version aligned with the compiler, it's equivalent to whatever we
support that's less than or equal to the compiler version. But if you
ask for something greater than the compiler version, and we haven't
defined it, we don't know anything about it and can't provide it.
This reasoning breaks down somewhat if you build an old version of the
Swift Testing package with a new compiler, but in general we don't
support that sort of configuration for very long (and we can't predict
the future anyway.)
### Checklist:
- [x] Code and documentation should follow the style of the [Style
Guide](https://github.com/apple/swift-testing/blob/main/Documentation/StyleGuide.md).
- [x] If public symbols are renamed or modified, DocC references should
be updated.
0 commit comments