From 65e59592500167dd1904182ea2267aafd45f491b Mon Sep 17 00:00:00 2001 From: John Szumski Date: Wed, 29 May 2024 13:58:32 -0400 Subject: [PATCH] Apply strict concurrency for Bazel and SPM builds --- BUILD.bazel | 2 ++ Package.swift | 12 +++++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/BUILD.bazel b/BUILD.bazel index 776f42e..8a4a898 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -12,6 +12,7 @@ swift_library( name = "Paralayout.lib", srcs = glob(["Paralayout/**/*.swift"]), module_name = "Paralayout", + copts = ["-strict-concurrency=complete"], tags = ["manual"], visibility = ["//visibility:public"], deps = [], @@ -22,6 +23,7 @@ swift_library( testonly = True, srcs = glob(["ParalayoutTests/**/*.swift"]), module_name = "ParalayoutTests", + copts = ["-strict-concurrency=complete"], tags = ["manual"], deps = [":Paralayout.lib"], ) diff --git a/Package.swift b/Package.swift index 75c67c5..5d999f2 100644 --- a/Package.swift +++ b/Package.swift @@ -1,4 +1,4 @@ -// swift-tools-version:5.0.1 +// swift-tools-version:5.10.0 // // Copyright 2020 Square Inc. @@ -33,12 +33,18 @@ let package = Package( .target( name: "Paralayout", dependencies: [], - path: "Paralayout" + path: "Paralayout", + swiftSettings: [ + .enableExperimentalFeature("StrictConcurrency") + ] ), .testTarget( name: "ParalayoutTests", dependencies: ["Paralayout"], - path: "ParalayoutTests" + path: "ParalayoutTests", + swiftSettings: [ + .enableExperimentalFeature("StrictConcurrency") + ] ), ], swiftLanguageVersions: [.v5]