feat(scanner): Flutter/Dart ecosystem support - #28
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #14
What
Flutter/Dart 프로젝트의 회수 가능한 아티팩트를 스캔·정리한다.
Detection & artifacts
pubspec.yamlbuild/,.dart_tool/—flutter clean이 지우는 정확히 두 디렉토리, 다음 빌드에 재생성~/.pub-cache— 모든 Flutter 프로젝트가 공유,flutter pub get시 재다운로드. cargo/go/maven 캐시와 동일 분류Design notes
~/.pub-cache는 패키지 저장소라 삭제 시 전 프로젝트 재다운로드 → 초안의safe가 아닌 caution으로 분류(동성격 캐시 일관성)*/flutter/ephemeral은 플랫폼 변동성으로 MVP 범위 제외 — 공식flutter clean대상 두 디렉토리에 한정PUB_CACHE환경변수 override는 미추적(기본 경로만), docs에 명시Verification
build+.dart_tool탐지, pubspec 없는 디렉토리 무시 확인~/.pub-cache3.4G가 caution + label/recommendation 정상🤖 Generated with Claude Code
https://claude.ai/code/session_013SX3vRs78zFYA2kTRZAtg6