Skip to content

feat(Cache): enable partial cache in downstream projects#21238

Closed
joneugster wants to merge 2 commits intomasterfrom
eugster/cache_cleanup
Closed

feat(Cache): enable partial cache in downstream projects#21238
joneugster wants to merge 2 commits intomasterfrom
eugster/cache_cleanup

Conversation

@joneugster
Copy link
Copy Markdown
Contributor

@joneugster joneugster commented Jan 29, 2025

Add features to cache and cleanup code:

  • enable partial cache retrieval in downstream projects: lake exe cache get MyProject.Basic downloads only the relevant cache to build MyProject/Basic.lean

Notes:

Completed:

Open in Gitpod

@joneugster joneugster added WIP Work in progress t-meta Tactics, attributes or user commands CI Modifies the continuous integration setup or other automation labels Jan 29, 2025
@github-actions
Copy link
Copy Markdown

github-actions bot commented Jan 29, 2025

PR summary 88bb6d226a

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff

+ isInLeanCore

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 scripts/declarations_diff.sh contains some details about this script.


No changes to technical debt.

You can run this locally as

./scripts/technical-debt-metrics.sh pr_summary
  • The relative value is the weighted sum of the differences with weight given by the inverse of the current value of the statistic.
  • The absolute value is the relative value divided by the total sum of the inverses of the current values (i.e. the weighted average of the differences).

@joneugster joneugster changed the title refactor(Cache): cleanup cache feat(Cache): enable partial cache in downstream projects Jan 30, 2025
Comment thread Cache/Hashing.lean Outdated
Comment thread Cache/Hashing.lean Outdated
Comment thread Cache/IO.lean Outdated
Comment thread Cache/IO.lean Outdated
Comment thread Cache/IO.lean Outdated
Comment thread Cache/IO.lean Outdated
@joneugster joneugster removed the WIP Work in progress label Jan 31, 2025
@joneugster joneugster marked this pull request as ready for review January 31, 2025 03:59
@grunweg
Copy link
Copy Markdown
Contributor

grunweg commented Jan 31, 2025

Thanks for the PR - the PR description looks great! Is there a way you can split this into more incremental pieces? (I could certainly try to review smaller parts, but I won't find time for a +450 -250 lines PR this or the next week.)

@joneugster
Copy link
Copy Markdown
Contributor Author

Im on vacation next week, so might not respond much.

I can split some trivial cleanup out into a seperate PR; I believe the bulk will still be quite a bit to review.

@mathlib4-dependent-issues-bot mathlib4-dependent-issues-bot added the blocked-by-other-PR This PR depends on another PR (this label is automatically managed by a bot) label Feb 10, 2025
@joneugster
Copy link
Copy Markdown
Contributor Author

@grunweg #21631 now contains the trivial cleanup of this PR (docstrings, renaming of variables, etc.)

@leanprover-community-bot-assistant leanprover-community-bot-assistant added the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Feb 10, 2025
@github-actions github-actions bot removed the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Feb 10, 2025
@joneugster joneugster changed the base branch from master to eugster/cache_cleanup_2 February 10, 2025 15:15
@joneugster joneugster force-pushed the eugster/cache_cleanup_2 branch from a7ade54 to ef94142 Compare February 11, 2025 09:00
@leanprover-community-bot-assistant leanprover-community-bot-assistant added the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Feb 11, 2025
@joneugster joneugster changed the base branch from eugster/cache_cleanup_2 to cache_cleanup_merge_all February 11, 2025 09:41
@joneugster joneugster changed the base branch from cache_cleanup_merge_all to eugster/cache_cleanup_merge_all February 11, 2025 10:01
@leanprover-community-bot-assistant leanprover-community-bot-assistant added the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Feb 12, 2025
@github-actions github-actions bot removed the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Feb 12, 2025
@joneugster joneugster changed the base branch from eugster/cache_cleanup_merge_all to master February 13, 2025 08:11
@joneugster joneugster changed the base branch from master to eugster/cache_cleanup_merge_all February 13, 2025 08:12
@joneugster joneugster force-pushed the eugster/cache_cleanup_merge_all branch 3 times, most recently from 969581a to 9cb6b37 Compare February 13, 2025 18:15
@joneugster joneugster changed the base branch from eugster/cache_cleanup_merge_all to eugster/cache_pseudo_module_args February 13, 2025 19:35
@joneugster joneugster changed the base branch from eugster/cache_pseudo_module_args to eugster/cache_cleanup_merge_all February 13, 2025 21:11
mathlib-bors bot pushed a commit that referenced this pull request Feb 27, 2025
…rn module names and source file location (#21815)

Rewrite `getFileImports` to not use `getPackageDirs` anymore.

Additionally, `getFileImports` now returns module names like `Mathlib.Data.Set.Basic` and resolved `.lean` file locations instead of non-resolved file names (`Mathlib/Data/Set/Basic.lean`) like it used to. This is in preparation for #21238.

This PR should not change any behaviour in how `cache` works.



Co-authored-by: Jon Eugster <[email protected]>
@joneugster joneugster changed the base branch from eugster/cache_cleanup_merge_all to eugster/cache_pseudo_module_args March 7, 2025 09:32
@joneugster joneugster changed the base branch from eugster/cache_pseudo_module_args to master April 17, 2025 18:51
@leanprover-community-bot-assistant leanprover-community-bot-assistant added the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Apr 17, 2025
@leanprover-community-bot-assistant
Copy link
Copy Markdown
Collaborator

This pull request has conflicts, please merge master and resolve them.

@github-actions github-actions bot removed the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Feb 15, 2026
@joneugster joneugster removed the blocked-by-other-PR This PR depends on another PR (this label is automatically managed by a bot) label Feb 15, 2026
@mathlib-dependent-issues
Copy link
Copy Markdown

@joneugster joneugster force-pushed the eugster/cache_cleanup branch from 12b4a1b to 2133a74 Compare February 15, 2026 02:48
@joneugster
Copy link
Copy Markdown
Contributor Author

This PR has been migrated to a fork-based workflow: #35415

@joneugster joneugster closed this Feb 16, 2026
@YaelDillies YaelDillies deleted the eugster/cache_cleanup branch March 29, 2026 12:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI Modifies the continuous integration setup or other automation migrated-to-fork t-meta Tactics, attributes or user commands

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants