Skip to content

Commit 06a06bd

Browse files
authored
Enable strict concurrency (#119)
## Summary Catch potential data races at build time. - Enabled strict concurrency checking in the Package.swift. - The package is warning-free with this setting out of the box, so no action. ## Test Plan Verified no warnings and tests pass locally on macOS, and then on Linux with 5.9, 5.10, and 6.0
1 parent 046eada commit 06a06bd

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Package.swift

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// swift-tools-version:5.7
1+
// swift-tools-version:5.9
22
//===----------------------------------------------------------------------===//
33
//
44
// This source file is part of the SwiftPrometheus open source project
@@ -44,3 +44,9 @@ let package = Package(
4444
),
4545
]
4646
)
47+
48+
for target in package.targets {
49+
var settings = target.swiftSettings ?? []
50+
settings.append(.enableExperimentalFeature("StrictConcurrency=complete"))
51+
target.swiftSettings = settings
52+
}

0 commit comments

Comments
 (0)