Repository navigation
[Merged by Bors] - refactor(Cache): use the Lean search path instead of lake-manifest to determine Mathlib root. - #21666
joneugster wants to merge 10 commits into
Conversation
PR summary 61e573b48fImport changes for modified filesNo significant changes to the import graph Import changes for all files
Declarations diff
You can run this locally as follows## summary with just the declaration names:
./scripts/declarations_diff.sh <optional_commit>
## more verbose report:
./scripts/declarations_diff.sh long <optional_commit>The doc-module for No changes to technical debt.You can run this locally as
|
d7de0d0 to
f9979c0
Compare
Co-authored-by: Eric Wieser <[email protected]>
eric-wieser
left a comment
There was a problem hiding this comment.
Were you able to test this in a downstream project successfully?
|
CI does this automatically: The step "check the cache" (see source) tests on a sample downstream project. Additionally I did created two sample projects, one depending on mathlib from this commit and one depending on a local copy of mathlib lying in the same folder; both with |
eric-wieser
left a comment
There was a problem hiding this comment.
bors d+
I guess we'll learn pretty quickly if this breaks people!
|
✌️ joneugster can now approve this pull request. To approve and merge a pull request, simply reply with |
|
bors r+ |
… determine Mathlib root. (#21666) Instead of manually parsing the lake manifest, use the search path from the env variable `LEAN_SRC_PATH ` (using `initSrcSearchPath`) to find where the file `Mathlib.lean` is located.
| mathlibDepPath := mathlibSource, | ||
| srcSearchPath := sp, | ||
| packageDirs := .ofList [ | ||
| ("Mathlib", mathlibSource), |
There was a problem hiding this comment.
Should these all be parsed from the source path as well (in a future PR)?
There was a problem hiding this comment.
Indeed, #21238 will then use let packageDir? := sp.find? (·.contains sourceFile) instead of this packageDirs
|
Pull request successfully merged into master. Build succeeded: |
This PR splits the 'Fetch Mathlib Build Cache For Current Imports' command into three: 1. 'Fetch Mathlib Build Cache For Open Files': Displayed in the forall menu and the command prompt. Displays a quick select dialog where all open files are selected by default and allows configuring the set of files to fetch the cache for. 2. 'Fetch Mathlib Build Cache For All Open Files': Only displayed in the command prompt (can also be bound to a keyboard shortcut). Fetches the cache for all open files without displaying a selection dialog. 3. 'Fetch Mathlib Build Cache For Current File': Only displayed in the command prompt (can also be bound to a keyboard shortcut). Fetches the cache for the currently displayed file without displaying a selection dialog. Re-uses the command ID of the previous 'Fetch Mathlib Build Cache For Current Imports' command, which had the same functionality. Also ensures that these commands can be used downstream of Mathlib, which was added in [mathlib4#21666](leanprover-community/mathlib4#21666).
Instead of manually parsing the lake manifest, use the search path from the env variable
LEAN_SRC_PATH(usinginitSrcSearchPath) to find where the fileMathlib.leanis located.