Skip to content

Commit 2898958

Browse files
docs: fix source code comment accuracy issues (#229)
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 <[email protected]>
1 parent ce23b18 commit 2898958

File tree

7 files changed

+11
-11
lines changed

7 files changed

+11
-11
lines changed

Sources/Lockman/Composable/LockmanComposableMacros.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ public macro LockmanGroupCoordination() =
187187
/// LockmanCompositeInfo2(
188188
/// actionId: actionName,
189189
/// lockmanInfoForStrategy1: LockmanSingleExecutionInfo(actionId: actionName, mode: .boundary),
190-
/// lockmanInfoForStrategy2: LockmanPriorityBasedInfo(actionId: actionName, priority: 100)
190+
/// lockmanInfoForStrategy2: LockmanPriorityBasedInfo(actionId: actionName, priority: .high(.exclusive))
191191
/// )
192192
/// }
193193
/// }

Sources/Lockman/Core/Debug/LockmanLogger.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import OSLog
44
/// Debug logger for Lockman output.
55
///
66
/// Provides thread-safe logging functionality for lock operations.
7-
/// Only active in DEBUG builds to avoid performance impact in production.
7+
/// Optimized for DEBUG builds with fallback functionality in production builds.
88
@_spi(Logging)
99
public final class LockmanLogger: @unchecked Sendable {
1010
// MARK: - Singleton

Sources/Lockman/Core/Protocols/LockmanInfo.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ import Foundation
1919
/// ## Examples
2020
/// ```swift
2121
/// // Single execution info
22-
/// let singleInfo = LockmanSingleExecutionInfo(actionId: "login")
22+
/// let singleInfo = LockmanSingleExecutionInfo(actionId: "login", mode: .boundary)
2323
///
2424
/// // Priority-based info
25-
/// let priorityInfo = LockmanPriorityBasedInfo(actionId: "sync", priority: .high(.preferLater))
25+
/// let priorityInfo = LockmanPriorityBasedInfo(actionId: "sync", priority: .high(.exclusive))
2626
/// ```
2727
public protocol LockmanInfo: Sendable, CustomDebugStringConvertible {
2828
/// The strategy identifier that created this lock info.

Sources/Lockman/Core/Strategies/CompositeStrategy/LockmanCompositeAction.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
/// func createLockmanInfo() -> LockmanCompositeInfo2<I1, I2> {
1818
/// LockmanCompositeInfo2(
1919
/// actionId: actionName,
20-
/// lockmanInfoForStrategy1: LockmanSingleExecutionInfo(actionId: actionName),
20+
/// lockmanInfoForStrategy1: LockmanSingleExecutionInfo(actionId: actionName, mode: .boundary),
2121
/// lockmanInfoForStrategy2: LockmanPriorityBasedInfo(actionId: actionName, priority: .high(.exclusive))
2222
/// )
2323
/// }

Sources/Lockman/Core/Strategies/CompositeStrategy/LockmanCompositeInfo.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import Foundation
1212
/// ```swift
1313
/// let compositeInfo = LockmanCompositeInfo2(
1414
/// actionId: "userLogin",
15-
/// lockmanInfoForStrategy1: LockmanSingleExecutionInfo(actionId: "userLogin"),
15+
/// lockmanInfoForStrategy1: LockmanSingleExecutionInfo(actionId: "userLogin", mode: .boundary),
1616
/// lockmanInfoForStrategy2: LockmanPriorityBasedInfo(actionId: "userLogin", priority: .high(.exclusive))
1717
/// )
1818
/// ```

Sources/Lockman/Core/Strategies/GroupCoordinationStrategy/LockmanGroupCoordinatedAction.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import Foundation
1111
/// // Navigation leader action
1212
/// struct NavigateToDetailAction: LockmanGroupCoordinatedAction {
1313
/// let groupId = "navigation"
14-
/// let coordinationRole = LockmanGroupCoordinationRole.leader(.none)
14+
/// let coordinationRole = LockmanGroupCoordinationRole.leader(.emptyGroup)
1515
///
1616
/// var actionName: String { "navigateToDetail" }
1717
/// }
@@ -55,7 +55,7 @@ import Foundation
5555
/// var coordinationRole: LockmanGroupCoordinationRole {
5656
/// switch self {
5757
/// case .startLoading:
58-
/// return .leader(.none)
58+
/// return .leader(.emptyGroup)
5959
/// case .updateProgress, .showError:
6060
/// return .member
6161
/// }

Sources/Lockman/Core/Strategies/PriorityBasedStrategy/LockmanPriorityBasedAction.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
/// let actionName = "login"
1414
///
1515
/// func createLockmanInfo() -> LockmanPriorityBasedInfo {
16-
/// priority(.high(.preferLater))
16+
/// priority(.high(.exclusive))
1717
/// }
1818
/// }
1919
/// ```
@@ -53,7 +53,7 @@ extension LockmanPriorityBasedAction {
5353
/// Example usage:
5454
/// ```swift
5555
/// func createLockmanInfo() -> LockmanPriorityBasedInfo {
56-
/// priority(.high(.preferLater))
56+
/// priority(.high(.exclusive))
5757
/// }
5858
/// ```
5959
public func priority(_ priority: LockmanPriorityBasedInfo.Priority) -> LockmanPriorityBasedInfo {
@@ -74,7 +74,7 @@ extension LockmanPriorityBasedAction {
7474
/// Example usage:
7575
/// ```swift
7676
/// func createLockmanInfo() -> LockmanPriorityBasedInfo {
77-
/// priority("_user123", .high(.preferLater))
77+
/// priority("_user123", .high(.exclusive))
7878
/// }
7979
/// ```
8080
public func priority(

0 commit comments

Comments
 (0)