Skip to content

fix overwrite_index: importModules changes#1142

Merged
Paul-Lez merged 2 commits intogoogle-deepmind:mainfrom
mo271:fix_importModules
Oct 23, 2025
Merged

fix overwrite_index: importModules changes#1142
Paul-Lez merged 2 commits intogoogle-deepmind:mainfrom
mo271:fix_importModules

Conversation

@mo271
Copy link
Copy Markdown
Collaborator

@mo271 mo271 commented Oct 23, 2025

The overwrite_index.lean script failed to count attributes after a Lean version bump. This was due to changes in how module imports handle environment extensions, as introduced in
leanprover/lean4#6325 .

Lean.withImportModules no longer loads environment extensions. This commit refactors the runWithImports function to use the lower-level importModulesCore and finalizeImport functions, explicitly setting loadExts := true to ensure attributes are loaded and counted correctly.

The `overwrite_index.lean` script failed to count attributes after a
Lean version bump. This was due to changes in how module imports
handle environment extensions, as introduced in
leanprover/lean4#7787 .

`Lean.withImportModules` no longer loads environment extensions. This commit
refactors the `runWithImports` function to use the lower-level
`importModulesCore` and `finalizeImport` functions, explicitly setting
`loadExts := true` to ensure attributes are loaded and counted correctly.
@mo271 mo271 requested a review from Paul-Lez October 23, 2025 08:44
Copy link
Copy Markdown
Collaborator

@Paul-Lez Paul-Lez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, LGTM!

@Paul-Lez Paul-Lez merged commit 4b01fd3 into google-deepmind:main Oct 23, 2025
4 checks passed
@Paul-Lez Paul-Lez added the fix General repo chore label Apr 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix General repo chore

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants