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
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,13 @@ on:
pull_request:
branches:
- '*'
env:
DEVELOPER_DIR: "/Applications/Xcode_14.3.1.app/Contents/Developer"
jobs:
Tests:
strategy:
matrix:
xcode_version: ["14.3.1", "15.0"]
env:
DEVELOPER_DIR: "/Applications/Xcode_${{ matrix.xcode_version }}.app/Contents/Developer"
runs-on: macos-13
steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,5 @@ DerivedData/
Tests/**/XCFrameworks/*

**/docs

Package.resolved
238 changes: 0 additions & 238 deletions Package.resolved

This file was deleted.

4 changes: 2 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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?

revision: "swift-5.9-RELEASE"),
.package(url: "https://github.com/apple/swift-log.git",
.upToNextMinor(from: "1.4.2")),
.package(url: "https://github.com/apple/swift-collections",
Expand Down
94 changes: 94 additions & 0 deletions [email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
// swift-tools-version: 5.6
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription
import Foundation

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.

],
products: [
.executable(name: "scipio",
targets: ["scipio"]),
.library(
name: "ScipioKit",
targets: ["ScipioKit"]),
.library(
name: "ScipioS3Storage",
targets: ["ScipioS3Storage"]),
],
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.

.package(url: "https://github.com/apple/swift-log.git",
.upToNextMinor(from: "1.4.2")),
.package(url: "https://github.com/apple/swift-collections",
from: "1.0.4"),
.package(url: "https://github.com/apple/swift-argument-parser.git",
from: "1.1.0"),
.package(url: "https://github.com/apple/swift-algorithms.git",
from: "1.0.0"),
.package(url: "https://github.com/onevcat/Rainbow",
.upToNextMinor(from: "4.0.1")),
.package(url: "https://github.com/soto-project/soto-codegenerator",
from: "0.6.0"),
.package(url: "https://github.com/soto-project/soto-core.git",
from: "6.4.0"),
],
targets: [
.executableTarget(name: "scipio",
dependencies: [
.target(name: "ScipioKit"),
.product(name: "ArgumentParser", package: "swift-argument-parser"),
]),
.target(
name: "ScipioKit",
dependencies: [
.product(name: "SwiftPMDataModel-auto", package: "swift-package-manager"),
.product(name: "XCBuildSupport", package: "swift-package-manager"),
.product(name: "Logging", package: "swift-log"),
.product(name: "Collections", package: "swift-collections"),
.product(name: "Algorithms", package: "swift-algorithms"),
.product(name: "Rainbow", package: "Rainbow"),
],
plugins: [
.plugin(name: "GenerateScipioVersion")
]
),
.plugin(
name: "GenerateScipioVersion",
capability: .buildTool()
),
.target(
name: "ScipioS3Storage",
dependencies: [
.target(name: "ScipioKit"),
.product(name: "SotoCore", package: "soto-core"),
],
plugins: [
.plugin(name: "SotoCodeGeneratorPlugin", package: "soto-codegenerator"),
]
),
.testTarget(
name: "ScipioKitTests",
dependencies: [
.target(name: "ScipioKit"),
],
exclude: ["Resources/Fixtures/"],
resources: [.copy("Resources/Fixtures")]),
.testTarget(
name: "ScipioS3StorageTests",
dependencies: ["ScipioS3Storage"]),
]
)

let isDevelopment = ProcessInfo.processInfo.environment["SCIPIO_DEVELOPMENT"] == "1"

// swift-docs is not needed for package users
if isDevelopment {
package.dependencies += [
.package(url: "https://github.com/apple/swift-docc-plugin", from: "1.3.0"),
]
}
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
# Scipio

![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/giginet/Scipio/tests.yml?style=flat-square&logo=github)
![Swift 5.9](https://img.shields.io/badge/Swift-5.9-FA7343?logo=swift&style=flat-square)
![Swift 5.8](https://img.shields.io/badge/Swift-5.8-FA7343?logo=swift&style=flat-square)
[![Xcode 15.0](https://img.shields.io/badge/Xcode-15.0-147EFB?style=flat-square&logo=xcode&link=https%3A%2F%2Fdeveloper.apple.com%2Fxcode%2F)](https://developer.apple.com/xcode/)
[![Xcode 14.3](https://img.shields.io/badge/Xcode-14.3-147EFB?style=flat-square&logo=xcode&link=https%3A%2F%2Fdeveloper.apple.com%2Fxcode%2F)](https://developer.apple.com/xcode/)
[![SwiftPM](https://img.shields.io/badge/SwiftPM-compatible-green?logo=swift&style=flat-square)](https://swift.org/package-manager/)
[![Documentation](https://img.shields.io/badge/Documentation-available-green?style=flat-square)](https://giginet.github.io/Scipio/documentation/scipio/)
![Platforms](https://img.shields.io/badge/Platform-iOS%7CmacOS%7CwatchOS%7CtvOS%7CvisionOS-lightgray?logo=apple&style=flat-square)
[![Xcode 14.3](https://img.shields.io/badge/Xcode-14.3-147EFB?style=flat-square&logo=xcode&link=https%3A%2F%2Fdeveloper.apple.com%2Fxcode%2F)
](https://developer.apple.com/xcode/)
[![Xcode 15.0](https://img.shields.io/badge/Xcode-15.0-147EFB?style=flat-square&logo=xcode&link=https%3A%2F%2Fdeveloper.apple.com%2Fxcode%2F)
](https://developer.apple.com/xcode/)
[![License](https://img.shields.io/badge/License-MIT-darkgray?style=flat-square)
](https://github.com/giginet/Scipio/blob/main/LICENSE.md)

Expand Down
Loading