[#542] 프로젝트를 Swift 6 language mode로 전환한다#544
Conversation
There was a problem hiding this comment.
Code Review
이번 풀 리퀘스트에서는 Project+Settings.swift 파일에서 Swift 버전을 5.0에서 6.0으로 업데이트하고, 여러 딕셔너리 및 배열 리터럴에서 불필요한 후행 쉼표(trailing comma)를 제거하였습니다. 검토할 리뷰 의견이 없으므로 추가적인 피드백은 제공하지 않습니다.
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.
|
❌ iOS CI failed. Build failedCompiler error lines: Tests failedFailed schemes:
Check the uploaded test log artifacts for full diagnostics. |
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request updates the project to Swift 6.0, adopts Sendable conformance for DIContainer and PushNotificationQuery, and renames AppDIContainer.shared to AppDIContainer.default. The review feedback correctly points out that the factory closure in DIContainer.register should be marked as @Sendable to ensure complete thread safety under the new protocol conformance.
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.
| } | ||
|
|
||
| public protocol DIContainer { | ||
| public protocol DIContainer: Sendable { |
There was a problem hiding this comment.
DIContainer 프로토콜이 Sendable을 채택함에 따라, 멀티스레드 및 서로 다른 액터 환경에서 안전하게 공유될 수 있어야 합니다.
현재 register 메서드의 factory 클로저는 @Sendable 타입이 아닙니다. 이로 인해 서로 다른 격리 컨텍스트(Isolation Context)에서 resolve를 통해 의존성을 생성할 때 데이터 레이스(Data Race)가 발생할 수 있습니다.
스레드 안전성을 보장하기 위해 구체 구현 클래스보다는 프로토콜(추상화) 수준에서 Sendable 적합성을 선언하고, DIContainer 프로토콜의 factory 클로저에 @Sendable을 추가하는 것을 권장합니다.
public protocol DIContainer: Sendable {
func register<T>(
_ type: T.Type,
name: DependencyName?,
scope: DependencyScope,
_ factory: @escaping @Sendable () -> T
)
// ...
}References
- Write all review comments in Korean and keep them concise and high-signal. (link)
- When applying Sendable conformance to ensure thread safety, prefer declaring Sendable on the protocol (abstraction) rather than the concrete implementation class.
|
❌ iOS CI failed. Build failedCompiler error lines: Tests failedFailed schemes:
Check the uploaded test log artifacts for full diagnostics. |
🔗 연관된 이슈
🎯 의도
📝 작업 내용
📌 요약
SWIFT_VERSION을6.0으로 변경PushNotificationQuery값 타입에Sendable채택AppDIContainer를 Alamofire의Session.default와 유사한 default singleton 형태로 정리@unchecked Sendable로 명시trailing_comma경고 제거🔍 상세
Settings.devlog에 적용되는 공통SWIFT_VERSION을5.0에서6.0으로 변경PushNotificationQuery,SortOrder,TimeFilter에Sendable을 채택해 Swift 6 concurrency 진단 대응AppDIContainer.shared를AppDIContainer.default로 변경해 전역 기본 인스턴스 의미를 명확화NSRecursiveLock으로 보호되던register/resolve접근을 근거로AppDIContainer에@unchecked Sendable채택DIContainerprotocol에Sendable을 채택해 SwiftUIEnvironmentKey.defaultValue의 전역 공유 진단 대응📸 영상 / 이미지 (Optional)