Lake toolchain update wrongly claims multiple available toolchains
Nobody has claimed this yet.
- Dominant language
- Lean
- Stars
- 9.2k
- Forks
- 990
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 175
Description
Prerequisites
Please put an X between the brackets as you perform the following steps:
- Check that your issue is not already filed:
https://github.com/leanprover/lean4/issues - Reduce the issue to a minimal, self-contained, reproducible test case.
Avoid dependencies to Mathlib or Batteries. - Test your test case against the latest nightly release, for example on
https://live.lean-lang.org/#project=lean-nightly
(You can also use the settings there to switch to “Lean nightly”)
Description
If we have a project which has a lean-toolchain with e.g.:
leanprover/lean4:4.22.0-rc4
and a dependency with (note the v):
leanprover/lean4:v4.22.0-rc4
and we update to the latest versions of these dependencies lake will suggest:
warning: toolchain not updated; multiple toolchain candidates:
leanprover/lean4:v4.22.0-rc4
from «doc-gen4»
leanprover/lean4:4.22.0-rc4
from MD4Lean
Which is confusing given that the two versions are semantically equivalent.
Context
Updating doc-gen's dependencies
Steps to Reproduce
- Create a project with some Lean version and add a dependency that has a semantically equivalent but not precisely string equal version.
lake update- :(
Expected behavior: lake should not complain about multiple candidates
Actual behavior: lake does complain about multiple candidates
Versions
[Output of #version or #eval Lean.versionString]
[OS version, if not using live.lean-lang.org.]
Additional Information
leanprover/lean4:v4.22.0-rc4
Impact
Add 👍 to issues you consider important. If others are impacted by this issue, please ask them to add 👍 to it.
Contributor guide
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 by reproducing the warning with a project whose lean-toolchain and dependency use semantically equivalent versions with and without the v prefix, then run lake update. Trace the toolchain candidate comparison in Lake and verify that equivalent versions are treated as one candidate, with no multiple-candidates warning.
Written by the indexing model from the issue text.
Assessment
- Domain
- build-system, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100