Skip to main content

Module cache

Module cache 

Source
Expand description

Single shared cache-root resolution for every cache group.

Pre-patch behavior was six hand-rolled match env::var(...) blocks that silently scattered <cwd>/.cache dirs for installed runs. Now one helper built on cache_manager::CacheResolver: explicit --dir wins, then the per-group env var, then Cargo workspace discovery, then the OS user cache (~/Library/Caches, $XDG_CACHE_HOME, %LOCALAPPDATA%). No workspace + no override = Err, never a silent CWD cache. The winner is announced via tracing::info! (library-safe; the CLI installs an stderr subscriber, so it shows by default and RUST_LOG overrides).

Functionsยง

resolve_cache_root
Resolve the cache root for one group: explicit (CLI --dir) wins, then env_var (e.g. "WINDOWS_HEADLESS_QEMU_DIR"), then workspace discovery, then the OS user cache. Announces cache: <path> (<source>).