leanprover / leanprover/lean4-cli
CLI fails silently on v4.30.0+ when using module system
Nobody has claimed this yet.
- Dominant language
- Lean
- Stars
- 120
- Forks
- 30
- Avg merge
- 5m
- Merged PRs (30d)
- 4
Description
Up to v4.29.1, it was possible to use the module system for the entry point of an executabl (Main.lean in the template lake projects). In v4.30.0 this will cause lean4-cli to fail silently resulting in a no-op when the executable is called.
Reproduction
I've created an MWE-repo with 2 commits, one working in v4.29.1 and one failing in v4.30.0:
https://github.com/joneugster/lean-cli-bug-demo/commits/main/
The key is that Main.lean contains
module
...
public meta def main (args : List String) : IO UInt32 :=
i18n.validate args
If module is removed from Main.lean turning it into a plain Lean file, it works again.
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 linked two-commit MWE repository and compare its behavior under v4.29.1 and v4.30.0, focusing on Main.lean and its module declaration. Trace how lean4-cli discovers and invokes the public meta main entry point. Done means a module-based Main.lean executes normally instead of silently becoming a no-op, while the existing plain-file case still works.
Written by the indexing model from the issue text.
Assessment
- Domain
- cli, compilers
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100