Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 29 additions & 6 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import class Foundation.ProcessInfo
func generateDependencies() -> [Package.Dependency] {
if ProcessInfo.processInfo.environment["SWIFTCI_USE_LOCAL_DEPS"] == nil {
return [
.package(url: "https://github.com/apple/swift-nio.git", from: "2.54.0")
.package(url: "https://github.com/apple/swift-nio.git", from: "2.80.0")
]
} else {
return [
Expand All @@ -54,6 +54,24 @@ let includePrivacyManifest = true
let includePrivacyManifest = false
#endif

let strictConcurrencyDevelopment = true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't want to check this in as true do we?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, fixed.


let strictConcurrencySettings: [SwiftSetting] = {
var initialSettings: [SwiftSetting] = []
initialSettings.append(contentsOf: [
.enableUpcomingFeature("StrictConcurrency"),
.enableUpcomingFeature("InferSendableFromCaptures"),
])

if strictConcurrencyDevelopment {
// -warnings-as-errors here is a workaround so that IDE-based development can
// get tripped up on -require-explicit-sendable.
initialSettings.append(.unsafeFlags(["-require-explicit-sendable", "-warnings-as-errors"]))
}

return initialSettings
}()

// swift-format-ignore: NoBlockComments
let package = Package(
name: "swift-nio-ssl",
Expand Down Expand Up @@ -95,7 +113,8 @@ let package = Package(
.product(name: "NIOTLS", package: "swift-nio"),
],
exclude: includePrivacyManifest ? [] : ["PrivacyInfo.xcprivacy"],
resources: includePrivacyManifest ? [.copy("PrivacyInfo.xcprivacy")] : []
resources: includePrivacyManifest ? [.copy("PrivacyInfo.xcprivacy")] : [],
swiftSettings: strictConcurrencySettings
),
.executableTarget(
name: "NIOTLSServer",
Expand All @@ -107,7 +126,8 @@ let package = Package(
],
exclude: [
"README.md"
]
],
swiftSettings: strictConcurrencySettings
),
.executableTarget(
name: "NIOSSLHTTP1Client",
Expand All @@ -120,7 +140,8 @@ let package = Package(
],
exclude: [
"README.md"
]
],
swiftSettings: strictConcurrencySettings
),
.executableTarget(
name: "NIOSSLPerformanceTester",
Expand All @@ -129,7 +150,8 @@ let package = Package(
.product(name: "NIOCore", package: "swift-nio"),
.product(name: "NIOEmbedded", package: "swift-nio"),
.product(name: "NIOTLS", package: "swift-nio"),
]
],
swiftSettings: strictConcurrencySettings
),
.testTarget(
name: "NIOSSLTests",
Expand All @@ -139,7 +161,8 @@ let package = Package(
.product(name: "NIOEmbedded", package: "swift-nio"),
.product(name: "NIOPosix", package: "swift-nio"),
.product(name: "NIOTLS", package: "swift-nio"),
]
],
swiftSettings: strictConcurrencySettings
),
],
cxxLanguageStandard: .cxx17
Expand Down
Loading