From ba9c9f2397d95800518d42b029407328c1799c14 Mon Sep 17 00:00:00 2001 From: Mads Odgaard Date: Tue, 17 Mar 2026 14:40:12 +0100 Subject: [PATCH 1/3] disable traits --- Package.swift | 4 +- Package@swift-6.0.swift | 81 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 83 insertions(+), 2 deletions(-) create mode 100644 Package@swift-6.0.swift diff --git a/Package.swift b/Package.swift index eb6c9b3..0d208fa 100644 --- a/Package.swift +++ b/Package.swift @@ -1,4 +1,4 @@ -// swift-tools-version:6.0 +// swift-tools-version:6.1 //===----------------------------------------------------------------------===// // // This source file is part of the SwiftOpenAPIGenerator open source project @@ -34,7 +34,7 @@ let package = Package( platforms: [.macOS(.v10_15), .macCatalyst(.v13), .iOS(.v13), .tvOS(.v13), .watchOS(.v6), .visionOS(.v1)], products: [.library(name: "OpenAPIURLSession", targets: ["OpenAPIURLSession"])], dependencies: [ - .package(url: "https://github.com/apple/swift-openapi-runtime", from: "1.8.2"), + .package(url: "https://github.com/apple/swift-openapi-runtime", from: "1.11.0", traits: []), .package(url: "https://github.com/apple/swift-http-types", from: "1.0.0"), .package(url: "https://github.com/apple/swift-collections", from: "1.0.0"), ], diff --git a/Package@swift-6.0.swift b/Package@swift-6.0.swift new file mode 100644 index 0000000..eb6c9b3 --- /dev/null +++ b/Package@swift-6.0.swift @@ -0,0 +1,81 @@ +// swift-tools-version:6.0 +//===----------------------------------------------------------------------===// +// +// This source file is part of the SwiftOpenAPIGenerator open source project +// +// Copyright (c) 2023 Apple Inc. and the SwiftOpenAPIGenerator project authors +// Licensed under Apache License v2.0 +// +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of SwiftOpenAPIGenerator project authors +// +// SPDX-License-Identifier: Apache-2.0 +// +//===----------------------------------------------------------------------===// +import Foundation +import PackageDescription + +// General Swift-settings for all targets. +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"), + ]) +} + +let package = Package( + name: "swift-openapi-urlsession", + platforms: [.macOS(.v10_15), .macCatalyst(.v13), .iOS(.v13), .tvOS(.v13), .watchOS(.v6), .visionOS(.v1)], + products: [.library(name: "OpenAPIURLSession", targets: ["OpenAPIURLSession"])], + dependencies: [ + .package(url: "https://github.com/apple/swift-openapi-runtime", from: "1.8.2"), + .package(url: "https://github.com/apple/swift-http-types", from: "1.0.0"), + .package(url: "https://github.com/apple/swift-collections", from: "1.0.0"), + ], + targets: [ + .target( + name: "OpenAPIURLSession", + dependencies: [ + .product(name: "DequeModule", package: "swift-collections"), + .product(name: "OpenAPIRuntime", package: "swift-openapi-runtime"), + .product(name: "HTTPTypes", package: "swift-http-types"), + ], + swiftSettings: swiftSettings + ), + .testTarget( + name: "OpenAPIURLSessionTests", + dependencies: ["OpenAPIURLSession"], + swiftSettings: swiftSettings + ), + ] +) + +#if !os(Windows) // NIO not yet supported on Windows +// Test-only dependencies. +package.dependencies += [.package(url: "https://github.com/apple/swift-nio", from: "2.62.0")] +package.targets.forEach { target in + if target.name == "OpenAPIURLSessionTests" { + target.dependencies += [.product(name: "NIOTestUtils", package: "swift-nio")] + } +} +#endif + +// --- STANDARD CROSS-REPO SETTINGS DO NOT EDIT --- // +for target in package.targets { + switch target.type { + case .regular, .test, .executable: + var settings = target.swiftSettings ?? [] + // https://github.com/swiftlang/swift-evolution/blob/main/proposals/0444-member-import-visibility.md + settings.append(.enableUpcomingFeature("MemberImportVisibility")) + target.swiftSettings = settings + case .macro, .plugin, .system, .binary: () // not applicable + @unknown default: () // we don't know what to do here, do nothing + } +} +// --- END: STANDARD CROSS-REPO SETTINGS DO NOT EDIT --- // From cd461e995754f8c8b03e4e732448d067a5a2804a Mon Sep 17 00:00:00 2001 From: Mads Odgaard Date: Wed, 18 Mar 2026 12:26:54 +0100 Subject: [PATCH 2/3] update ignore files --- .licenseignore | 1 + .swiftformatignore | 1 + 2 files changed, 2 insertions(+) diff --git a/.licenseignore b/.licenseignore index b7fad47..9cb97a1 100644 --- a/.licenseignore +++ b/.licenseignore @@ -7,4 +7,5 @@ **.md **.txt **Package.swift +Package@swift-*.swift .editorconfig diff --git a/.swiftformatignore b/.swiftformatignore index ef0b696..334d56c 100644 --- a/.swiftformatignore +++ b/.swiftformatignore @@ -1 +1,2 @@ **Package.swift +Package@swift-*.swift \ No newline at end of file From ea9ed427eaf44adde7afabd49ed55c9f37ed69c2 Mon Sep 17 00:00:00 2001 From: Mads Odgaard Date: Wed, 8 Apr 2026 08:34:30 +0200 Subject: [PATCH 3/3] delete 6.0 manifest --- Package@swift-6.0.swift | 81 ----------------------------------------- 1 file changed, 81 deletions(-) delete mode 100644 Package@swift-6.0.swift diff --git a/Package@swift-6.0.swift b/Package@swift-6.0.swift deleted file mode 100644 index eb6c9b3..0000000 --- a/Package@swift-6.0.swift +++ /dev/null @@ -1,81 +0,0 @@ -// swift-tools-version:6.0 -//===----------------------------------------------------------------------===// -// -// This source file is part of the SwiftOpenAPIGenerator open source project -// -// Copyright (c) 2023 Apple Inc. and the SwiftOpenAPIGenerator project authors -// Licensed under Apache License v2.0 -// -// See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of SwiftOpenAPIGenerator project authors -// -// SPDX-License-Identifier: Apache-2.0 -// -//===----------------------------------------------------------------------===// -import Foundation -import PackageDescription - -// General Swift-settings for all targets. -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"), - ]) -} - -let package = Package( - name: "swift-openapi-urlsession", - platforms: [.macOS(.v10_15), .macCatalyst(.v13), .iOS(.v13), .tvOS(.v13), .watchOS(.v6), .visionOS(.v1)], - products: [.library(name: "OpenAPIURLSession", targets: ["OpenAPIURLSession"])], - dependencies: [ - .package(url: "https://github.com/apple/swift-openapi-runtime", from: "1.8.2"), - .package(url: "https://github.com/apple/swift-http-types", from: "1.0.0"), - .package(url: "https://github.com/apple/swift-collections", from: "1.0.0"), - ], - targets: [ - .target( - name: "OpenAPIURLSession", - dependencies: [ - .product(name: "DequeModule", package: "swift-collections"), - .product(name: "OpenAPIRuntime", package: "swift-openapi-runtime"), - .product(name: "HTTPTypes", package: "swift-http-types"), - ], - swiftSettings: swiftSettings - ), - .testTarget( - name: "OpenAPIURLSessionTests", - dependencies: ["OpenAPIURLSession"], - swiftSettings: swiftSettings - ), - ] -) - -#if !os(Windows) // NIO not yet supported on Windows -// Test-only dependencies. -package.dependencies += [.package(url: "https://github.com/apple/swift-nio", from: "2.62.0")] -package.targets.forEach { target in - if target.name == "OpenAPIURLSessionTests" { - target.dependencies += [.product(name: "NIOTestUtils", package: "swift-nio")] - } -} -#endif - -// --- STANDARD CROSS-REPO SETTINGS DO NOT EDIT --- // -for target in package.targets { - switch target.type { - case .regular, .test, .executable: - var settings = target.swiftSettings ?? [] - // https://github.com/swiftlang/swift-evolution/blob/main/proposals/0444-member-import-visibility.md - settings.append(.enableUpcomingFeature("MemberImportVisibility")) - target.swiftSettings = settings - case .macro, .plugin, .system, .binary: () // not applicable - @unknown default: () // we don't know what to do here, do nothing - } -} -// --- END: STANDARD CROSS-REPO SETTINGS DO NOT EDIT --- //