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

Move to Swift 5.9 as the minimum version #394

Merged
merged 1 commit into from
Nov 27, 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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion Examples/GreetingService/Package.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// swift-tools-version:5.8
// swift-tools-version:5.9
//===----------------------------------------------------------------------===//
//
// This source file is part of the SwiftOpenAPIGenerator open source project
Expand Down
2 changes: 1 addition & 1 deletion IntegrationTest/Package.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// swift-tools-version:5.8
// swift-tools-version:5.9
//===----------------------------------------------------------------------===//
//
// This source file is part of the SwiftOpenAPIGenerator open source project
Expand Down
10 changes: 3 additions & 7 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// swift-tools-version:5.8
// swift-tools-version:5.9
//===----------------------------------------------------------------------===//
//
// This source file is part of the SwiftOpenAPIGenerator open source project
Expand All @@ -16,22 +16,18 @@ import Foundation
import PackageDescription

// General Swift-settings for all targets.
var swiftSettings: [SwiftSetting] = []

#if swift(>=5.9)
swiftSettings.append(
var swiftSettings: [SwiftSetting] = [
// https://github.com/apple/swift-evolution/blob/main/proposals/0335-existential-any.md
// Require `any` for existential types.
.enableUpcomingFeature("ExistentialAny")
)
]

// Strict concurrency is enabled in CI; use this environment variable to enable it locally.
if ProcessInfo.processInfo.environment["SWIFT_OPENAPI_STRICT_CONCURRENCY"].flatMap(Bool.init) ?? false {
swiftSettings.append(contentsOf: [
.define("SWIFT_OPENAPI_STRICT_CONCURRENCY"), .enableExperimentalFeature("StrictConcurrency"),
])
}
#endif

let package = Package(
name: "swift-openapi-generator",
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ Choose one of the transports listed below, or create your own by adopting the `C
| Generator versions | Supported OpenAPI versions | Minimum Swift version |
| -------- | ------- | ----- |
| `0.1.0` ... `0.1.11` | 3.0 | 5.8 |
| `0.1.12` ... `main` | 3.0, 3.1 | 5.8 |
| `0.1.12` ... `0.3.5` | 3.0, 3.1 | 5.8 |
| `1.0.0-alpha.1` ... `main` | 3.0, 3.1 | 5.9 |

### Supported platforms and minimum versions

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ Choose one of the transports listed below, or create your own by adopting the `C
| Generator versions | Supported OpenAPI versions | Minimum Swift version |
| -------- | ------- | ----- |
| `0.1.0` ... `0.1.11` | 3.0 | 5.8 |
| `0.1.12` ... `main` | 3.0, 3.1 | 5.8 |
| `0.1.12` ... `0.3.5` | 3.0, 3.1 | 5.8 |
| `1.0.0-alpha.1` ... `main` | 3.0, 3.1 | 5.9 |

See also <doc:Supported-OpenAPI-features>.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ fileprivate extension CompatibilityTest {
XCTAssertNoThrow(try FileManager.default.createDirectory(at: packageDir, withIntermediateDirectories: true))
let packageSwiftPath = packageDir.appendingPathComponent("Package.swift", isDirectory: false)
let packageSwiftContents = """
// swift-tools-version:5.8
// swift-tools-version:5.9
import PackageDescription
let package = Package(
name: "\(packageName)",
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG swift_version=5.8
ARG swift_version=5.9
ARG ubuntu_version=jammy
ARG base_image=swift:${swift_version}-${ubuntu_version}

Expand Down
18 changes: 0 additions & 18 deletions docker/docker-compose.2204.58.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion docker/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
# % docker-compose \
# -f docker/docker-compose.yaml \
# -f docker/docker-compose.2204.58.yaml \
# -f docker/docker-compose.2204.59.yaml \
# run test
#
version: "3"
Expand Down