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
Create a new project with lakefile.toml containing:
[[require]]
name = "mathlib"git = "https://github.com/leanprover-community/mathlib4.git"version = "v4.14.0"
and run lake update.
Expected behavior:
Expected behavior: lake should at least emit a warning saying git and version are incompatible, maybe even suggesting to replace version by rev and explain that rev is intended for reservoir require.
Actual behavior:
lake silently ignores the version field and updates mathlib to git master.
While Lake is missing TOML validation, the example in question is not simply a TOML validation issue. It is equivalent to the following configuration in Lean (which is valid):
I see two ways to offer a user some correction (perhaps both are desirable):
Since Lake does not yet support non-git versions, always warn if the version in a non-git version.
Since we now have Reservoir requires for determining default sources, always require a git source to specify a revision (instead of just defaulting to master as we currently do).
Prerequisites
Please put an X between the brackets as you perform the following steps:
https://github.com/leanprover/lean4/issues
Avoid dependencies to Mathlib or Batteries.
https://live.lean-lang.org/#project=lean-nightly
(You can also use the settings there to switch to “Lean nightly”)
Description
lake silently ignores bad option combinations in
lakefile.toml
, for instance aversion
field for arequire
fromgit
.Context
https://leanprover.zulipchat.com/#narrow/channel/270676-lean4/topic/invalid.20atom/near/491387823
Steps to Reproduce
Create a new project with
lakefile.toml
containing:and run
lake update
.Expected behavior:
Expected behavior:
lake
should at least emit a warning sayinggit
andversion
are incompatible, maybe even suggesting to replaceversion
byrev
and explain thatrev
is intended forreservoir
require.Actual behavior:
lake
silently ignores theversion
field and updatesmathlib
to gitmaster
.Versions
Lean 4.14.0 on Linux.
Impact
Add 👍 to issues you consider important. If others are impacted by this issue, please ask them to add 👍 to it.
The text was updated successfully, but these errors were encountered: