From 32cd8a398d18de783c62b6bcdc58290db2086226 Mon Sep 17 00:00:00 2001 From: Honza Dvorsky Date: Mon, 17 Jul 2023 11:24:26 +0200 Subject: [PATCH] Disable ExistentialAny temporarily (#122) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Disable ExistentialAny temporarily ### Motivation Unfortunately until we adopt 5.9, adding ExistentialAny on upstream packages has unintended consequences for some downstream packages, so disabling for now. Details in https://github.com/apple/swift-openapi-generator/issues/120 ### Modifications Disabled the feature enforcement, but the code changes are there, so downstream adopters can still use them. ### Result We won't be seeing the issue described in https://github.com/apple/swift-openapi-generator/issues/120. ### Test Plan PR CI, which discovered the original issue. Reviewed by: simonjbeaumont Builds: ✔︎ pull request validation (5.8) - Build finished. ✔︎ pull request validation (5.9) - Build finished. ✔︎ pull request validation (docc test) - Build finished. ✔︎ pull request validation (integration test) - Build finished. ✔︎ pull request validation (nightly) - Build finished. ✔︎ pull request validation (soundness) - Build finished. https://github.com/apple/swift-openapi-generator/pull/122 --- Package.swift | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Package.swift b/Package.swift index 808b7d15..fdcaeb5a 100644 --- a/Package.swift +++ b/Package.swift @@ -15,11 +15,15 @@ import PackageDescription // General Swift-settings for all targets. -let swiftSettings: [SwiftSetting] = [ +var swiftSettings: [SwiftSetting] = [] + +#if swift(>=5.9) +swiftSettings.append( // https://github.com/apple/swift-evolution/blob/main/proposals/0335-existential-any.md // Require `any` for existential types. .enableUpcomingFeature("ExistentialAny") -] +) +#endif let package = Package( name: "swift-openapi-generator",