From 07e23e20af0d7529f4beaf778eb5ba02993778c3 Mon Sep 17 00:00:00 2001 From: Honza Dvorsky Date: Sat, 21 Dec 2024 13:12:44 +0100 Subject: [PATCH 1/3] [CI] Enable Linux nightly main on PRs --- .github/workflows/pull_request.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 4b6971bb..24f795cc 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -19,7 +19,7 @@ jobs: linux_5_10_arguments_override: "--explicit-target-dependency-import-check error" linux_6_0_arguments_override: "--explicit-target-dependency-import-check error" linux_nightly_6_0_arguments_override: "--explicit-target-dependency-import-check error" - linux_nightly_main_enabled: false + linux_nightly_main_arguments_override: "--explicit-target-dependency-import-check error" integration-test: name: Integration test @@ -27,4 +27,3 @@ jobs: with: name: "Integration test" matrix_linux_command: "apt-get update -yq && apt-get install -yq jq && ./scripts/run-integration-test.sh" - matrix_linux_nightly_main_enabled: false From a256492fd2526219e14e43fe469e5aa7c2c39cbc Mon Sep 17 00:00:00 2001 From: Honza Dvorsky Date: Sat, 21 Dec 2024 13:18:16 +0100 Subject: [PATCH 2/3] Fix missing imports detected by Swift 6.1+ --- Sources/OpenAPIRuntime/Base/Acceptable.swift | 1 + Sources/OpenAPIRuntime/Base/ContentDisposition.swift | 1 + Sources/OpenAPIRuntime/Interface/CurrencyTypes.swift | 1 + .../OpenAPIRuntime/Multipart/MultipartBoundaryGenerator.swift | 1 + Tests/OpenAPIRuntimeTests/Base/Test_OpenAPIValue.swift | 4 ++-- .../Multipart/Test_MultipartBytesToFramesSequence.swift | 1 + .../Multipart/Test_MultipartFramesToBytesSequence.swift | 1 + .../Multipart/Test_MultipartFramesToRawPartsSequence.swift | 1 + .../Multipart/Test_MultipartRawPartsToFramesSequence.swift | 1 + .../Multipart/Test_MultipartValidationSequence.swift | 1 + 10 files changed, 11 insertions(+), 2 deletions(-) diff --git a/Sources/OpenAPIRuntime/Base/Acceptable.swift b/Sources/OpenAPIRuntime/Base/Acceptable.swift index fb19799f..2f1b5e21 100644 --- a/Sources/OpenAPIRuntime/Base/Acceptable.swift +++ b/Sources/OpenAPIRuntime/Base/Acceptable.swift @@ -11,6 +11,7 @@ // SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// +import Foundation /// The protocol that all generated `AcceptableContentType` enums conform to. public protocol AcceptableProtocol: RawRepresentable, Sendable, Hashable, CaseIterable where RawValue == String {} diff --git a/Sources/OpenAPIRuntime/Base/ContentDisposition.swift b/Sources/OpenAPIRuntime/Base/ContentDisposition.swift index c0b25074..11a43dc0 100644 --- a/Sources/OpenAPIRuntime/Base/ContentDisposition.swift +++ b/Sources/OpenAPIRuntime/Base/ContentDisposition.swift @@ -11,6 +11,7 @@ // SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// +import Foundation /// A parsed representation of the `content-disposition` header described by RFC 6266 containing only /// the features relevant to OpenAPI multipart bodies. diff --git a/Sources/OpenAPIRuntime/Interface/CurrencyTypes.swift b/Sources/OpenAPIRuntime/Interface/CurrencyTypes.swift index 7093bd75..9e3e4542 100644 --- a/Sources/OpenAPIRuntime/Interface/CurrencyTypes.swift +++ b/Sources/OpenAPIRuntime/Interface/CurrencyTypes.swift @@ -13,6 +13,7 @@ //===----------------------------------------------------------------------===// import HTTPTypes +import Foundation /// A container for request metadata already parsed and validated /// by the server transport. diff --git a/Sources/OpenAPIRuntime/Multipart/MultipartBoundaryGenerator.swift b/Sources/OpenAPIRuntime/Multipart/MultipartBoundaryGenerator.swift index 39bc9d21..c3397ba2 100644 --- a/Sources/OpenAPIRuntime/Multipart/MultipartBoundaryGenerator.swift +++ b/Sources/OpenAPIRuntime/Multipart/MultipartBoundaryGenerator.swift @@ -11,6 +11,7 @@ // SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// +import Foundation /// A generator of a new boundary string used by multipart messages to separate parts. public protocol MultipartBoundaryGenerator: Sendable { diff --git a/Tests/OpenAPIRuntimeTests/Base/Test_OpenAPIValue.swift b/Tests/OpenAPIRuntimeTests/Base/Test_OpenAPIValue.swift index 7049502e..277044b0 100644 --- a/Tests/OpenAPIRuntimeTests/Base/Test_OpenAPIValue.swift +++ b/Tests/OpenAPIRuntimeTests/Base/Test_OpenAPIValue.swift @@ -12,8 +12,8 @@ // //===----------------------------------------------------------------------===// import XCTest -#if canImport(Foundation) -@preconcurrency import Foundation +import Foundation +#if canImport(CoreFoundation) import CoreFoundation #endif @_spi(Generated) @testable import OpenAPIRuntime diff --git a/Tests/OpenAPIRuntimeTests/Multipart/Test_MultipartBytesToFramesSequence.swift b/Tests/OpenAPIRuntimeTests/Multipart/Test_MultipartBytesToFramesSequence.swift index acdee3f4..36eb2301 100644 --- a/Tests/OpenAPIRuntimeTests/Multipart/Test_MultipartBytesToFramesSequence.swift +++ b/Tests/OpenAPIRuntimeTests/Multipart/Test_MultipartBytesToFramesSequence.swift @@ -14,6 +14,7 @@ import XCTest @_spi(Generated) @testable import OpenAPIRuntime import Foundation +import HTTPTypes final class Test_MultipartBytesToFramesSequence: Test_Runtime { func test() async throws { diff --git a/Tests/OpenAPIRuntimeTests/Multipart/Test_MultipartFramesToBytesSequence.swift b/Tests/OpenAPIRuntimeTests/Multipart/Test_MultipartFramesToBytesSequence.swift index de487ed6..da87af47 100644 --- a/Tests/OpenAPIRuntimeTests/Multipart/Test_MultipartFramesToBytesSequence.swift +++ b/Tests/OpenAPIRuntimeTests/Multipart/Test_MultipartFramesToBytesSequence.swift @@ -14,6 +14,7 @@ import XCTest @_spi(Generated) @testable import OpenAPIRuntime import Foundation +import HTTPTypes final class Test_MultipartFramesToBytesSequence: Test_Runtime { func test() async throws { diff --git a/Tests/OpenAPIRuntimeTests/Multipart/Test_MultipartFramesToRawPartsSequence.swift b/Tests/OpenAPIRuntimeTests/Multipart/Test_MultipartFramesToRawPartsSequence.swift index 4a75b727..143993a7 100644 --- a/Tests/OpenAPIRuntimeTests/Multipart/Test_MultipartFramesToRawPartsSequence.swift +++ b/Tests/OpenAPIRuntimeTests/Multipart/Test_MultipartFramesToRawPartsSequence.swift @@ -14,6 +14,7 @@ import XCTest @_spi(Generated) @testable import OpenAPIRuntime import Foundation +import HTTPTypes final class Test_MultipartFramesToRawPartsSequence: Test_Runtime { func test() async throws { diff --git a/Tests/OpenAPIRuntimeTests/Multipart/Test_MultipartRawPartsToFramesSequence.swift b/Tests/OpenAPIRuntimeTests/Multipart/Test_MultipartRawPartsToFramesSequence.swift index 5017e532..826ef34f 100644 --- a/Tests/OpenAPIRuntimeTests/Multipart/Test_MultipartRawPartsToFramesSequence.swift +++ b/Tests/OpenAPIRuntimeTests/Multipart/Test_MultipartRawPartsToFramesSequence.swift @@ -14,6 +14,7 @@ import XCTest @_spi(Generated) @testable import OpenAPIRuntime import Foundation +import HTTPTypes final class Test_MultipartRawPartsToFramesSequence: Test_Runtime { func test() async throws { diff --git a/Tests/OpenAPIRuntimeTests/Multipart/Test_MultipartValidationSequence.swift b/Tests/OpenAPIRuntimeTests/Multipart/Test_MultipartValidationSequence.swift index 3951e864..0343966a 100644 --- a/Tests/OpenAPIRuntimeTests/Multipart/Test_MultipartValidationSequence.swift +++ b/Tests/OpenAPIRuntimeTests/Multipart/Test_MultipartValidationSequence.swift @@ -14,6 +14,7 @@ import XCTest @_spi(Generated) @testable import OpenAPIRuntime import Foundation +import HTTPTypes final class Test_MultipartValidationSequence: Test_Runtime { func test() async throws { From 13cd4ad1862ad9b097679433d4ecef307b03ec61 Mon Sep 17 00:00:00 2001 From: Honza Dvorsky Date: Sat, 21 Dec 2024 13:21:40 +0100 Subject: [PATCH 3/3] Don't enable integration test yet --- .github/workflows/pull_request.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 24f795cc..6f244b2a 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -27,3 +27,4 @@ jobs: with: name: "Integration test" matrix_linux_command: "apt-get update -yq && apt-get install -yq jq && ./scripts/run-integration-test.sh" + matrix_linux_nightly_main_enabled: false