You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Inject a leanpkg lean-upgrade <version> command into leanpkg (i.e. it will only be available when calling ~/.elan/bin/leanpkg). This is not just a convenience command for editing the leanpkg.toml file: It first has to resolve channel names like stable/nightly to specific Lean versions that are valid values for the lean_version field.
Override leanpkg add and leanpkg upgrade to add a warning on lean_version mismatches between the package and its dependencies. When connected to a TTY, offer to call lean-upgrade with an appropriate version to fix the conflicts (well, at least one of them).
With these changes, installing Lean and adding a mathlib dependency could be as simple as:
$ curl https://raw.githubusercontent.com/Kha/elan/master/elan-init.sh -sSf | sh
...
$ leanpkg new mypackage # uses stable leanpkg, doesn't matter
$ cd mypackage
$ leanpkg add leanprover/mathlib
...
WARNING: Lean version "nightly-2018-04-06" of dependency "mathlib" does not match configured Lean version "3.4.0"
Do you want to set your package's Lean version to "nightly-2018-04-06"? [yN] y...
The text was updated successfully, but these errors were encountered:
Suggested plan:
leanpkg lean-upgrade <version>
command intoleanpkg
(i.e. it will only be available when calling~/.elan/bin/leanpkg
). This is not just a convenience command for editing theleanpkg.toml
file: It first has to resolve channel names likestable/nightly
to specific Lean versions that are valid values for thelean_version
field.leanpkg add
andleanpkg upgrade
to add a warning onlean_version
mismatches between the package and its dependencies. When connected to a TTY, offer to calllean-upgrade
with an appropriate version to fix the conflicts (well, at least one of them).With these changes, installing Lean and adding a mathlib dependency could be as simple as:
The text was updated successfully, but these errors were encountered: