-
Notifications
You must be signed in to change notification settings - Fork 31
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
Support both Swift 5.8 and Swift 5.9 #105
Conversation
Run for 15.0 Revert "Run for 15.0" This reverts commit 200f4b4. Do not remove Package.resolved Specify DEPLOYMENT_TARGET
a4694f2
to
cbc0916
Compare
let package = Package( | ||
name: "Scipio", | ||
platforms: [ | ||
.macOS(.v12), |
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.
How about change it to v13 in both Package.swift side? Many engineer may use new macOS
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.
I'll upgrade the development environment later because I want to remove NSRegularExpression. But I'll do this next time.
#if swift(>=5.9) | ||
let destination = Destination( | ||
hostTriple: try? Triple("arm64-apple-\(sdk.settingValue)"), | ||
targetTriple: try? Triple("arm64-apple-\(sdk.settingValue)"), | ||
sdkRootDir: sdkPath, | ||
toolchainBinDir: toolchainDirPath, | ||
extraFlags: BuildFlags(cCompilerFlags: extraCCFlags, swiftCompilerFlags: extraSwiftCFlags) | ||
) | ||
return destination | ||
#else | ||
|
||
return Destination( | ||
hostTriple: try? Triple("arm64-apple-\(sdk.settingValue)"), | ||
targetTriple: try? Triple("arm64-apple-\(sdk.settingValue)"), | ||
sdkRootDir: sdkPath, | ||
toolchainBinDir: toolchainDirPath, | ||
extraFlags: BuildFlags(cCompilerFlags: extraCCFlags, swiftCompilerFlags: extraSwiftCFlags) | ||
) | ||
#endif |
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.
What is changed here? Do we need to use variable in swift 5.9 here?
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.
🤔
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.
I re-checked that this was unnecessary. So I reverted.
@@ -20,8 +20,8 @@ let package = Package( | |||
targets: ["ScipioS3Storage"]), | |||
], | |||
dependencies: [ | |||
.package(url: "https://github.com/giginet/swift-package-manager.git", | |||
revision: "11c88e87e6874a570711d18462ca0ea43ff7ff5e"), | |||
.package(url: "https://github.com/apple/swift-package-manager.git", |
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.
🎉 your changes released, right?
In this commit, I bumped up the macOS support version to macOS 12.0 or above. Because current HEAD of swift-driver only supports that.
], | ||
dependencies: [ | ||
.package(url: "https://github.com/giginet/swift-package-manager.git", | ||
revision: "99575e7a3eb8e66112ec45e2f11ef23a1828b110"), |
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.
I upgrade the fork to the commit giginet/swift-package-manager@99575e7
SwiftPM refers HEAD of swift-driver and swift-support-tools-core.
Current HEAD of them only supports above macOS 12.0. But old SwiftPM fork still supports legacy macOS.
This causes a resolving error. So I bump up supported version on our fork.
This fork should be used for legacy Xcode users (14.3). So it will be removed after dropping 14 support.
@@ -1,238 +0,0 @@ | |||
{ |
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.
I removed Package.resolved
. Because it will be changed by resolving with various Xcode versions.
This PR migrate the default Xcode version to 5.9.
I also added
[email protected]
to support backward-compatibility.Run tests both on Xcode 14.3 and Xcode 15.0