-
Notifications
You must be signed in to change notification settings - Fork 37
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
[DNM] Comply SymbolGraph.SemanticVersion
to SemVer 2.0.0
#36
base: main
Are you sure you want to change the base?
[DNM] Comply SymbolGraph.SemanticVersion
to SemVer 2.0.0
#36
Commits on May 26, 2022
-
comply
SymbolGraph.SemanticVersion
to SemVer 2.0.0This is a correct but somewhat over-engineered reinplementation of `SymbolGraph.SemanticVersion`. The most important (and also most invasive) changes are the handling of pre-release and build metadata. These include their validation and (their contribution to version-) comparison. Some less important changes include the following: - Version core identifiers are changed to be backed by `UInt`, because they’re not allowed be less than 0. This might appear to be a departure from the convention of using `Int` for even always-positive integers (e.g. `Array.Index`). However, in this specific case, the use of version coure identifiers is mostly contained in the domain of constructing semantic versions, and does not have any apparent need to participate in numeric operations outside of the domain other than comparing individual identifiers. And considering Swift’s current lack of build-time evaluation and error handling, using `UInt` looks like the right trade off between ergnomics and “safety”. - Deprecated the initializer for a new one that throws error, so that erros can be handled instead of runtime trapping. - Added some facilities for inspecting and working with versions’ semantics in general. - Updated the tools version specifier in the main package manifest to “5.6”, because Swift 5.2 has some type-checking bugs that affect the new implementation. - Added a lot of tests, which should cover a large area of (edge) cases.
Configuration menu - View commit details
-
Copy full SHA for 2dd562b - Browse repository at this point
Copy the full SHA 2dd562bView commit details
Commits on May 27, 2022
-
revert the main swift version specifier back to “5.2”
It appears that whatever caused the type checking problems before has already been fixed.
Configuration menu - View commit details
-
Copy full SHA for ff3e40f - Browse repository at this point
Copy the full SHA ff3e40fView commit details -
elaborate a bit more on why we cannot omit empty subsequences when sp…
…litting the prerelease into identifiers Co-authored-by: David Rönnqvist <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 4e2b309 - Browse repository at this point
Copy the full SHA 4e2b309View commit details -
use the convenient computed property `isAllowedInSemanticVersionIdent…
…ifier` when validating build metadata Co-authored-by: David Rönnqvist <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for b5f7003 - Browse repository at this point
Copy the full SHA b5f7003View commit details -
Configuration menu - View commit details
-
Copy full SHA for ecbede7 - Browse repository at this point
Copy the full SHA ecbede7View commit details -
move common identifier validation logic out of
Prerelease.swift
It’s used for more than validating prerelease.
Configuration menu - View commit details
-
Copy full SHA for 1790ae6 - Browse repository at this point
Copy the full SHA 1790ae6View commit details -
add a non-throwing initializer that takes only version core identifiers
This initializer should be much more ergonomic to use in the common cases, and it's safe because it's guaranteed not to encounter any error.
Configuration menu - View commit details
-
Copy full SHA for 4d9783d - Browse repository at this point
Copy the full SHA 4d9783dView commit details
Commits on Jun 4, 2022
-
add a comment referring to the SR-14665
Reference to [SR-14665](swiftlang/swift#57016) links to more explanation on why the manual `==` implemenatation is necessary.
Configuration menu - View commit details
-
Copy full SHA for c27b2bf - Browse repository at this point
Copy the full SHA c27b2bfView commit details -
Configuration menu - View commit details
-
Copy full SHA for 98a49de - Browse repository at this point
Copy the full SHA 98a49deView commit details