Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upping minimum support to swift 5.8 #40

Merged
merged 2 commits into from
Mar 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
5 changes: 1 addition & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,12 @@ on:
jobs:
build:

runs-on: macos-12
runs-on: macos-14

steps:
- name: Checkout Project
uses: actions/checkout@v3

- name: Switch to Xcode 13.4.1
run: sudo xcode-select -s /Applications/Xcode_13.4.1.app

- name: Show Build Version
run: xcodebuild -version

Expand Down
34 changes: 4 additions & 30 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,36 +1,10 @@
// swift-tools-version: 5.6
// swift-tools-version: 5.8

import PackageDescription

var globalSwiftSettings: [PackageDescription.SwiftSetting] = []
#if canImport(Foundation)
#if swift(>=5.7) // && swift(<5.8)
import Foundation

if ProcessInfo.processInfo.environment["CI"] != nil {
globalSwiftSettings.append(.unsafeFlags(["-Xfrontend", "-strict-concurrency=complete"]))
/*
Summation from https://www.donnywals.com/enabling-concurrency-warnings-in-xcode-14/
Set `strict-concurrency` to `targeted` to enforce Sendable and actor-isolation checks
in your code. This explicitly verifies that `Sendable` constraints are met when you
mark one of your types as `Sendable`.

This mode is essentially a bit of a hybrid between the behavior that's intended in
Swift 6, and the default in Swift 5.7. Use this mode to have a bit of checking on
your code that uses Swift concurrency without too many warnings and / or errors in
your current codebase.

Set `strict-concurrency` to `complete` to get the full suite of concurrency
constraints, essentially as they will work in Swift 6.
*/
}
// #elseif swift(>=5.8)
// import Foundation
// if ProcessInfo.processInfo.environment["CI"] != nil {
// globalSwiftSettings.append(.enableExperimentalFeature("StrictConcurrency"))
// }
#endif
#endif
var globalSwiftSettings: [PackageDescription.SwiftSetting] = [
.enableExperimentalFeature("StrictConcurrency")
]

let package = Package(
name: "CRDT",
Expand Down
Loading