Skip to content

모듈화로 구성된 프로젝트에서 의존성 mermaid가 레이어별로 구성되는 현상을 해결한다 - #50

Merged
opficdev merged 18 commits into
developfrom
fix/#49
Sep 8, 2026
Merged

opficdev merged 18 commits into
developfrom
fix/#49

Conversation

@opficdev

@opficdev opficdev commented Sep 8, 2026

Copy link
Copy Markdown
Owner

🔗 연관된 이슈

🎯 작업 목적

target별 분석으로 분리되던 Mermaid에 모듈 간 실제 값 전달과 객체 조립 관계를 표시하기 위한 workspace 분석 기능 추가.

프로젝트 소스 수정 없이 manifest에 지정한 소스와 조립 타입을 분석하며, 특정 프로젝트명이나 계층 이름에 의존하지 않는 연결 방식 적용.

📝 작업 내용

📌 요약

  • workspace manifest와 declarations, composition 분석 모드 추가
  • 일반 조립 객체와 Graph(input:) 경계를 넘는 provider 출처 추적
  • 값 의존 관계와 객체의 반환·생성·보관 관계 구분
  • 실행 스크립트, 다중 모듈 검증 예제, 사용 문서 및 CLI artifact 추가·갱신

🔍 상세

  • 분석 범위 지정

    • manifest에서 target ID, moduleName, 소스 파일, target 의존성, root graph, 일반 조립 타입 지정
    • CradleDiagramMaker --workspace <manifest.json> --output <directory> [--view declarations|composition] 지원
    • Tuist 설정 자동 변환 없이 명시한 소스 범위 분석
  • 모듈 간 연결

    • declarations에서 모듈 간 sources 선언 관계 표시
    • composition에서 직접 생성, 단순 let 별칭, initializer 저장 대입, Graph(input:) 전달 경로 분석
    • provider가 읽은 input.member와 실제 전달된 provider 출처 연결
    • 모듈·선언·생성 문맥을 구분하여 동일 타입의 서로 다른 인스턴스 분리
  • 조립 관계 표시

    • 일반 조립 객체를 노드로 표시하고 반환·생성·보관 관계를 점선으로 구분
    • 기존 값 의존 관계의 실선 표시 유지
    • 관계의 근거 위치를 .analysis.json에 기록
    • 분석 보고서 schemaVersion을 2로 변경하고 입력 manifest는 1 유지
    • Mermaid 라벨의 <br> 대신 실제 개행 적용
  • 잘못된 연결 방지

    • 모호한 선언과 미해석 값에 대한 추정 연결 제한
    • 값 이름에 가려진 생성자 호출의 생성 관계 기록 차단
    • 미지원 선행 문장 이후의 반환 관계 기록 차단
    • 기존 target별 Plugin, Macro, 런타임 및 공개 API 동작 유지
  • DevLog_iOS 리포 적용

image

🔄 변경 흐름

flowchart TD
	source["프로젝트 Swift 소스"]
	target["기존 target별 Plugin 분석"]
	local["target별 Mermaid"]
	manifest["workspace manifest로 분석 범위 지정"]
	index["모듈별 선언 수집 및 이름 해석"]
	declarations["declarations: 모듈 간 선언 관계"]
	composition["composition: root부터 객체 조립 및 input 전달 분석"]
	output["모듈 간 값 의존 관계와 반환·생성·보관 관계"]

	source --> target --> local
	source --> manifest --> index
	index --> declarations
	index --> composition --> output
Loading

@opficdev opficdev self-assigned this Sep 8, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 8, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-08T09:29:52.136761Z e321639 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e321639c75

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread Sources/CradleGraphAnalysis/WorkspaceDeclarationIndex.swift
Comment thread Sources/CradleGraphAnalysis/WorkspaceCompositionSupport.swift Outdated
Comment thread Sources/CradleDiagramMakerSupport/WorkspaceDiagramLoader.swift
Comment thread Sources/CradleGraphAnalysis/WorkspaceCompositionSupport.swift
Comment thread Sources/CradleGraphAnalysis/WorkspaceCompositionEvaluator.swift
@opficdev
opficdev merged commit 6ee37ee into develop Sep 8, 2026
5 checks passed
@opficdev
opficdev deleted the fix/#49 branch September 8, 2026 12:57
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.

모듈화로 구성된 프로젝트에서 의존성 mermaid가 레이어별로 구성되는 현상을 해결한다

1 participant