Skip to content
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

Merged
merged 10 commits into from
Sep 29, 2023
Merged

Support both Swift 5.8 and Swift 5.9 #105

merged 10 commits into from
Sep 29, 2023

Conversation

giginet
Copy link
Owner

@giginet giginet commented Sep 27, 2023

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

Run for 15.0

Revert "Run for 15.0"

This reverts commit 200f4b4.

Do not remove Package.resolved

Specify DEPLOYMENT_TARGET
let package = Package(
name: "Scipio",
platforms: [
.macOS(.v12),
Copy link
Collaborator

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

Copy link
Owner Author

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.

Comment on lines 45 to 63
#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
Copy link
Collaborator

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?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤔

Copy link
Owner Author

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",
Copy link
Collaborator

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"),
Copy link
Owner Author

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 @@
{
Copy link
Owner Author

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.

@giginet giginet merged commit db57716 into main Sep 29, 2023
@giginet giginet deleted the xcode-15-release branch September 29, 2023 03:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants