Expand description
Incremental parse cache with bitcode serialization.
Stores parsed module information (exports, imports, re-exports) on disk so unchanged files can skip AST parsing on subsequent runs. Uses xxh3 content hashing to detect changes.
Structs§
- Cache
Store - Cached module information stored on disk.
- Cached
Dynamic Import - Cached dynamic import data.
- Cached
Dynamic Import Pattern - Cached dynamic import pattern data (template literals,
import.meta.glob). - Cached
Export - Cached export data for a single export declaration.
- Cached
Import - Cached import data for a single import declaration.
- Cached
Member - Cached enum or class member data.
- Cached
Module - Cached data for a single module.
- Cached
ReExport - Cached re-export data.
- Cached
Require Call - Cached
require()call data. - Cached
Suppression - Cached suppression directive.
Constants§
- DEFAULT_
CACHE_ MAX_ SIZE - Default maximum cache size (256 MB). Overridable per-project via
cache.maxSizeMbin the config file orFALLOW_CACHE_MAX_SIZEenv var. Also used as the hard ceiling on load-time deserialization as a defence against pathological on-disk files. - DUPES_
CACHE_ VERSION - Duplication token cache version. Bump when duplicate tokenization, normalization, or the on-disk token cache schema changes.
Functions§
- cached_
to_ module - Reconstruct a
ModuleInfofrom aCachedModule. - cached_
to_ module_ opts - Reconstruct a
ModuleInfofrom aCachedModule, skipping the per-function complexity vec whenneed_complexityisfalse. Avoids theVec<FunctionComplexity>clone on warm runs of commands (e.g.fallow check) that don’t consume complexity, which adds up across tens of thousands of files. - current_
unix_ seconds - Seconds-since-Unix-epoch from the wall clock, saturating to 0 if the
system clock is set before the epoch. Used as the LRU bookkeeping
timestamp on
CachedModule.last_access_secs. Wall-clock (not monotonic) is the right source here because the value persists across process invocations. - module_
to_ cached - Convert a
ModuleInfoto aCachedModulefor storage.