-
Notifications
You must be signed in to change notification settings - Fork 90
Generalize the Swift version regex #519
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
@swift-ci please test |
let versionRegex = #/Apple Swift version (?<swiftVersion>[\d.]+) \(swiftlang-(?<swiftlangVersion>[\d.]+) clang-(?<clangVersion>[\d.]+)\)/# | ||
let releaseVersionRegex = #/(?:Apple )?Swift version (?<swiftVersion>[\d.]+) \(swift-(?<swiftlangVersion>[\d.]+)-RELEASE\)/# | ||
let developmentVersionRegex = #/Swift version (?<swiftVersion>[\d.]+)-dev \(LLVM (?:\b[0-9a-f]+), Swift (?:\b[0-9a-f]+)\)/# | ||
let versionRegex = #/Swift version (?<swiftVersion>[\d.]+).*\((?<swiftTag>.*)\)/# |
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.
Just confirming: works for both Xcode and swift.org toolchains?
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.
Yes. The different versions we have are:
Apple Swift version 6.1 (swiftlang-6.1.x.x.x clang-1x00.x.x.x) # apple release
Swift version 6.1 (swift-6.1-RELEASE) # swift.org release
Swift version 6.1-dev (LLVM hash, Swift hash) # swift.org nightlies and at desk
And I'm about to put up a PR to make it:
Swift version 6.1 (swift-6.1-DEVELOPMENT-SNAPSHOT-year-month-day-a) # nightlies
Swift version 6.1-dev (Swift hash LLVM hash) # at desk
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.
The "swiftlang" version was only being used in a single location for a compatibility check that is no longer required. The clang version was unusued (which is unsurprising since it's often not available from the Swift `--version` output). Really we only need the version itself and a unique tag to pass as additional signature data to Swift tasks.
087e4d0
to
6bbf726
Compare
@swift-ci please test |
The "swiftlang" version was only being used in a single location for a compatibility check that is no longer required. The clang version was unusued (which is unsurprising since it's often not available from the Swift
--version
output). Really we only need the version itself and a unique tag to pass as additional signature data to Swift tasks.