mirror of
https://github.com/leanprover/lean4.git
synced 2026-03-17 10:24:07 +00:00
This PR ensures that environments can be loaded, repeatedly, without executing arbitrary code
736 B
736 B
Breaking Changes
- The functions
Lean.Environment.importModulesandLean.Environment.finalizeImporthave been extended with a new parameterloadExts : Bool := falsethat enables environment extension state loading. Their previous behavior corresponds to setting the flag totruebut is only safe to do in combination withenableInitializersExecution; see also theimportModulesdocstring. The new default valuefalseensures the functions can be used correctly multiple times within the same process when environment extension access is not needed. The wrapper functionLean.Environment.withImportModulesnow always callsimportModuleswithloadExts := falseas it is incompatible with extension loading.