Expand description
Cache/config path resolution and the per-repo cache layout.
Note the deliberate macOS asymmetry (spec §7): the cache follows the
platform convention (~/Library/Caches on macOS, $XDG_CACHE_HOME on
Linux/WSL), but the config is XDG-style (~/.config) on all
platforms — never ~/Library/Application Support.
Structs§
- Cache
Layout <cache>/dejavu/<repo_hash>/and everything under it.
Functions§
- cache_
root <cache>/dejavu— the root under which every repo gets a<repo_hash>dir. macOS:~/Library/Caches/dejavu. Linux/WSL:$XDG_CACHE_HOME/dejavuthen~/.cache/dejavu.dirs::cache_dir()already encodes this platform matrix.- config_
file_ path - Global config file:
$XDG_CONFIG_HOME/dejavu/config.toml, else~/.config/dejavu/config.toml— XDG on every platform. - global_
shims_ bin - The repo-independent shim dir used by global activation (
dejavu shellenv):<cache_root>/shims/bin. Never collides with per-repo caches (<cache_root>/<16-hex-hash>/). - repo_
hash - Stable 16-hex-char id for a repo, derived from its canonicalized absolute path (symlinks resolved so two paths to the same repo collide correctly).