-
Notifications
You must be signed in to change notification settings - Fork 963
feat: add generic flutter clean support #450
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -156,10 +156,12 @@ clean_project_caches() { | |||||||||||||||||||||||||||||
| nextjs_tmp_file=$(create_temp_file) | ||||||||||||||||||||||||||||||
| local pycache_tmp_file | ||||||||||||||||||||||||||||||
| pycache_tmp_file=$(create_temp_file) | ||||||||||||||||||||||||||||||
| local find_timeout=10 | ||||||||||||||||||||||||||||||
| local flutter_tmp_file | ||||||||||||||||||||||||||||||
| flutter_tmp_file=$(create_temp_file) | ||||||||||||||||||||||||||||||
| local find_timeout=30 | ||||||||||||||||||||||||||||||
| # Parallel scans (Next.js and __pycache__). | ||||||||||||||||||||||||||||||
| ( | ||||||||||||||||||||||||||||||
| command find "$HOME" -P -mount -type d -name ".next" -maxdepth 3 \ | ||||||||||||||||||||||||||||||
| command find -P "$HOME" -mount -type d -name ".next" -maxdepth 3 \ | ||||||||||||||||||||||||||||||
| -not -path "*/Library/*" \ | ||||||||||||||||||||||||||||||
| -not -path "*/.Trash/*" \ | ||||||||||||||||||||||||||||||
| -not -path "*/node_modules/*" \ | ||||||||||||||||||||||||||||||
|
|
@@ -168,25 +170,35 @@ clean_project_caches() { | |||||||||||||||||||||||||||||
| ) > "$nextjs_tmp_file" 2>&1 & | ||||||||||||||||||||||||||||||
| local next_pid=$! | ||||||||||||||||||||||||||||||
| ( | ||||||||||||||||||||||||||||||
| command find "$HOME" -P -mount -type d -name "__pycache__" -maxdepth 3 \ | ||||||||||||||||||||||||||||||
| command find -P "$HOME" -mount -type d -name "__pycache__" -maxdepth 3 \ | ||||||||||||||||||||||||||||||
| -not -path "*/Library/*" \ | ||||||||||||||||||||||||||||||
| -not -path "*/.Trash/*" \ | ||||||||||||||||||||||||||||||
| -not -path "*/node_modules/*" \ | ||||||||||||||||||||||||||||||
| -not -path "*/.*" \ | ||||||||||||||||||||||||||||||
| 2> /dev/null || true | ||||||||||||||||||||||||||||||
| ) > "$pycache_tmp_file" 2>&1 & | ||||||||||||||||||||||||||||||
| local py_pid=$! | ||||||||||||||||||||||||||||||
| ( | ||||||||||||||||||||||||||||||
| command find -P "$HOME" -mount -type d -name ".dart_tool" -maxdepth 5 \ | ||||||||||||||||||||||||||||||
| -not -path "*/Library/*" \ | ||||||||||||||||||||||||||||||
| -not -path "*/.Trash/*" \ | ||||||||||||||||||||||||||||||
| -not -path "*/node_modules/*" \ | ||||||||||||||||||||||||||||||
| -not -path "*/.*" \ | ||||||||||||||||||||||||||||||
| -not -path "*/.fvm/*" \ | ||||||||||||||||||||||||||||||
|
Comment on lines
182
to
187
|
||||||||||||||||||||||||||||||
| command find -P "$HOME" -mount -type d -name ".dart_tool" -maxdepth 5 \ | |
| -not -path "*/Library/*" \ | |
| -not -path "*/.Trash/*" \ | |
| -not -path "*/node_modules/*" \ | |
| -not -path "*/.git/*" \ | |
| -not -path "*/.fvm/*" \ | |
| command find -P "$HOME" -mount -maxdepth 5 \ | |
| \( -path "$HOME/Library" -o \ | |
| -path "$HOME/.Trash" -o \ | |
| -path "$HOME/.cache" -o \ | |
| -path "*/node_modules" -o \ | |
| -path "*/.git" -o \ | |
| -path "*/.fvm" \) -prune -o \ | |
| -type d -name ".dart_tool" \ |
Copilot
AI
Feb 12, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Flutter cache cleaning (.dart_tool and sibling build/) is new behavior but there’s no test coverage asserting it’s detected/cleaned and that .fvm paths are ignored. Add a Bats test similar to the existing clean_project_caches tests that creates a sample Flutter project with .dart_tool + build, plus a .fvm/.dart_tool sentinel, and asserts only the project artifacts are targeted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment says this block runs parallel scans for “Next.js and pycache”, but it now also launches a Flutter scan. Update the comment to reflect all parallel scans so future changes don’t miss the extra process (and its timeout implications).