Skip to content

Commit

Permalink
Merge pull request #5 from Headbright/v2-swift-concurrency
Browse files Browse the repository at this point in the history
Upgrade tooling to Swift 5.10 and enable StrictConcurrency
  • Loading branch information
kkostov authored Sep 7, 2024
2 parents 923da19 + a825c6b commit ad4dd0e
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
build:
strategy:
matrix:
os: [macos-13]
os: [macos-14]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
Expand Down
8 changes: 6 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -26,7 +26,11 @@ 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: "FeedbackBulb", resources: [.copy("PrivacyInfo.xcprivacy")]),
name: "FeedbackBulb",
resources: [.copy("PrivacyInfo.xcprivacy")],
swiftSettings: [
.enableExperimentalFeature("StrictConcurrency")
]),
.target(
name: "FeedbackBulb.Toolbox",
dependencies: ["FeedbackBulb"], resources: [.copy("PrivacyInfo.xcprivacy")]),
Expand Down
13 changes: 10 additions & 3 deletions Sources/FeedbackBulb/Logger.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
import Foundation
import OSLog

var loggerMain = Logger(subsystem: "eu.headbright.fbb.lib", category: "main")
var loggerRequest = Logger(subsystem: "eu.headbright.fbb.lib", category: "request")
var loggerResponse = Logger(subsystem: "eu.headbright.fbb.lib", category: "response")
#if swift(>=6.0)
#warning("Reevaluate whether this decoration is necessary.")
#endif

nonisolated(unsafe) let loggerMain = Logger(
subsystem: "eu.headbright.fbb.lib", category: "main")
nonisolated(unsafe) let loggerRequest = Logger(
subsystem: "eu.headbright.fbb.lib", category: "request")
nonisolated(unsafe) let loggerResponse = Logger(
subsystem: "eu.headbright.fbb.lib", category: "response")

0 comments on commit ad4dd0e

Please sign in to comment.