From 00d895f0ea3857776be8b02ed1a9440eb736c837 Mon Sep 17 00:00:00 2001 From: Takeshi Shimada Date: Thu, 4 Sep 2025 04:37:12 +0900 Subject: [PATCH 1/2] docs: fix source code comment accuracy issues MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixed 8 documentation accuracy issues across the codebase: - LockmanComposableMacros.swift: Correct priority parameter type (priority: 100 → priority: .high(.exclusive)) - LockmanLogger.swift: Clarify build condition behavior description - LockmanInfo.swift: Add missing mode parameters in examples - LockmanCompositeAction.swift: Add missing mode parameter - LockmanCompositeInfo.swift: Add missing mode parameter - LockmanGroupCoordinatedAction.swift: Fix enum values (.leader(.none) → .leader(.emptyGroup)) - LockmanPriorityBasedAction.swift: Fix enum values (.high(.preferLater) → .high(.exclusive)) All issues were minor syntax corrections ensuring code examples in documentation comments match actual implementation APIs. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- Sources/Lockman/Composable/LockmanComposableMacros.swift | 2 +- Sources/Lockman/Core/Debug/LockmanLogger.swift | 2 +- Sources/Lockman/Core/Protocols/LockmanInfo.swift | 4 ++-- .../CompositeStrategy/LockmanCompositeAction.swift | 2 +- .../Strategies/CompositeStrategy/LockmanCompositeInfo.swift | 2 +- .../LockmanGroupCoordinatedAction.swift | 4 ++-- .../PriorityBasedStrategy/LockmanPriorityBasedAction.swift | 6 +++--- 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Sources/Lockman/Composable/LockmanComposableMacros.swift b/Sources/Lockman/Composable/LockmanComposableMacros.swift index c0757d15c5..9d470bbc69 100644 --- a/Sources/Lockman/Composable/LockmanComposableMacros.swift +++ b/Sources/Lockman/Composable/LockmanComposableMacros.swift @@ -187,7 +187,7 @@ public macro LockmanGroupCoordination() = /// LockmanCompositeInfo2( /// actionId: actionName, /// lockmanInfoForStrategy1: LockmanSingleExecutionInfo(actionId: actionName, mode: .boundary), -/// lockmanInfoForStrategy2: LockmanPriorityBasedInfo(actionId: actionName, priority: 100) +/// lockmanInfoForStrategy2: LockmanPriorityBasedInfo(actionId: actionName, priority: .high(.exclusive)) /// ) /// } /// } diff --git a/Sources/Lockman/Core/Debug/LockmanLogger.swift b/Sources/Lockman/Core/Debug/LockmanLogger.swift index 4c1ff35ba2..f518e9f115 100644 --- a/Sources/Lockman/Core/Debug/LockmanLogger.swift +++ b/Sources/Lockman/Core/Debug/LockmanLogger.swift @@ -4,7 +4,7 @@ import OSLog /// Debug logger for Lockman output. /// /// Provides thread-safe logging functionality for lock operations. -/// Only active in DEBUG builds to avoid performance impact in production. +/// Optimized for DEBUG builds with fallback functionality in production builds. @_spi(Logging) public final class LockmanLogger: @unchecked Sendable { // MARK: - Singleton diff --git a/Sources/Lockman/Core/Protocols/LockmanInfo.swift b/Sources/Lockman/Core/Protocols/LockmanInfo.swift index 6d02b79efb..2113c71866 100644 --- a/Sources/Lockman/Core/Protocols/LockmanInfo.swift +++ b/Sources/Lockman/Core/Protocols/LockmanInfo.swift @@ -19,10 +19,10 @@ import Foundation /// ## Examples /// ```swift /// // Single execution info -/// let singleInfo = LockmanSingleExecutionInfo(actionId: "login") +/// let singleInfo = LockmanSingleExecutionInfo(actionId: "login", mode: .boundary) /// /// // Priority-based info -/// let priorityInfo = LockmanPriorityBasedInfo(actionId: "sync", priority: .high(.preferLater)) +/// let priorityInfo = LockmanPriorityBasedInfo(actionId: "sync", priority: .high(.exclusive)) /// ``` public protocol LockmanInfo: Sendable, CustomDebugStringConvertible { /// The strategy identifier that created this lock info. diff --git a/Sources/Lockman/Core/Strategies/CompositeStrategy/LockmanCompositeAction.swift b/Sources/Lockman/Core/Strategies/CompositeStrategy/LockmanCompositeAction.swift index b7d8c79d7c..98d3d30c5a 100644 --- a/Sources/Lockman/Core/Strategies/CompositeStrategy/LockmanCompositeAction.swift +++ b/Sources/Lockman/Core/Strategies/CompositeStrategy/LockmanCompositeAction.swift @@ -17,7 +17,7 @@ /// func createLockmanInfo() -> LockmanCompositeInfo2 { /// LockmanCompositeInfo2( /// actionId: actionName, -/// lockmanInfoForStrategy1: LockmanSingleExecutionInfo(actionId: actionName), +/// lockmanInfoForStrategy1: LockmanSingleExecutionInfo(actionId: actionName, mode: .boundary), /// lockmanInfoForStrategy2: LockmanPriorityBasedInfo(actionId: actionName, priority: .high(.exclusive)) /// ) /// } diff --git a/Sources/Lockman/Core/Strategies/CompositeStrategy/LockmanCompositeInfo.swift b/Sources/Lockman/Core/Strategies/CompositeStrategy/LockmanCompositeInfo.swift index b893b24ed9..56965168be 100644 --- a/Sources/Lockman/Core/Strategies/CompositeStrategy/LockmanCompositeInfo.swift +++ b/Sources/Lockman/Core/Strategies/CompositeStrategy/LockmanCompositeInfo.swift @@ -12,7 +12,7 @@ import Foundation /// ```swift /// let compositeInfo = LockmanCompositeInfo2( /// actionId: "userLogin", -/// lockmanInfoForStrategy1: LockmanSingleExecutionInfo(actionId: "userLogin"), +/// lockmanInfoForStrategy1: LockmanSingleExecutionInfo(actionId: "userLogin", mode: .boundary), /// lockmanInfoForStrategy2: LockmanPriorityBasedInfo(actionId: "userLogin", priority: .high(.exclusive)) /// ) /// ``` diff --git a/Sources/Lockman/Core/Strategies/GroupCoordinationStrategy/LockmanGroupCoordinatedAction.swift b/Sources/Lockman/Core/Strategies/GroupCoordinationStrategy/LockmanGroupCoordinatedAction.swift index caad9cb85c..e7333c5a67 100644 --- a/Sources/Lockman/Core/Strategies/GroupCoordinationStrategy/LockmanGroupCoordinatedAction.swift +++ b/Sources/Lockman/Core/Strategies/GroupCoordinationStrategy/LockmanGroupCoordinatedAction.swift @@ -11,7 +11,7 @@ import Foundation /// // Navigation leader action /// struct NavigateToDetailAction: LockmanGroupCoordinatedAction { /// let groupId = "navigation" -/// let coordinationRole = LockmanGroupCoordinationRole.leader(.none) +/// let coordinationRole = LockmanGroupCoordinationRole.leader(.emptyGroup) /// /// var actionName: String { "navigateToDetail" } /// } @@ -55,7 +55,7 @@ import Foundation /// var coordinationRole: LockmanGroupCoordinationRole { /// switch self { /// case .startLoading: -/// return .leader(.none) +/// return .leader(.emptyGroup) /// case .updateProgress, .showError: /// return .member /// } diff --git a/Sources/Lockman/Core/Strategies/PriorityBasedStrategy/LockmanPriorityBasedAction.swift b/Sources/Lockman/Core/Strategies/PriorityBasedStrategy/LockmanPriorityBasedAction.swift index 70e3c43db4..e371f2fd01 100644 --- a/Sources/Lockman/Core/Strategies/PriorityBasedStrategy/LockmanPriorityBasedAction.swift +++ b/Sources/Lockman/Core/Strategies/PriorityBasedStrategy/LockmanPriorityBasedAction.swift @@ -13,7 +13,7 @@ /// let actionName = "login" /// /// func createLockmanInfo() -> LockmanPriorityBasedInfo { -/// priority(.high(.preferLater)) +/// priority(.high(.exclusive)) /// } /// } /// ``` @@ -53,7 +53,7 @@ extension LockmanPriorityBasedAction { /// Example usage: /// ```swift /// func createLockmanInfo() -> LockmanPriorityBasedInfo { - /// priority(.high(.preferLater)) + /// priority(.high(.exclusive)) /// } /// ``` public func priority(_ priority: LockmanPriorityBasedInfo.Priority) -> LockmanPriorityBasedInfo { @@ -74,7 +74,7 @@ extension LockmanPriorityBasedAction { /// Example usage: /// ```swift /// func createLockmanInfo() -> LockmanPriorityBasedInfo { - /// priority("_user123", .high(.preferLater)) + /// priority("_user123", .high(.exclusive)) /// } /// ``` public func priority( From c052fe42ee44152bf638f5908f39a9373132ebf5 Mon Sep 17 00:00:00 2001 From: Takeshi Shimada Date: Fri, 5 Sep 2025 02:42:16 +0900 Subject: [PATCH 2/2] chore: update TCA to version 1.22.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Update swift-composable-architecture dependency from 1.22.1 to 1.22.2 in both Package.swift and Package@swift-6.0.swift to ensure compatibility across all Swift versions. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- Package.swift | 2 +- Package@swift-6.0.swift | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Package.swift b/Package.swift index 81a2d87dba..a89779ee36 100644 --- a/Package.swift +++ b/Package.swift @@ -19,7 +19,7 @@ let package = Package( targets: ["Lockman"]) ], dependencies: [ - .package(url: "https://github.com/pointfreeco/swift-composable-architecture", exact: "1.22.1"), + .package(url: "https://github.com/pointfreeco/swift-composable-architecture", exact: "1.22.2"), .package(url: "https://github.com/swiftlang/swift-syntax", "509.0.0"..<"602.0.0"), .package(url: "https://github.com/pointfreeco/swift-macro-testing", from: "0.6.3"), .package(url: "https://github.com/apple/swift-collections.git", from: "1.1.0"), diff --git a/Package@swift-6.0.swift b/Package@swift-6.0.swift index 1c8d7aaf59..0ce4491d6b 100644 --- a/Package@swift-6.0.swift +++ b/Package@swift-6.0.swift @@ -19,7 +19,7 @@ let package = Package( targets: ["Lockman"]) ], dependencies: [ - .package(url: "https://github.com/pointfreeco/swift-composable-architecture", exact: "1.22.1"), + .package(url: "https://github.com/pointfreeco/swift-composable-architecture", exact: "1.22.2"), .package(url: "https://github.com/swiftlang/swift-syntax", "509.0.0"..<"602.0.0"), .package(url: "https://github.com/pointfreeco/swift-macro-testing", from: "0.6.3"), .package(url: "https://github.com/apple/swift-collections.git", from: "1.1.0"),