Skip to content

Comments

feat(Cache): make use of Lake artifact cache#4

Draft
tydeu wants to merge 7 commits intoleanprover-community:nightly-testingfrom
tydeu:use-lake-cache
Draft

feat(Cache): make use of Lake artifact cache#4
tydeu wants to merge 7 commits intoleanprover-community:nightly-testingfrom
tydeu:use-lake-cache

Conversation

@tydeu
Copy link

@tydeu tydeu commented Jun 28, 2025

This PR extends Mathlib's cache to enable packing and unpacking files to/from the machine-local Lake artifact cache.

In the new caching strategy, a module's artifacts are stored differently in the leantar archives and thus the new archives are incompatible with setups without the local Lake cache. The archive packs the trace file from the build directory and the artifacts from the local Lake cache. When unpacked, they will also be restored to local Lake cache.

With the new setup, after fetching the cache once for a version of Mathlib, the built modules will be available to all instances o Mathlib on the system which are on the same version or have the same version of those modules. Furthermore, Lake passes these modules to Lean directly from the cache, avoiding the need for multiple copies of the same module artifacts.


Open in Gitpod

@tydeu tydeu force-pushed the use-lake-cache branch from 9389980 to 54096cb Compare July 2, 2025 21:40
@Kha Kha force-pushed the nightly-testing branch from 11ec3db to 597ea55 Compare October 20, 2025 19:50
@tydeu tydeu force-pushed the use-lake-cache branch 4 times, most recently from 34a5ed2 to c9857fe Compare January 23, 2026 15:03
@tydeu tydeu force-pushed the use-lake-cache branch 3 times, most recently from f6efe14 to b735953 Compare February 5, 2026 16:24
@kim-em
Copy link

kim-em commented Feb 17, 2026

@tydeu

Just recording this for later, but here's what Claude identified as possibly problematic in Mathlib:

Location Severity Issue
scripts/bench/size/run:31 Will break Glob .lake/build/**/*.olean finds nothing
build_template.yml:369 Will break du .lake/build/lib/lean/Mathlib reports nothing
build_template.yml:297 Harmless no-op rm -rf on now-empty directory
build_template.yml:24-30 Needs update LAKE_NO_CACHE comment/setting is stale
Cache/README.md:243-244 Docs wrong File locations table
ImportGraph/Meta.lean:168 Low risk Assumes searchPath.findWithExt "olean" will work

@kim-em kim-em force-pushed the nightly-testing branch 4 times, most recently from e1cf1ba to 91522ad Compare February 19, 2026 13:56
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