Lake fails to parse result of config translation script
wupr opened this issue · comments
Prerequisites
- Put an X between the brackets on this line if you have done all of the following:
- Check that your issue is not already filed.
- Reduce the issue to a minimal, self-contained, reproducible test case. Avoid dependencies to mathlib4 or std4.
Description
Lake fails to parse the toml configuration file produced by running lake translate-config toml
on the default math project template's lakefile.lean
.
Context
The toml configuration file is a new feature in v4.8.0-rc1.
Steps to Reproduce
Run the following commands:
lake new example math
cd example
lake translate-config toml
lake build
Expected behavior: Exit without error.
Actual behavior: Error message:
error: lakefile.toml:6:17: expected string, boolean, or nonnegative integer
Versions
Lean (version 4.8.0-rc1, x86_64-unknown-linux-gnu, commit dcccfb7, Release)
Ubuntu 23.10
Additional Information
Content of lakefile.lean
prior to translation:
import Lake
open Lake DSL
package «example» where
-- Settings applied to both builds and interactive editing
leanOptions := #[
⟨`pp.unicode.fun, true⟩, -- pretty-prints `fun a ↦ b`
⟨`pp.proofs.withType, false⟩
]
-- add any additional package configuration options here
require mathlib from git
"https://github.com/leanprover-community/mathlib4.git"
@[default_target]
lean_lib «Example» where
-- add any library configuration options here
Content of lakefile.toml
after translation:
name = "example"
[leanOptions]
pp.unicode.fun = true
pp.proofs.withType = false
defaultTargets = ["Example"]
[[require]]
name = "mathlib"
git = "https://github.com/leanprover-community/mathlib4.git"
[[lean_lib]]
name = "Example"
The aforementioned error does not occur if the line
defaultTargets = ["Example"]
is either moved to line 2 or changed to
defaultTargets = "Example"
Impact
Add 👍 to issues you consider important. If others are impacted by this issue, please ask them to add 👍 to it.