Autoparam tactic scripts have no source positions, which until recently made it so that any errors or messages would be logged at the current ref, which was the application or structure instance being elaborated. However, with the new incrementality features the ref is now carefully managed to avoid leakage of outside data. This inhibits the elaborator's ref from being used for the tactic's ref, causing messages to be placed at the beginning of the file rather than on the syntax that triggered the autoparam. To fix this, now the elaborators insert the ref's source position everywhere into the autoparam tactic script. If in the future messages for synthetic tactics appear at the tops of files in other contexts, we should consider an approach where `Lean.Elab.Term.withReuseContext` uses something like `replaceRef` to set the ref while disabling incrementality when the tactic does not contain source position information. Closes #4880 |
||
|---|---|---|
| .. | ||
| bench | ||
| compiler | ||
| elabissues | ||
| ir | ||
| lean | ||
| pkg | ||
| playground | ||
| plugin | ||
| simpperf | ||
| .gitignore | ||
| common.sh | ||
| lean-toolchain | ||