Skip to content

v0.36.0

Latest

Choose a tag to compare

@g5t g5t released this 21 Oct 15:01
· 2 commits to main since this release
82e5730

Changed: component IR sidecars are off by default (#402)

mccode-antlr no longer writes parsed components to disk as {name}.comp.<build>.json sidecars beside each .comp file, and no longer reads them. Parsed components are still cached in memory for the life of a process, and the C typedef cache is still persisted as before.

Without sidecars, each new process re-parses the components its instrument uses. That adds roughly 0.25–0.5 s per translation. To keep sidecars, for example in a prebuilt or read-only cache, turn them back on with either of:

  export MCCODEANTLR_CACHE__COMPONENT_IR=true
  mccode-antlr config set cache.component_ir true

The sidecar format has also changed (format 5), so sidecars from earlier versions are never read. Remove them with mccode-antlr cache ir-clean --stale or mccode-antlr cache ir-clean.

Changed: cache ir-build is now cache build (#402)

mccode-antlr cache build now fills both translation caches:

  • It warms the C typedef cache, which is a parse of every component's SHARE, DECLARE and USERVARS blocks and of the %included libraries.
  • It writes component IR sidecars too, but only when cache.component_ir is enabled.

After a cache build, translations add nothing new to either cache, so the result can be shipped as a read-only cache.

mccode-antlr cache ir-build still works but emits a deprecation warning. Please switch to cache build.

Fixed

  • Stale components after editing an INHERIT/COPY parent (#402, reported by @willend in #118). The component cache was keyed only on a .comp file's own modification time.
    Editing the parent of DEFINE COMPONENT b INHERIT a, or of a COPY, left b showing a's old contents until b itself was touched. This affected both the in-memory cache and the sidecars. Each cache entry now records every source file it was built from, and is reused only if none of them has changed.
  • McXtrace allow_backprop (#401, @willend). The McXtrace particle struct gained allow_backprop in McCode v3.6.9, but TRACE sections did not define it. As a result, the PROP_*/DISALLOW_BACKPROP runtime macros failed to compile.

Docs

  • cache build is documented, including the cache.component_ir option.
  • The CLI reference lists --tag and --flavor none for cache build, and no longer lists a --download option that never existed.

What's Changed

Other Changes

  • Define allow_backprop in McXtrace TRACE sections by @willend in #401
  • Cache persistence off by default, rename mccode-antlr cache ir-build to ... build by @g5t in #402

Full Changelog: v0.35.1...v0.36.0