You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
refactor(core): runCatchingCancellable 을 core:domain 으로 옮겨 domain 모듈에서도 쓰게 한다 #2260
runCatchingCancellable 은 Android 라이브러리인 core:common 에 있어 JVM 모듈인 feature domain 에서 쓸 수 없다. 그래서 UseCase 마다 try / catch (CancellationException) { throw } / catch (Throwable) 를 손으로 다시 짠다. develop 의 feature/timeletter/domainCreateTimeLetterUseCase 에 이미 있고, #1691 의 UpdateReceiverInfoUseCase 에 두 군데가 더 생긴다. UseCase 가 늘 때마다 사본이 는다.
함수 본문은 stdlib 의 CancellationException 만 쓰는 순수 Kotlin 이고, core:domain 은 JVM 모듈이며 core:common 은 이미 core:domain 에 의존한다.
구현 범위
함수 본체와 KDoc 을 core/domain 의 com.afternote.core.domain.result 로 옮긴다.
core:common 의 기존 함수는 새 함수에 위임하고 @Deprecated(ReplaceWith(...)) 를 붙인다. 기존 호출처는 바뀌지 않는다.
RunCatchingCancellableTest 를 core:domain 으로 옮긴다.
완료 조건
feature domain 모듈이 core:domain 의존만으로 runCatchingCancellable 을 쓸 수 있다.
core 밖 프로덕션 파일은 바뀌지 않고, 기존 호출처가 그대로 컴파일된다.
참고
남은 호출처의 import 교체와 timeletter 사본 제거는 담당 모듈별 후속 이슈로 넘긴다. #1691 의 setting domain UseCase 는 이 이슈의 PR 위에서 새 함수로 바꾼다.
Activity