RFC: Upgrading Lean versions
Open
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 637
- Forks
- 58
- Avg merge
- 25m
- Merged PRs (30d)
- 3
Description
Suggested plan:
- Inject a
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.tomlfile: It first has to resolve channel names likestable/nightlyto specific Lean versions that are valid values for thelean_versionfield. - Override
leanpkg addandleanpkg upgradeto add a warning onlean_versionmismatches between the package and its dependencies. When connected to a TTY, offer to calllean-upgradewith 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
...
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the ~/.elan/bin/leanpkg entry point and the existing leanpkg add and upgrade commands. Determine how channel names are resolved to valid lean_version values and how interactive TTY prompts should handle mismatches; done means lean-upgrade and dependency warnings work together as described.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli, devtools
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100