pub struct CompilationCache {
pub stats: CacheStats,
/* private fields */
}Expand description
The EMS compilation cache. All operations are infallible by contract: any I/O or shape problem degrades to “no cache” (law 5).
Fields§
§stats: CacheStatsImplementations§
Source§impl CompilationCache
impl CompilationCache
Sourcepub fn open(dir: &Path) -> CompilationCache
pub fn open(dir: &Path) -> CompilationCache
Open (or initialize) the cache under dir (typically
<entry dir>/.axon_cache). Never fails: a corrupt manifest, a
version mismatch, or an unreadable directory yields a fresh cache.
Sourcepub fn validation_hit(
&mut self,
module: &str,
content_hash: &str,
dep_interfaces: &BTreeMap<String, String>,
) -> bool
pub fn validation_hit( &mut self, module: &str, content_hash: &str, dep_interfaces: &BTreeMap<String, String>, ) -> bool
Law 3/4 — may this module skip re-validation? Records the
hit/miss/early-cutoff in CacheStats.
Sourcepub fn record_clean(
&mut self,
module: &str,
content_hash: &str,
dep_interfaces: BTreeMap<String, String>,
interface_hash: &str,
axi_json: &str,
)
pub fn record_clean( &mut self, module: &str, content_hash: &str, dep_interfaces: BTreeMap<String, String>, interface_hash: &str, axi_json: &str, )
Record a CLEAN validation (never a failing one — diagnostics must
re-emit from source) and persist the module’s .axi.
Sourcepub fn project_warnings(&self, key: &str) -> Option<Vec<CachedDiagnostic>>
pub fn project_warnings(&self, key: &str) -> Option<Vec<CachedDiagnostic>>
The recorded merged-gate warnings for a fully-clean project whose
key matches — Some authorizes skipping the merged revalidation
(its outcome is provably identical), None demands it re-run
(contents changed, or the previous run was not fully clean).
Sourcepub fn record_project(
&mut self,
key: &str,
merged_warnings: Vec<CachedDiagnostic>,
)
pub fn record_project( &mut self, key: &str, merged_warnings: Vec<CachedDiagnostic>, )
Record a fully-clean whole-project compile (per-module passes AND merged gate) with the merged gate’s warnings.
Sourcepub fn clear_project(&mut self)
pub fn clear_project(&mut self)
Any compile that did NOT end fully clean must drop the project entry, so the merged gate re-runs next time (soundness of the full-hit skip).