Skip to main content

GRAPH_CACHE_VERSION

Constant GRAPH_CACHE_VERSION 

Source
pub const GRAPH_CACHE_VERSION: u32 = 19; // 19u32
Expand description

Persisted graph cache schema version.

Bump this whenever the serialized shape of the persisted graph (any of the graph types that derive serde for the cache, the manifest types, or the store envelope) changes, so a stale graph-cache.bin written by an older binary is rejected rather than deserialized into the wrong shape.

Bump it for import-resolution semantics changes too, not only for wire-shape changes. The manifest compares this constant, the cache mode, and per-file fingerprints, and carries no binary version, so a cache written before a classification change replays the old classification verbatim on an unmodified tree and silently hides the new behaviour. The same applies to plugin config extraction, which seeds entry points and path aliases.

Bumped to 17 for issue #2031: cached resolver output retains canonical test-root replacements and ESM/CommonJS mechanisms, while profiled graphs retain target-sparse reachability masks plus exact compact reference routes. Ordinary graphs omit unused provenance. Versions 7 through 16 were used by published development commits for this change, so the final version remains 17 rather than reusing a potentially stale intermediate cache version.

Bumped to 18 for issue #2083: reference provenance moved out of SymbolReference into the per-export reference_paths side table, changing the persisted layout of every export’s reference list.

Bumped to 19 for issue #2084 (PR #2096): profiled test-reachability masking now falls back to the legacy fail-open classification when a graph would need more than the mask-profile cap, so caches written by the unbounded profiling code must not replay their old profiled results on large monorepos where the cap now engages.