[#558] 프로젝트의 Sendable 경고를 약하게 보도록 수정한다#559
Conversation
There was a problem hiding this comment.
Code Review
이번 PR은 TodoMutationEventBus를 AsyncStream 기반에서 Combine의 PassthroughSubject 기반으로 변경하고, publish 메서드를 동기 메서드로 전환하여 레포지토리에서의 await 호출을 제거하였습니다. 이에 대해 리뷰어는 프로젝트의 기술 스택 방향성(Combine 배제 및 AsyncStream 지향)을 유지하면서도 동기식 발행을 안전하게 처리할 수 있도록, NSLock을 활용하여 AsyncStream 구조를 유지하는 대안을 제시하였습니다. 또한, final class로 변경된 구현체에서 멀티스레드 동기화 처리가 누락되어 발생할 수 있는 데이터 레이스 문제를 지적했습니다.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
|
/gemini review |
There was a problem hiding this comment.
Code Review
이번 풀 리퀘스트는 프로젝트의 엄격한 동시성 검사 설정을 완화하고, FirebaseDependency 및 UserDefaultsDependency와 같은 래퍼 클래스들을 제거하여 네이티브 API를 직접 사용하도록 변경하였습니다. 또한, 이벤트 버스와 코디네이터의 비동기 스트림(AsyncStream, actor) 기반 설계를 Combine(PassthroughSubject, AnyPublisher) 방식으로 전환하였습니다. 리뷰에서는 이러한 변경 과정에서 발생한 동시성 제어 누락 문제를 지적하고 있습니다. 특히 AuthServiceImpl에서 NSLock이 제거되어 발생할 수 있는 데이터 레이스 위험과 WebPageImageStoreImpl에서 @Sendable 제약이 제거되어 발생할 수 있는 런타임 불안정성을 경고하며, 향후 Swift 6 마이그레이션을 위해 TodoMutationEvent 및 AuthProvider와 같이 안전한 값 타입들의 Sendable 채택을 유지할 것을 권장하고 있습니다.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
🔗 연관된 이슈
🎯 의도
📝 작업 내용
📌 요약
SWIFT_STRICT_CONCURRENCY강제 설정 제거TodoMutationEventBus를AsyncStream기반에서Combine기반으로 변경HomeViewCoordinator의 구독 관리를Set<AnyCancellable>기반으로 정리Sendable,@Sendable,@unchecked Sendable채택 및 관련 wrapper 제거🔍 상세
Project+Settings.swift에서SWIFT_STRICT_CONCURRENCY = complete제거TodoMutationEventBus프로토콜을publish/observe구조로 변경TodoMutationEventBusImpl을PassthroughSubject기반 구현으로 변경TodoRepositoryImpl의 mutation event 발행에서 불필요한await제거HomeViewCoordinator에서AsyncStreamTask 관리 제거HomeViewCoordinator의cancellables를Set<AnyCancellable>로 통합TodoMutationEventBusImplTests,TodoRepositoryImplTests를 Combine 계약에 맞게 수정LoginFeature의 dependency closure에서Sendable요구 제거Sendable채택 제거AuthServiceImpl의AuthStatePublisher,NSLock기반 분리 구조 제거FirebaseDependencywrapper 제거 후 Firebase 타입 직접 참조로 복구AppleSignInSession제거 후 delegate, continuation 직접 관리로 복구UserDefaultsDependencywrapper 제거 후UserDefaults직접 참조로 복구📸 영상 / 이미지 (Optional)