Skip to content

feat(scanner): Flutter/Dart ecosystem support - #28

Merged
ohing504 merged 3 commits into
mainfrom
feat/flutter-ecosystem
Jul 18, 2026
Merged

feat(scanner): Flutter/Dart ecosystem support#28
ohing504 merged 3 commits into
mainfrom
feat/flutter-ecosystem

Conversation

@ohing504

Copy link
Copy Markdown
Owner

Closes #14

What

Flutter/Dart 프로젝트의 회수 가능한 아티팩트를 스캔·정리한다.

Detection & artifacts

  • Marker: pubspec.yaml
  • Local (safe): build/, .dart_tool/flutter clean이 지우는 정확히 두 디렉토리, 다음 빌드에 재생성
  • Global (caution): ~/.pub-cache — 모든 Flutter 프로젝트가 공유, flutter pub get 시 재다운로드. cargo/go/maven 캐시와 동일 분류

Design notes

  • ~/.pub-cache는 패키지 저장소라 삭제 시 전 프로젝트 재다운로드 → 초안의 safe가 아닌 caution으로 분류(동성격 캐시 일관성)
  • kondo의 */flutter/ephemeral은 플랫폼 변동성으로 MVP 범위 제외 — 공식 flutter clean 대상 두 디렉토리에 한정
  • PUB_CACHE 환경변수 override는 미추적(기본 경로만), docs에 명시

Verification

  • 단위 테스트 3/3, 전체 스위트 green, lint 0 issues
  • e2e(격리 디렉토리): 더미 프로젝트에서 build+.dart_tool 탐지, pubspec 없는 디렉토리 무시 확인
  • dry-run clean: 파일 보존 확인
  • 실 머신 read-only 스캔: ~/.pub-cache 3.4G가 caution + label/recommendation 정상

🤖 Generated with Claude Code

https://claude.ai/code/session_013SX3vRs78zFYA2kTRZAtg6

ohing504 and others added 3 commits July 18, 2026 15:09
Scan Flutter projects for reclaimable local build artifacts and register
the global pub package cache.

- local (safe): build/ and .dart_tool/ under pubspec.yaml roots — the two
  directories flutter clean removes, both regenerate on next build
- global (caution): ~/.pub-cache, shared by every Flutter project and
  re-downloaded on next 'flutter pub get' — mirrors cargo/go/maven cache
  classification
- docs/ecosystems.md updated in the same commit

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013SX3vRs78zFYA2kTRZAtg6
The Flutter SDK is a git repo whose pubspec.yaml roots match the flutter
scanner. Its engine/src/build and engine/src/flutter/build are committed
GN build-system source trees, not build output — matching `build` by name
offered real SDK source for deletion, and gitignore-aware protection missed
it because committed-clean files are not classified `protected`.

Add a PruneRoot hook to the walk engine: a directory an ecosystem claims as
its own toolchain/SDK checkout is skipped entirely — no artifact match, no
project context, no descent. The flutter scanner detects the SDK root by its
invariant bootstrap layout (bin/flutter + bin/internal/engine.version,
location-independent) and prunes the whole subtree.

Verified on a real SDK checkout: 74 falsely-reported artifacts drop to 0,
while app projects elsewhere are unaffected.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013SX3vRs78zFYA2kTRZAtg6
Capture the Flutter SDK lesson as a general guardrail: name-based artifact
matches can hit committed SDK/toolchain source, gitignore protection misses
it, and excluding it is the adding scanner's own safety requirement.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013SX3vRs78zFYA2kTRZAtg6
@ohing504
ohing504 merged commit f1a7154 into main Jul 18, 2026
3 checks passed
@ohing504
ohing504 deleted the feat/flutter-ecosystem branch July 18, 2026 07:01
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.

Flutter ecosystem 지원 (pub-cache, build/.dart_tool)

1 participant