fix: look up local declarations in environments built by ofKernelEnv - #14771
Draft
Kha wants to merge 1 commit into
Draft
fix: look up local declarations in environments built by ofKernelEnv#14771Kha wants to merge 1 commit into
ofKernelEnv#14771Kha wants to merge 1 commit into
Conversation
Member
Author
|
!bench |
|
Benchmark results for 5ed20d7 against 23393b9 are in. No significant results found. @Kha
Small changes (4🟥)
|
|
Mathlib CI status (docs):
|
Collaborator
|
Reference manual CI status:
|
This PR makes a kernel error message print declarations of the current module the way they are printed everywhere else, with implicit arguments hidden, where a constant it could not resolve was previously shown fully applied. `findAsync?` consults the imports and then `asyncConsts`, where an elaborator environment keeps the current module's own declarations. An environment built by `ofKernelEnv` keeps them in the second stage of the kernel environment's constant map instead, which neither lookup reads, so every one of them looked undefined. `findAsyncCore?` and `findTaskCore` now fall back to that stage, which an elaborator environment leaves empty, so nothing else is affected. `enableRealizationsForImports` factors the initialization of `importRealizationCtx?` out of `importModules`, the operation that field's documentation already names, so that such an environment can be given a realization context of its own. Co-Authored-By: Claude <noreply@anthropic.com>
Member
Author
|
!bench mathlib |
|
Waiting until the label
mathlib4-nightly-available
You can edit the original message until the command succeeds. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR fixes using
Environment.find?and its variants on the result ofofKernelEnv.This also fixes the presentation of at least one kernel error message.
Fixes #13783, more directly