Skip to content

Commit 0b99785

Browse files
authored
Move to Swift 5.9 as the minimum version (#32)
### Motivation Part of addressing apple/swift-openapi-generator#75 and apple/swift-openapi-generator#119. ### Modifications Bumped Swift tools version to 5.9 and made the `ExistentialAny` build setting unconditional. ### Result Building the package requires 5.9 now. ### Test Plan Ran tests, all passed when using a Swift 5.9 toolchain.
1 parent fa75a83 commit 0b99785

File tree

4 files changed

+5
-29
lines changed

4 files changed

+5
-29
lines changed

Package.swift

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// swift-tools-version: 5.8
1+
// swift-tools-version: 5.9
22
//===----------------------------------------------------------------------===//
33
//
44
// This source file is part of the SwiftOpenAPIGenerator open source project
@@ -16,23 +16,18 @@ import Foundation
1616
import PackageDescription
1717

1818
// General Swift-settings for all targets.
19-
var swiftSettings: [SwiftSetting] = []
20-
21-
#if swift(>=5.9)
22-
swiftSettings.append(
19+
var swiftSettings: [SwiftSetting] = [
2320
// https://github.com/apple/swift-evolution/blob/main/proposals/0335-existential-any.md
2421
// Require `any` for existential types.
2522
.enableUpcomingFeature("ExistentialAny")
26-
)
23+
]
2724

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

3732
let package = Package(
3833
name: "swift-openapi-urlsession",

docker/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
ARG swift_version=5.8
1+
ARG swift_version=5.9
22
ARG ubuntu_version=jammy
33
ARG base_image=swift:${swift_version}-${ubuntu_version}
44

docker/docker-compose.2204.58.yaml

Lines changed: 0 additions & 19 deletions
This file was deleted.

docker/docker-compose.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#
55
# % docker-compose \
66
# -f docker/docker-compose.yaml \
7-
# -f docker/docker-compose.2204.58.yaml \
7+
# -f docker/docker-compose.2204.59.yaml \
88
# run test
99
#
1010
version: "3"

0 commit comments

Comments
 (0)