Report the proof state when an error occurs during a proof#1453
Merged
fblanqui merged 1 commit intoJul 10, 2026
Merged
Conversation
Attach the proof state to errors raised while a proof is in progress, using the err_desc field of Fatal: the goals a failing tactic was applied to, the goals before and after the tactic for a subproof-count mismatch, and the remaining goals for an unfinished proof at `end`. The error message itself is unchanged; the state is printed after it, uncolored. The LSP server disables this for tactic failures since editors display the proof state themselves.
fe0da2c to
b7d9ae2
Compare
Member
|
Thanks @ciaran-matthew-dunne ! |
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.
Errors raised during a proof now report the proof state. An unfinished proof at
endand most subproof-count mismatches already print the goals, but a failing tactic prints nothing:The state is now attached to every such error, in the
err_descfield ofFatal(from #1290): the message is unchanged, and the state is printed uncolored after it.A subproof-count mismatch is only detected after the tactic ran, so it reports the state before and after it:
An unfinished proof at
endreports the remaining goals under aProof state:heading.The state is attached in the outer
Tactic.handle, below which tacticals catch their own errors, so failures swallowed bytry/orelseare unaffected. The LSP server disables the attachment for tactic failures (Proof.state_on_error) since editors display the goals themselves. Tests:tests/proof_state.mlon three new KO fixtures.