-
Notifications
You must be signed in to change notification settings - Fork 451
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: update toolchain on lake update
#5684
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
github-actions
bot
added
the
toolchain-available
A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN
label
Oct 12, 2024
leanprover-community-mathlib4-bot
added a commit
to leanprover-community/batteries
that referenced
this pull request
Oct 12, 2024
leanprover-community-mathlib4-bot
added a commit
to leanprover-community/mathlib4
that referenced
this pull request
Oct 12, 2024
leanprover-community-bot
added
the
builds-mathlib
CI has verified that Mathlib builds against this PR
label
Oct 13, 2024
Mathlib CI status (docs):
|
leanprover-community-mathlib4-bot
added a commit
to leanprover-community/batteries
that referenced
this pull request
Oct 16, 2024
leanprover-community-mathlib4-bot
added a commit
to leanprover-community/mathlib4
that referenced
this pull request
Oct 16, 2024
leanprover-community-mathlib4-bot
added a commit
to leanprover-community/batteries
that referenced
this pull request
Oct 16, 2024
leanprover-community-mathlib4-bot
added a commit
to leanprover-community/mathlib4
that referenced
this pull request
Oct 16, 2024
tydeu
force-pushed
the
lake/update-toolchain
branch
from
October 16, 2024 05:30
7af30ad
to
33cf999
Compare
leanprover-community-mathlib4-bot
added a commit
to leanprover-community/batteries
that referenced
this pull request
Oct 16, 2024
leanprover-community-mathlib4-bot
added a commit
to leanprover-community/mathlib4
that referenced
this pull request
Oct 16, 2024
leanprover-community-mathlib4-bot
added a commit
to leanprover-community/batteries
that referenced
this pull request
Oct 17, 2024
leanprover-community-mathlib4-bot
added a commit
to leanprover-community/mathlib4
that referenced
this pull request
Oct 17, 2024
leanprover-community-mathlib4-bot
added a commit
to leanprover-community/batteries
that referenced
this pull request
Oct 17, 2024
leanprover-community-mathlib4-bot
added a commit
to leanprover-community/mathlib4
that referenced
this pull request
Oct 17, 2024
leanprover-community-mathlib4-bot
added a commit
to leanprover-community/batteries
that referenced
this pull request
Oct 17, 2024
leanprover-community-mathlib4-bot
added a commit
to leanprover-community/mathlib4
that referenced
this pull request
Oct 17, 2024
leanprover-community-mathlib4-bot
added a commit
to leanprover-community/batteries
that referenced
this pull request
Oct 19, 2024
leanprover-community-mathlib4-bot
added a commit
to leanprover-community/mathlib4
that referenced
this pull request
Oct 19, 2024
leanprover-community-mathlib4-bot
added a commit
to leanprover-community/batteries
that referenced
this pull request
Oct 19, 2024
tydeu
force-pushed
the
lake/update-toolchain
branch
from
October 19, 2024 17:40
f6b5758
to
5e8b29e
Compare
leanprover-community-mathlib4-bot
added a commit
to leanprover-community/batteries
that referenced
this pull request
Oct 19, 2024
leanprover-community-mathlib4-bot
added a commit
to leanprover-community/mathlib4
that referenced
this pull request
Oct 19, 2024
!bench |
leanprover-community-bot
removed
the
builds-mathlib
CI has verified that Mathlib builds against this PR
label
Oct 19, 2024
tydeu
force-pushed
the
lake/update-toolchain
branch
from
October 30, 2024 12:59
3492a53
to
51bf3ea
Compare
leanprover-community-mathlib4-bot
added a commit
to leanprover-community/batteries
that referenced
this pull request
Oct 30, 2024
leanprover-community-mathlib4-bot
added a commit
to leanprover-community/mathlib4
that referenced
this pull request
Oct 30, 2024
leanprover-community-mathlib4-bot
added a commit
to leanprover-community/batteries
that referenced
this pull request
Nov 1, 2024
grunweg
pushed a commit
to leanprover-community/mathlib4
that referenced
this pull request
Nov 2, 2024
Changes `scripts/mk_all` to run `loadWorkspace` using Lake's `toBaseIO` utility. In addition to being a bit cleaner, this adaption will also be necessary once leanprover/lean4#5684 lands.
JovanGerb
pushed a commit
to JovanGerb/lean4
that referenced
this pull request
Nov 4, 2024
Lake will now update a package's `lean-toolchain` file on `lake update` if it finds the package's direct dependencies use a newer compatible toolchain. To skip this step, use the `--keep-toolchain` CLI option. Closes leanprover#2582. Closes leanprover#2752. Closes leanprover#5615. ### Toolchain update details To determine "newest compatible" toolchain, Lake parses the toolchain listed in the packages' `lean-toolchain` files into four categories: release , nightly, PR, and other. For newness, release toolchains are compared by semantic version (e.g., `"v4.4.0" < "v4.8.0"` and `"v4.6.0-rc1" < "v4.6.0"`) and nightlies are compared by date (e.g., `"nightly-2024-01-10" < "nightly-2014-10-01"`). All other toolchain types and mixtures are incompatible. If there is not a single newest toolchain, Lake will print a warning and continue updating without changing the toolchain. If Lake does find a new toolchain, Lake updates the workspace's `lean-toolchain` file accordingly and restarts the update process on the new Lake. If Elan is detected, it will spawn the new Lake process via `elan run` with the same arguments Lake was initially run with. If Elan is missing, it will prompt the user to restart Lake manually and exit with a special error code (4). ### Other changes To implement this new logic, various other refactors were needed. Here are some key highlights: * Logs emitted during package and workspace loading are now eagerly printed. * The Elan executable used by Lake is now configurable by the `ELAN` environment variable. * The `--lean` CLI option was removed. Use the `LEAN` environment variable instead. * `Package.deps` / `Package.opaqueDeps` have been removed. Use `findPackage?` with a dependency's name instead. * The dependency resolver now uses a pure breadth-first traversal to resolve dependencies. It also resolves dependencies in reverse order, which is done for consistency with targets. Latter targets shadow earlier ones and latter dependencies take precedence over earlier ones. **These changes mean the order of dependencies in a Lake manifest will change after the first `lake update` on this version of Lake.**
kim-em
pushed a commit
to leanprover-community/mathlib4
that referenced
this pull request
Nov 5, 2024
Adaption for leanprover/lean4#5684. Lake's `--lean` option has been removed, so this instead environment variables (`LEAN` with `LAKE_OVERRIDE_LEAN`) to configure the benchmark's fake Lean root.
Kha
added
release-ci
Enable all CI checks for a PR, like is done for releases
and removed
release-ci
Enable all CI checks for a PR, like is done for releases
labels
Nov 6, 2024
TwoFX
pushed a commit
to leanprover-community/mathlib4
that referenced
this pull request
Nov 13, 2024
Adaption for leanprover/lean4#5684. Lake's `--lean` option has been removed, so this instead environment variables (`LEAN` with `LAKE_OVERRIDE_LEAN`) to configure the benchmark's fake Lean root.
nomeata
pushed a commit
to leanprover-community/mathlib4
that referenced
this pull request
Nov 13, 2024
Adaption for leanprover/lean4#5684. Lake's `--lean` option has been removed, so this instead environment variables (`LEAN` with `LAKE_OVERRIDE_LEAN`) to configure the benchmark's fake Lean root.
nomeata
pushed a commit
to leanprover-community/mathlib4
that referenced
this pull request
Nov 14, 2024
Adaption for leanprover/lean4#5684. Lake's `--lean` option has been removed, so this instead environment variables (`LEAN` with `LAKE_OVERRIDE_LEAN`) to configure the benchmark's fake Lean root.
nomeata
pushed a commit
to leanprover-community/mathlib4
that referenced
this pull request
Nov 14, 2024
Adaption for leanprover/lean4#5684. Lake's `--lean` option has been removed, so this instead environment variables (`LEAN` with `LAKE_OVERRIDE_LEAN`) to configure the benchmark's fake Lean root.
kim-em
pushed a commit
that referenced
this pull request
Nov 29, 2024
Lake will now update a package's `lean-toolchain` file on `lake update` if it finds the package's direct dependencies use a newer compatible toolchain. To skip this step, use the `--keep-toolchain` CLI option. Closes #2582. Closes #2752. Closes #5615. To determine "newest compatible" toolchain, Lake parses the toolchain listed in the packages' `lean-toolchain` files into four categories: release , nightly, PR, and other. For newness, release toolchains are compared by semantic version (e.g., `"v4.4.0" < "v4.8.0"` and `"v4.6.0-rc1" < "v4.6.0"`) and nightlies are compared by date (e.g., `"nightly-2024-01-10" < "nightly-2014-10-01"`). All other toolchain types and mixtures are incompatible. If there is not a single newest toolchain, Lake will print a warning and continue updating without changing the toolchain. If Lake does find a new toolchain, Lake updates the workspace's `lean-toolchain` file accordingly and restarts the update process on the new Lake. If Elan is detected, it will spawn the new Lake process via `elan run` with the same arguments Lake was initially run with. If Elan is missing, it will prompt the user to restart Lake manually and exit with a special error code (4). To implement this new logic, various other refactors were needed. Here are some key highlights: * Logs emitted during package and workspace loading are now eagerly printed. * The Elan executable used by Lake is now configurable by the `ELAN` environment variable. * The `--lean` CLI option was removed. Use the `LEAN` environment variable instead. * `Package.deps` / `Package.opaqueDeps` have been removed. Use `findPackage?` with a dependency's name instead. * The dependency resolver now uses a pure breadth-first traversal to resolve dependencies. It also resolves dependencies in reverse order, which is done for consistency with targets. Latter targets shadow earlier ones and latter dependencies take precedence over earlier ones. **These changes mean the order of dependencies in a Lake manifest will change after the first `lake update` on this version of Lake.**
kim-em
added a commit
to leanprover-community/mathlib4
that referenced
this pull request
Dec 1, 2024
mathlib-bors bot
pushed a commit
to leanprover-community/mathlib4
that referenced
this pull request
Dec 1, 2024
leanprover/lean4#5684 (which landed in v4.14.0-rc3) has removed the `--lean` flag for `lake`, indicating that we should use the `LEAN` environment variable instead.
kim-em
added a commit
to leanprover-community/mathlib4
that referenced
this pull request
Dec 1, 2024
mathlib-bors bot
pushed a commit
to leanprover-community/mathlib4
that referenced
this pull request
Dec 1, 2024
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Lake will now update a package's
lean-toolchain
file onlake update
if it finds the package's direct dependencies use a newer compatible toolchain. To skip this step, use the--keep-toolchain
CLI option.Closes #2582. Closes #2752. Closes #5615.
Toolchain update details
To determine "newest compatible" toolchain, Lake parses the toolchain listed in the packages'
lean-toolchain
files into four categories: release , nightly, PR, and other. For newness, release toolchains are compared by semantic version (e.g.,"v4.4.0" < "v4.8.0"
and"v4.6.0-rc1" < "v4.6.0"
) and nightlies are compared by date (e.g.,"nightly-2024-01-10" < "nightly-2014-10-01"
). All other toolchain types and mixtures are incompatible. If there is not a single newest toolchain, Lake will print a warning and continue updating without changing the toolchain.If Lake does find a new toolchain, Lake updates the workspace's
lean-toolchain
file accordingly and restarts the update process on the new Lake. If Elan is detected, it will spawn the new Lake process viaelan run
with the same arguments Lake was initially run with. If Elan is missing, it will prompt the user to restart Lake manually and exit with a special error code (4).Other changes
To implement this new logic, various other refactors were needed. Here are some key highlights:
ELAN
environment variable.--lean
CLI option was removed. Use theLEAN
environment variable instead.Package.deps
/Package.opaqueDeps
have been removed. UsefindPackage?
with a dependency's name instead.lake update
on this version of Lake.