1
0
mirror of https://github.com/tw93/Mole.git synced 2026-02-04 15:04:42 +00:00

fix: global optimization for safe_clean and doc update

This commit is contained in:
Tw93
2026-01-11 09:55:18 +08:00
parent 74fc3df455
commit 54be4e30a2
3 changed files with 39 additions and 24 deletions

View File

@@ -145,13 +145,13 @@ The analyzer (`mo analyze`) uses a distinct security model:
**Code:** `lib/clean/apps.sh:orphan_detection()`
#### New Language Ecosystem Support (v1.19.1+)
#### Developer Tool Ecosystems (Consolidated)
Added support for Elixir, Haskell, OCaml, and Editors (VS Code, Zed) with strict safety checks:
Support for 20+ languages (Rust, Go, Node, Python, JVM, Mobile, Elixir, Haskell, OCaml, etc.) with strict safety checks:
- **Existence Checks:** Cleanup logic only runs if the tool is installed (directory exists).
- **Safe Targets:** Only volatile caches are cleaned (e.g., `~/.hex/cache`).
- **Protected Paths:** Critical directories like `~/.mix/archives` (installed tools) and `~/.stack/programs` (installed compilers) are explicitly **excluded**.
- **Global Optimization:** The core `safe_clean` function now intelligently checks parent directories before attempting wildcard cleanups, eliminating overhead for missing tools across the entire system.
- **Safe Targets:** Only volatile caches are cleaned (e.g., `~/.cargo/registry/cache`, `~/.gradle/caches`).
- **Protected Paths:** Critical directories like `~/.cargo/bin`, `~/.mix/archives`, `~/.rustup` toolchains, and `~/.stack/programs` are explicitly **excluded**.
#### Active Uninstallation Heuristics