Skip to content

refactor(core): runCatchingCancellable 을 core:domain 으로 옮겨 domain 모듈에서도 쓰게 한다 #2260

Closed

Description

@OnlyReadOneBook

작업 유형

refactor — 동작 변경 없는 구조·책임·경계 개선

주 담당 모듈

core — 코어

개요

runCatchingCancellable 은 Android 라이브러리인 core:common 에 있어 JVM 모듈인 feature domain 에서 쓸 수 없다. 그래서 UseCase 마다 try / catch (CancellationException) { throw } / catch (Throwable) 를 손으로 다시 짠다. develop 의 feature/timeletter/domain CreateTimeLetterUseCase 에 이미 있고, #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

  1. added
    refactor동작 변경 없이 코드 구조·책임·경계를 개선하는 작업
    area:core공용 코어·네트워크 기능 영역
    on Oct 5, 2026
  2. added
    pr-open이 이슈를 구현하는 PR 이 열려 있다 — base 가 기본 브랜치가 아니어도 드러낸다
    on Oct 5, 2026
  3. removed
    pr-open이 이슈를 구현하는 PR 이 열려 있다 — base 가 기본 브랜치가 아니어도 드러낸다
    on Oct 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

area:core공용 코어·네트워크 기능 영역refactor동작 변경 없이 코드 구조·책임·경계를 개선하는 작업

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions