Repository navigation
refactor(Cache): tidy lake-manifest parsing in Cache - #8767
eric-wieser wants to merge 11 commits into
Conversation
| else -- only mathlib files, when not in the mathlib4 repo, need to be redirected | ||
| config.push <| .mkObj [("file", pathStr), ("base", mathlibDepPath)] | ||
| if let some base := findRoot path then | ||
| config.push <| .mkObj [("file", pathStr), ("base", toString base)] |
There was a problem hiding this comment.
@digama: this doesn't seem to be working properly for Std, but I can't see what LeanTar is doing with my base argument.
Can you teach it a verbose mode that prints out where the extracted files are being written to?
There was a problem hiding this comment.
The else config looks suspicious, that means to skip the file entirely.
The way this works is that you pass a json argument containing either pathStr or {"file": pathStr, "base": base}, and base, if provided, overrides the baseDir which is passed as the -C argument (with default value .). This says to decompress pathStr which is an ltar file, with base as the base for all generated files. The ltar file contains a list of relative paths and these are joined to base.
For the usual ltars generated by CI, the paths will be of the form:
.lake/build/lib/Mathlib/Tactic.trace(and.lake/build/lib/Mathlib/Tactic.{olean,ilean,c}[.hash]) for files in mathlib.lake/build/lib/proofwidgets/.lake/build/lib/ProofWidgets/Compat.trace(etc) for files not in mathlib
If you would like to trim these paths to something shorter, you can do so by setting the -C argument appropriately during the packing stage. (But don't forget to do something to change the root hash such as adding whitespace in lake-manifest.json, because these ltars will not be compatible with previous builds.)
There was a problem hiding this comment.
Thanks!
lake/build/lib/proofwidgets/.lake/build/lib/ProofWidgets/Compat.trace looks like a bad path to me. Did you mean lake/packages/proofwidgets/.lake/build/lib/ProofWidgets/Compat.trace?
There was a problem hiding this comment.
yes. .lake/packages/proofwidgets/.lake/build/lib/ProofWidgets/Compat.trace more specifically. (A cheap way to find out without additional tooling is strings NNN.ltar | grep proofwidgets, where NNN.ltar is the output of lake exe cache lookup ProofWidgets/Compat.lean)
|
This PR/issue depends on: |
PR summary bf64581eacImport changes for modified filesNo significant changes to the import graph Import changes for all files
|
…in leantar files (leanprover-community#21848) See review comments in leanprover-community#8767 for more context.
|
Mathlib has moved to PRs from forks. This PR is still from a branch of the main repository and will soon be closed! Please migrate the content to a fork and reopen a PR from there if you wish to do so. See Zulip topic for more instructions. Thank you for contributing to mathlib! |
This now respects local copies of Mathlib dependencies (though in practice these invalidate the online cache because to point to local copies of Mathlib, the hash for
lakefile.leanandlake-manifest.jsonis first invalidated).