Open Kha opened 6 years ago
What would you do when you add a second package that specifies a different version of Lean?
What would you do when you add a second package that specifies a different version of Lean?
Select "an appropriate version", as I said :grin: . ...probably the lexically largest version string or something
Sorry! I must have missed that!
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: