Repository navigation
feat(Cache): enable partial cache in downstream projects - #21195
joneugster wants to merge 1 commit into
Conversation
PR summary e0ae4d44a2Import changes for modified filesNo significant changes to the import graph Import changes for all files
|
|
I like the idea! A few weeks ago, I wrote #20568 which does something similar. Maybe we can combine these designs somehow? Or compare them and decide which one is better? (The implementation is certainly different... I haven't thought yet which approach is better.) With my PR, you could write |
|
Ah cool, I missed your PR! I like I'm not sure about traversing the filesystem: I might have scrap files that should not be considered. |
|
I prefer the general approach in this one (we shouldn't need a different spelling for mathlib / non-mathlib), but it would be great if we could make the hacky bits not hacks. Perhaps the path cleanups in #8767 could help remove the hacks here? |
I look forward to seeing your PR then! |
|
Replaced by #21238 |
NOTE: completely replaced by #21238
Enable
lake exe cache get MyProject.leanto get a partial mathlib cache.Does not alter the functionality of
lake exe cache get(no args) in downstream projects, norlake exe cache get Mathlib/Init.leanfor cached files.Note: This is a bit hacky and will always report "Warning: some files were not found in the cache" for the files coming from the downstream project, but a proper implementation seems to require access to the loaded lake
Workspace(not just the manifest), which seems not to be supported at the current time.Moreover, this assumes the downstream project has a somewhat sane setup, which hopefully applies for a majority of projects. Concretely,
lake exe cache get MyProject/Basic.leanassumes that there is a folder./MyProject/.TODO: Test for projects
requiringa third-party package!Use case:
I would like to use
lake exe cache get Game.leanin NNG and others to automatically only fetch the relevant part of Mathlib.