Skip to content

feat: Add CacheResolver for fixed-precedence cache routing - #16

Merged
jzombie merged 6 commits into
mainfrom
v0.5.0
Oct 1, 2026
Merged

jzombie merged 6 commits into
mainfrom
v0.5.0

Conversation

@jzombie

@jzombie jzombie commented Oct 1, 2026

Copy link
Copy Markdown
Owner

Added

  • CacheResolver + CacheSource: combined cache-root resolution with fixed
    precedence (explicit path → env var → Cargo workspace discovery → OS user
    cache) and no silent <cwd>/.cache scattering. Unresolvable configurations
    return Err(NotFound) naming the env var / OS identity that would fix it;
    the <cwd>/.cache last resort is an explicit allow_cwd_fallback opt-in.
    The winning source is always returned so binaries can announce cache
    placement. Includes resolver unit tests (precedence matrix, NotFound
    defaults, panic-safe env guards) and a README section documenting the
    contract and the announce-the-winner convention.

Fixed

  • README doctests for from_project_dirs failed under default features
    (directories unavailable, method compiled out). Examples are now
    feature-gated run() functions: fully compiled and executed wherever the
    os-cache-dir feature is enabled, never ignored, never stale.

Introduce `CacheResolver` and `CacheSource` to provide a clear,
fixed-precedence cache root resolution mechanism with no silent CWD
fallback by default. Update tests, workflows, and documentation.
@jzombie
jzombie merged commit 7ab65f1 into main Oct 1, 2026
14 checks passed
@jzombie
jzombie deleted the v0.5.0 branch October 1, 2026 22:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant