From 8f3204a17783f566cacd8dcefc46dec31c174000 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gwendal=20Roue=CC=81?= Date: Sun, 28 Jul 2024 12:04:15 +0200 Subject: [PATCH] Bump minimum Swift version to 5.10 --- .github/workflows/run_tests.yml | 4 ++-- Package.swift | 16 +++++++++++----- README.md | 2 +- 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml index 1c23643..e646460 100644 --- a/.github/workflows/run_tests.yml +++ b/.github/workflows/run_tests.yml @@ -23,13 +23,13 @@ jobs: strategy: matrix: os: [macos-latest, ubuntu-latest] - swift-version: ["5.7.0"] + swift-version: ["5.10.0"] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v3 - name: Install Swift ${{ matrix.swift-version }} if: ${{ runner.os != 'Windows' }} - uses: swift-actions/setup-swift@v1 + uses: swift-actions/setup-swift@v2 with: swift-version: ${{ matrix.swift-version }} - name: Test diff --git a/Package.swift b/Package.swift index 3ad4575..8af68c5 100644 --- a/Package.swift +++ b/Package.swift @@ -1,4 +1,4 @@ -// swift-tools-version: 5.7 +// swift-tools-version: 5.10 // The swift-tools-version declares the minimum version of Swift required to build this package. import PackageDescription @@ -25,12 +25,18 @@ let package = Package( // Targets are the basic building blocks of a package. A target can define a module or a test suite. // Targets can depend on other targets in this package, and on products in packages this package depends on. .target( - name: "Semaphore", - swiftSettings: [ - // .unsafeFlags(["-Xfrontend", "-warn-concurrency", "-strict-concurrency=complete"]), - ]), + name: "Semaphore"), .testTarget( name: "SemaphoreTests", dependencies: ["Semaphore"]), ] ) + +for target in package.targets { + var settings = target.swiftSettings ?? [] + settings.append(contentsOf: [ + // + .enableExperimentalFeature("StrictConcurrency"), + ]) + target.swiftSettings = settings +} diff --git a/README.md b/README.md index 5aaf0f4..8a31fb0 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ **A Synchronization Primitive for Swift Concurrency** -**Requirements**: iOS 13.0+ / macOS 10.15+ / tvOS 13.0+ / watchOS 6.0+ • Swift 5.7+ / Xcode 14+ +**Requirements**: iOS 13.0+ / macOS 10.15+ / tvOS 13.0+ / watchOS 6.0+ • Swift 5.10+ / Xcode 15.3+ 📖 **[Documentation](https://swiftpackageindex.com/groue/Semaphore/documentation)**