Zulip Chat Archive
Stream: lean4
Topic: How does lakefile elaboration work in the Lean server?
Eric Wieser (Dec 22 2025 at 20:02):
If I paste
import Lake
open Lake DSL
package foo
into the web editor, or any file not called lakefile.lean, I get the error
elaboration function for `Lake.DSL.packageCommand` has not been implemented
Where is the code that special-cases lakefile.lean in the lean server, and what does it do in order to provide these missing elaborators?
Mac Malone (Dec 23 2025 at 03:51):
The relevent special case is here.
Mac Malone (Dec 23 2025 at 03:51):
For configuration files, Lake loads Lake as an elaboration plugin, which enables the Lake DSL (as the DSL is all builtin macros/elaborators/initializers now).
Eric Wieser (Dec 23 2025 at 03:52):
I guess this is a plugin to keep the Lean binary itself lighter-weight?
Mac Malone (Dec 23 2025 at 03:53):
Yes, and the DSL is builtin to avoid staging issues in Lake.
Last updated: Feb 28 2026 at 14:05 UTC