Skip to content

Drop --cache: compiled sources are kept in TREE_CALCULUS_CACHE - #46

Merged
olydis merged 1 commit into
mainfrom
claude/dag-machine-simplicity-audit-r0jgsx-one-cache
Oct 2, 2026
Merged

olydis merged 1 commit into
mainfrom
claude/dag-machine-simplicity-audit-r0jgsx-one-cache

Conversation

@olydis

@olydis olydis commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

This is the second of four PRs moving compiled-source caching onto the shared cache. Please merge it after lambada-llc/tree-calculus#58. Until that runtime is published, compiling through this PR is uncached, but still correct.

What changes. --cache <dir> (default .cache/lambada) set where transformer memoized compiled sources. That was the one cache not living under TREE_CALCULUS_CACHE. Test results, evaluated modules and symbol values were already there. With #58 the runtime keeps transformer outputs there too, so the flag has nothing left to set.

  • compile and emit are now cached exactly when expect-test is, controlled by the one variable and pruned by whatever prunes that directory.
  • --cache is removed from lambada.js, compile.js and the README. The README and --help now describe TREE_CALCULUS_CACHE instead.
  • compiler/compile.sh behaves as before: it keeps compiled sources beside itself, now in .cache/tree-calculus, unless the caller already set a cache.

Tested

  • node bin/test.js against the #58 runtime: all checks pass.
  • compiler/compile.sh evaluates k △ (△ △) to △ and leaves its entry in compiler/.cache/tree-calculus/transform-v1.

🤖 Generated with Claude Code

https://claude.ai/code/session_011zRRfk1bnCFEJEjxgSDavL


Generated by Claude Code

`--cache <dir>` (default `.cache/lambada`) named where `transformer`
memoized compiled sources — the one cache that did not live under
TREE_CALCULUS_CACHE, where test results, evaluated modules and symbol
values already do. The runtime now keeps transformer outputs there too
(tree-calculus `transform-v1`), so the flag has nothing left to say:
`compile` and `emit` are cached exactly when `expect-test` is, by the one
variable, and pruned by whatever prunes that directory.

compiler/compile.sh keeps its behaviour: compiled sources beside it,
now as `.cache/tree-calculus` unless the caller already set a cache.

Against a runtime from before that change, compiling is simply uncached;
the published runtime is the newer one once it merges.

Tested: `node bin/test.js` against the new runtime, all passed;
compiler/compile.sh evaluates `k △ (△ △)` to △ and leaves its entry in
compiler/.cache/tree-calculus/transform-v1.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011zRRfk1bnCFEJEjxgSDavL
@olydis
olydis merged commit ef0bbc3 into main Oct 2, 2026
1 check passed
olydis pushed a commit to lambada-llc/arboretum that referenced this pull request Oct 2, 2026
tree-calculus 5a83063 -> 1fafaa4 (lambada-llc/tree-calculus#58): a
transformer's outputs are kept under TREE_CALCULUS_CACHE, in transform-v1.
lambada a7398b8 -> ef0bbc3 (lambada-llc/lambada#46): `--cache` is gone;
compiled sources are cached exactly when everything else is.

build.sh already stopped passing the flag (#76), so compiled sources now
sit in .cache/tree-calculus and the 30-day prune covers them; an old
.cache/lambada is dead and can be deleted.

Tested: ./build.sh from an empty cache exits 0 in 3m26s with no diff;
.cache holds only tree-calculus/, transform-v1 included.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011zRRfk1bnCFEJEjxgSDavL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants