-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Summary
The XcodeOutputProcessor class uses @unchecked Sendable as a workaround because XCBeautifier from XcbeautifyLib does not conform to Sendable.
Current Implementation
The class is marked as @unchecked Sendable with the XCBeautifier stored as a private property.
Concern
A PR review comment suggested using @MainActor instead to provide proper isolation. However, for a CLI tool, @MainActor may not be appropriate as it would require all callers to be on the main actor.
Options to Evaluate
- Keep @unchecked Sendable - Current approach, safe if XCBeautifier.format(line:) is synchronous and the processor is only accessed from a single task
- Use @mainactor - Provides compiler-enforced isolation but may not be suitable for CLI tools
- Make it an actor - Provides proper isolation with async access
- Verify XCBeautifier thread safety - If the library is thread-safe, @unchecked Sendable is correct
References
- PR comment: Integrate xcbeautify as Swift library and misc fixes #39
- File: Sources/Xproject/Utilities/XcodeOutputProcessor.swift
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels