Skip to content
Beskid Platform specification

Beskid

Jump to a Beskid service

Beskid

Jump to a Beskid service

Unit artifact cache schema

Unit artifacts live under {project}/obj/beskid/cache/salsa/:

PathContent
manifest.jsongrammar_rev, compiler_version, schema_version, persisted_units
units/{content_fp}/meta.jsonUnitArtifactMeta (logical name, source path, source length, imports)
units/{content_fp}/ast.binPostcard Spanned<Program> snapshot
units/{content_fp}/hir.binHIR cache marker (HIR rebuilt from AST on cold load)

Legacy obj/beskid/cache/units/*.json records are retired; tooling ignores them.

content_fp = hash(grammar_rev, source_bytes)not absolute path. Path is metadata only. grammar_rev is the workspace constant shared by beskid_pipeline, beskid_artifacts, and beskid_queries.

  1. File editFileText revision bump clears fingerprints for old and new content; reverse_dependents propagates to import closure.
  2. Grammar bumpGrammarRevision input invalidates all unit tracked queries globally.
  3. Lockfile / manifestProjectSession.lockfile_digest change invalidates program_assembly for that entry.

Production assembly uses Salsa in-memory unit_cache (parse + HIR tokens). Disk artifacts are read on cold start; writes occur on direct-parse paths without the Salsa delegate. Manifest persisted_units is refreshed once per assembly batch, not per unit.