Skip to content

feat: set MATHLIB_CACHE_GET_URL to cache.mathlib.org for Mathlib cache downloads - #202

Open
marcelolynch wants to merge 3 commits into
leanprover:mainfrom
marcelolynch:mathlib-cache-get-url
Open

marcelolynch wants to merge 3 commits into
leanprover:mainfrom
marcelolynch:mathlib-cache-get-url

Conversation

@marcelolynch

@marcelolynch marcelolynch commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

This PR sets MATHLIB_CACHE_GET_URL to https://cache.mathlib.org/mathlib4 in the step that runs lake exe cache get. Mathlib cache clients that read this variable then download from cache.mathlib.org.

The effect depends on the Mathlib version:

  • Versions before mathlib4#33605 ignore the variable.
  • Versions from mathlib4#33605 (January 2026) to mathlib4#43308 read the variable. Without it, they download from legacy endpoints. The change affects only these versions.
  • Versions from mathlib4#43308 download from cache.mathlib.org by default. For a downstream project, the variable does not change the result.

The action handles the variable as follows:

  • If the workflow does not set the variable, the action sets it to cache.mathlib.org.
  • If the workflow sets the variable to a URL, the action keeps that value.
  • If the workflow sets the variable to an empty string, the action unsets it. The cache client then uses its own default endpoint.

The action unsets an empty value because the cache client reads an empty value as a URL. A test on a GitHub-hosted runner confirms that an empty value in a step-level or job-level env reaches the step as an empty variable.

The variable applies only to the lake exe cache get step. The README and the CHANGELOG describe the change.

🤖

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.

1 participant