Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: lake: local package overrides #6411

Merged
merged 1 commit into from
Dec 20, 2024

Conversation

tydeu
Copy link
Member

@tydeu tydeu commented Dec 18, 2024

This PR adds the ability to override package entries in a Lake manifest via a separate JSON file. This file can be specified on the command line with --packages or applied persistently by placing it at .lake/package-overrides.json.

The overrides file is a subset of lake-manifest.json with just a version and a packages field. The entries in the package share the syntax of the manifest file and take precedence over the entries there. Lake loads the entries from the manifest, then overrides them with those in .lake/package-overrides.json (if any) and then those in any file passed to --packages.

@tydeu tydeu added the changelog-lake Lake label Dec 18, 2024
@tydeu tydeu force-pushed the lake/package-overrides branch from 3c9382d to c65422e Compare December 18, 2024 02:07
@github-actions github-actions bot added the toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN label Dec 18, 2024
leanprover-community-mathlib4-bot added a commit to leanprover-community/batteries that referenced this pull request Dec 18, 2024
leanprover-community-mathlib4-bot added a commit to leanprover-community/mathlib4 that referenced this pull request Dec 18, 2024
@leanprover-community-bot leanprover-community-bot added the builds-mathlib CI has verified that Mathlib builds against this PR label Dec 18, 2024
@leanprover-community-bot
Copy link
Collaborator

leanprover-community-bot commented Dec 18, 2024

Mathlib CI status (docs):

@tydeu tydeu force-pushed the lake/package-overrides branch from c65422e to ba01e03 Compare December 18, 2024 06:50
leanprover-community-mathlib4-bot added a commit to leanprover-community/batteries that referenced this pull request Dec 18, 2024
leanprover-community-mathlib4-bot added a commit to leanprover-community/mathlib4 that referenced this pull request Dec 18, 2024
@tydeu tydeu marked this pull request as ready for review December 18, 2024 18:11
@tydeu tydeu added this pull request to the merge queue Dec 20, 2024
Merged via the queue into leanprover:master with commit 7b0b190 Dec 20, 2024
16 checks passed
@tydeu tydeu deleted the lake/package-overrides branch December 20, 2024 06:00
kim-em added a commit that referenced this pull request Jan 8, 2025
luisacicolini pushed a commit to opencompl/lean4 that referenced this pull request Jan 21, 2025
This PR adds the ability to override package entries in a Lake manifest
via a separate JSON file. This file can be specified on the command line
with `--packages` or applied persistently by placing it at
`.lake/package-overrides.json`.

The overrides file is a subset of `lake-manifest.json` with just a
version and a `packages` field. The entries in the package share the
syntax of the manifest file and take precedence over the entries there.
Lake loads the entries from the manifest, then overrides them with those
in `.lake/package-overrides.json` (if any) and then those in any file
passed to `--packages`.
JovanGerb pushed a commit to JovanGerb/lean4 that referenced this pull request Jan 21, 2025
This PR adds the ability to override package entries in a Lake manifest
via a separate JSON file. This file can be specified on the command line
with `--packages` or applied persistently by placing it at
`.lake/package-overrides.json`.

The overrides file is a subset of `lake-manifest.json` with just a
version and a `packages` field. The entries in the package share the
syntax of the manifest file and take precedence over the entries there.
Lake loads the entries from the manifest, then overrides them with those
in `.lake/package-overrides.json` (if any) and then those in any file
passed to `--packages`.
@eric-wieser
Copy link
Contributor

or applied persistently by placing it at .lake/package-overrides.json

Does this mean that lake clean does not touch this file? Or is "persistent" used loosely here?

@tydeu
Copy link
Member Author

tydeu commented Jan 28, 2025

@eric-wieser lake clean only removes .lake/build, so it does not touch this file.

@eric-wieser
Copy link
Contributor

I think there is quite a lot of rm -rf .lake muscle memory going around at the moment, but perhaps that will go away in time

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
builds-mathlib CI has verified that Mathlib builds against this PR changelog-lake Lake toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants