From 7a54fed1c8cffa14f547548799f6c63f73f958d5 Mon Sep 17 00:00:00 2001 From: Toshiki Takezawa Date: Tue, 26 Nov 2024 22:49:27 +0900 Subject: [PATCH 1/3] Update `swift-syntax` --- Package.resolved | 8 ++++---- Package.swift | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Package.resolved b/Package.resolved index df43639..7609f24 100644 --- a/Package.resolved +++ b/Package.resolved @@ -1,13 +1,13 @@ { - "originHash" : "487e1e30174d4436cc5a82da699f1b72adb6f0c6ea350189369485c80bcd6dee", + "originHash" : "f284afc3b84d3c2e448b7f31ef551749f7ecb59c7282ff443eab872bab10a2cf", "pins" : [ { "identity" : "swift-syntax", "kind" : "remoteSourceControl", - "location" : "https://github.com/apple/swift-syntax.git", + "location" : "https://github.com/swiftlang/swift-syntax.git", "state" : { - "revision" : "303e5c5c36d6a558407d364878df131c3546fad8", - "version" : "510.0.2" + "revision" : "0687f71944021d616d34d922343dcef086855920", + "version" : "600.0.1" } } ], diff --git a/Package.swift b/Package.swift index 6c95aee..cf49f51 100644 --- a/Package.swift +++ b/Package.swift @@ -24,7 +24,7 @@ let package = Package( ), ], dependencies: [ - .package(url: "https://github.com/apple/swift-syntax.git", from: "510.0.0"), + .package(url: "https://github.com/swiftlang/swift-syntax.git", from: "600.0.0"), ], targets: [ .executableTarget( From f3573868f78bc2ce18f9a15c6cdc59d924bca7f7 Mon Sep 17 00:00:00 2001 From: Toshiki Takezawa Date: Tue, 26 Nov 2024 22:51:41 +0900 Subject: [PATCH 2/3] Bump up swift-tools-version to 6.0 --- Package.swift | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Package.swift b/Package.swift index cf49f51..89f9778 100644 --- a/Package.swift +++ b/Package.swift @@ -1,5 +1,4 @@ -// swift-tools-version: 5.10 -// The swift-tools-version declares the minimum version of Swift required to build this package. +// swift-tools-version: 6.0 import PackageDescription import CompilerPluginSupport From 940c4d53feb2e11e3bed5317cdf16d1c2939d9d2 Mon Sep 17 00:00:00 2001 From: Toshiki Takezawa Date: Wed, 27 Nov 2024 00:28:21 +0900 Subject: [PATCH 3/3] Update to Swift6.0 --- .github/workflows/ci.yml | 6 +++++- README.md | 2 +- Sources/Interface/LogProcess.swift | 5 +++-- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3bedf9a..e936fe2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,6 +19,10 @@ jobs: os: [macos-latest] runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v3 + - uses: SwiftyLab/setup-swift@latest + with: + swift-version: "6.0" + - name: Checkout + uses: actions/checkout@v4 - name: Run tests run: swift test --parallel diff --git a/README.md b/README.md index c8ae2f7..de0877f 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # LogMacro -![Swift 5](https://img.shields.io/badge/swift-5-orange.svg) +![Swift 6](https://img.shields.io/badge/swift-6-orange.svg) ![SPM compatible](https://img.shields.io/badge/SPM-Compatible-brightgreen.svg) ![MIT License](https://img.shields.io/badge/license-MIT-brightgreen.svg) diff --git a/Sources/Interface/LogProcess.swift b/Sources/Interface/LogProcess.swift index 6ba7271..2229cfa 100644 --- a/Sources/Interface/LogProcess.swift +++ b/Sources/Interface/LogProcess.swift @@ -7,12 +7,13 @@ public protocol LogPostActionPlugin { } public final class LogProcess { - public static let shared = LogProcess() - private var enabledLogLevel: LogLevel = .debug private var replacingPlugin: LogReplacingPlugin? private var postActionPlugins: [LogPostActionPlugin] = [] + public nonisolated(unsafe) static let shared = LogProcess() + private init() {} + public func setEnabledLogLevel(_ level: LogLevel) { self.enabledLogLevel = level }