Skip to content

[#467] Persistence 레이어에서 Domain 레이어 의존성을 제거한다#472

Merged
opficdev merged 5 commits into
developfrom
fix/#474-Persistence
May 17, 2026
Merged

[#467] Persistence 레이어에서 Domain 레이어 의존성을 제거한다#472
opficdev merged 5 commits into
developfrom
fix/#474-Persistence

Conversation

@opficdev
Copy link
Copy Markdown
Owner

@opficdev opficdev commented May 17, 2026

🔗 연관된 이슈

🎯 의도

Persistence 레이어가 Domain 엔티티와 프레임워크를 직접 참조하던 구조를 제거하고, 외부 레이어인 Persistence가 Data/Core 계약만 바라보도록 의존 방향 정리

📝 작업 내용

📌 요약

  • ActivityKind를 Domain에서 Core로 이동
  • 위젯 스냅샷 갱신 입력을 Todo에서 WidgetTodoSnapshot DTO로 분리
  • Persistence 소스 및 테스트의 DevLogDomain 의존 제거
  • Persistence/Infra 프로젝트 파일에 남아 있던 DevLogDomain.framework 참조 제거

🔍 상세

  • WidgetTodoSnapshotTodoDTO.swift에 추가하고, Todo -> WidgetTodoSnapshot 변환은 TodoMapping.swift로 분리
  • WidgetSnapshotUpdater와 Persistence 구현체가 Domain Todo 대신 WidgetTodoSnapshot을 사용하도록 수정
  • WidgetCore의 스냅샷 팩토리와 동기화 핸들러를 Data DTO 기준으로 갱신
  • ActivityKind 사용 지점을 Core import 기준으로 정리
  • DevLogPersistence.xcodeprojDevLogDomain.framework 링크 및 orphan product reference 제거
  • DevLogInfra.xcodeproj에 복구되어 있던 DevLogDomain.framework 링크 제거

📸 영상 / 이미지 (Optional)

@opficdev opficdev self-assigned this May 17, 2026
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

이번 PR은 위젯 기능에서 DevLogDomain 의존성을 제거하기 위해 WidgetTodoSnapshot DTO를 도입하고, 기존 Todo 도메인 모델을 사용하던 위젯 관련 인터페이스와 구현을 해당 DTO로 교체했습니다. 리뷰에서는 DTO 생성 시 Swift 관용구에 따라 init 형태의 이니셜라이저를 사용할 것과, 동기화 작업 중 날짜 경계에서 발생할 수 있는 데이터 불일치를 방지하기 위해 now 시점을 한 번만 캡처하여 사용할 것을 권장했습니다.

Comment thread Application/DevLogData/Sources/Mapper/TodoMapping.swift
Comment thread Widget/DevLogWidgetCore/Sources/Sync/WidgetSyncEventHandler.swift Outdated
@opficdev opficdev merged commit 867c1ed into develop May 17, 2026
1 check passed
@opficdev opficdev deleted the fix/#474-Persistence branch May 17, 2026 04:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Persistence 레이어에서 Domain 레이어 의존성을 제거한다

1 participant