Skip to content

Commit

Permalink
Only add the flags on 6.0 or newer
Browse files Browse the repository at this point in the history
  • Loading branch information
czechboy0 committed Dec 17, 2024
1 parent f0790d4 commit c7a1ab9
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,17 @@
import PackageDescription

// General Swift-settings for all targets.
let swiftSettings: [SwiftSetting] = [
var swiftSettings: [SwiftSetting] = [
// https://github.com/swiftlang/swift-evolution/blob/main/proposals/0335-existential-any.md
.enableUpcomingFeature("ExistentialAny"),
.enableUpcomingFeature("ExistentialAny")
]
#if compiler(>=6.0)
swiftSettings.append(contentsOf: [
// https://github.com/swiftlang/swift-evolution/blob/main/proposals/0409-access-level-on-imports.md
.enableUpcomingFeature("InternalImportsByDefault"),
.enableExperimentalFeature("AccessLevelOnImport"),
]
])
#endif

let package = Package(
name: "swift-openapi-runtime",
Expand Down

0 comments on commit c7a1ab9

Please sign in to comment.