Lean 4.1.0 (2023-09-26)
The error positioning on missing tokens has been improved. In particular, this should make it easier to spot errors in incomplete tactic proofs.
After elaborating a configuration file, Lake will now cache the configuration to a
lakefile.olean. Subsequent runs of Lake will import this OLean instead of elaborating the configuration file. This provides a significant performance improvement (benchmarks indicate that using the OLean cuts Lake's startup time in half), but there are some important details to keep in mind:Lake will regenerate this OLean after each modification to the
lakefile.leanorlean-toolchain. You can also force a reconfigure by passing the new--reconfigure/-Roption tolake.Lake configuration options (i.e.,
-K) will be fixed at the moment of elaboration. Setting these options whenlakeis using the cached configuration will have no effect. To change options, runlakewith-R/--reconfigure.The
lakefile.oleanis a local configuration and should not be committed to Git. Therefore, existing Lake packages need to add it to their.gitignore.
The signature of
Lake.buildOhas changed,argshas been split intoweakArgsandtraceArgs.traceArgsare included in the input trace andweakArgsare not. See Lake's FFI example for a demonstration of how to adapt to this change.The signatures of
Lean.importModules,Lean.Elab.headerToImports, andLean.Elab.parseImportsThere is now an
occsfield in the configuration object for therewritetactic, allowing control of which occurrences of a pattern should be rewritten. This was previously a separate argument forLean.MVarId.rewrite, and this has been removed in favour of an additional field ofRewrite.Config. It was not previously accessible from user tactics.