[Chore/#62] Spring Modulith 의존성 루트 subprojects 공통화 - #63
Conversation
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: billilge/stream-server/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (6)
💤 Files with no reviewable changes (4)
Included review availability: Your plan provides up to 10 included reviews per hour; 7 remain after this review. 📝 WalkthroughWalkthroughSpring Modulith BOM과 API를 루트 ChangesSpring Modulith 의존성 공통화
Priority: ⬇️ Low Estimated code review effort: 1 (Trivial) | ~5 minutes Change: Other Merge Risk: ⚪ Minimal · up to Spring Modulith dependencies are centralized without changing runtime dependencies, so the change is ready to merge with normal checks. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
#️⃣연관된 이슈
🎯 해결하려는 문제가 무엇인가요?
Spring Modulith
spring-modulith-api(모듈 공개 처리용@ApplicationModule/@NamedInterface등)가core/domain의 4개 모듈(welfare·member·internal·event)에 각각compileOnly로 중복 선언돼 있었다. 앞으로 다른 모듈에서도 공개 처리에 사용되므로 반복을 없앤다.❓ 왜 해결해야 하나요?
거의 모든 모듈이 공개 처리를 위해 modulith-api를 필요로 하는데, 모듈마다 BOM+api를 반복 선언하면 새 모듈 추가·버전 관리 시 누락·불일치가 생긴다.
⭐ 어떻게 해결했나요?
build.gradle.kts의subprojects의존성 블록에spring-modulith-bom(platform) +spring-modulith-api를compileOnly로 공통 선언(lombok과 동일하게rootProject.libs참조).core/domain/{welfare,member,internal,event}의 중복compileOnly선언 제거.core/common도 subprojects 대상이라 modulith-api(compileOnly)를 상속받으므로, build 설명의 'Modulith 의존 없음' 문구를 'modulith-api는 루트 공통 compileOnly로만 상속'으로 조정.🧩 이 PR의 한계 & 트레이드오프
core/common(순수 공유 커널)에도 compileOnly로 modulith-api가 얹힌다. 어노테이션 전용 compileOnly라 런타임 의존/모듈 경계에는 영향이 없어, 개별 제외 대신 공통 적용의 단순함을 택했다.⛓️ 기존 기능에 미치는 영향
compileOnly범위만 바뀌고 런타임 의존은 그대로다.ModularityTests.verify()(모듈 경계 검증) 통과 확인.@ApplicationModule선언(package-info)은 그대로 인식된다.🔀 Edge Case & 실패 시나리오
📋 검토한 대안과 선택 이유
core/common만 조건부 제외하는 방식도 검토했으나, compileOnly라 영향이 없어 subprojects 일괄 적용의 단순함을 우선했다.💬 리뷰 포인트
[c]core/common에 modulith-api(compileOnly) 상속을 허용하는 게 괜찮은지 확인 부탁드립니다.