Skip to content

[Chore/#62] Spring Modulith 의존성 루트 subprojects 공통화 - #63

Merged
tnals0924 merged 1 commit into
mainfrom
chore/#62-modulith-common-dependency
Sep 23, 2026
Merged

tnals0924 merged 1 commit into
mainfrom
chore/#62-modulith-common-dependency

Conversation

@tnals0924

Copy link
Copy Markdown
Member

#️⃣연관된 이슈

🎯 해결하려는 문제가 무엇인가요?

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) 상속을 허용하는 게 괜찮은지 확인 부탁드립니다.

@coderabbitai

coderabbitai Bot commented Sep 22, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

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 configuration

Configuration used: Repository: billilge/stream-server/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 94e2e7f6-89b3-4e36-8ca5-7d38e7e36884

📥 Commits

Reviewing files that changed from the base of the PR and between 7c9871f and 81b1fbc.

📒 Files selected for processing (6)
  • build.gradle.kts
  • core/common/build.gradle.kts
  • core/domain/event/build.gradle.kts
  • core/domain/internal/build.gradle.kts
  • core/domain/member/build.gradle.kts
  • core/domain/welfare/build.gradle.kts
💤 Files with no reviewable changes (4)
  • core/domain/event/build.gradle.kts
  • core/domain/welfare/build.gradle.kts
  • core/domain/internal/build.gradle.kts
  • core/domain/member/build.gradle.kts

Included review availability: Your plan provides up to 10 included reviews per hour; 7 remain after this review.


📝 Walkthrough

Walkthrough

Spring Modulith BOM과 API를 루트 subprojects의 공통 compileOnly 의존성으로 추가했습니다. 도메인 모듈의 중복 선언을 제거하고 core/common 설명을 갱신했습니다.

Changes

Spring Modulith 의존성 공통화

Layer / File(s) Summary
루트 공통 의존성 추가
build.gradle.kts
모든 하위 프로젝트에 springModulithBom과 springModulithApi를 compileOnly로 추가했습니다.
모듈별 선언 정리
core/common/build.gradle.kts, core/domain/{event,internal,member,welfare}/build.gradle.kts
도메인 모듈의 중복 Spring Modulith 의존성과 관련 주석을 제거했습니다. core/common 설명은 루트 공통 compileOnly 상속을 반영하도록 수정했습니다.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Other

Merge Risk: ⚪ Minimal · up to 81b1f

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)
Check name Status Explanation
Title check ✅ Passed 제목이 Spring Modulith 의존성을 루트 subprojects에 공통화하는 핵심 변경을 명확하고 간결하게 설명합니다.
Description check ✅ Passed 연관 이슈, 문제, 해결 이유, 구현 방식, 트레이드오프, 영향 범위, 실패 시나리오, 대안, 리뷰 포인트를 모두 포함합니다. 변경 범위와 PR 목표도 일치합니다.
Linked Issues check ✅ Passed #62의 코딩 요구사항을 모두 충족합니다. build.gradle.kts의 subprojects에 compileOnly(platform(rootProject.libs.springModulithBom))과 compileOnly(rootProject.libs.springModulithApi)를 추가했습니다. `core/domain/{welfare…
Out of Scope Changes check ✅ Passed 변경된 파일과 각 변경 내용은 #62의 공통 의존성 적용, 중복 제거, 설명 수정 범위에 직접 연결됩니다. 관련 없는 기능 변경, 런타임 의존성 변경, 임의 리팩토링은 diff에 없습니다.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2…
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

Comment @coderabbitai help to get the list of available commands.

@tnals0924
tnals0924 merged commit ed92fd5 into main Sep 23, 2026
2 checks passed
@tnals0924
tnals0924 deleted the chore/#62-modulith-common-dependency branch September 23, 2026 10:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Spring Modulith 의존성을 루트 subprojects로 공통화

2 participants