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
chore(mk_all): infer module style from existing aggregator file (#38395)
This PR makes `lake exe mk_all` infer whether each aggregator file should use module syntax (`module` header and `public import` lines) by parsing the existing file's header with `Lean.parseImports'`. Previously the choice came from a hardcoded `d.startsWith "Mathlib"` rule plus a `--module` flag, which meant downstream projects (e.g. FLT) that had modulized their aggregator file would have it silently reverted by `mk_all` (see [Zulip discussion](https://leanprover.zulipchat.com/#narrow/channel/113488-general/topic/module.20system.20questions/near/588595297)).
The `--module` flag is still honored: when passed, it forces module style. Otherwise the style is inferred from the existing file, or defaults to plain for new files.
One behavior change worth noting: creating a *new* `Mathlib/Foo` aggregator (e.g. via `lake exe mk_all --lib Mathlib/Foo` for a fresh subfolder) no longer auto-modulizes — pass `--module` once on first creation.
🤖 Prepared with Claude Code
0 commit comments