lean4-htt/tests/lean/snapshotTree.lean
Sebastian Ullrich 30ea4170a7
fix: progress bar in tactic combinators (#11577)
This PR fixes the tactic framework reporting file progress bar ranges
that cover up progress inside tactic blocks nested in tactic
combinators. This is a purely visual change, incremental re-elaboration
inside supported combinators was not affected.

Also adds a test though it is not elaborate enough to test proper timing
of progress events per se; see moddoc there.

![Recording 2025-12-10 at 10 21
52](https://github.com/user-attachments/assets/019b8f13-5aad-4b2c-ab0d-a1348033c6be)
2025-12-10 10:04:41 +00:00

24 lines
828 B
Text

/-!
Sanity-check reported ranges for nested snapshot tree nodes. In particular, ranges of sibling nodes
resolved later should not cover up progress inside earlier nodes.
This test cannot test per se whether such cover-up occurs without a dedicated synchronization
protocol between the test and the involved tactics to control ordering of events like in the
cancellation tests. Instead, it is intended merely to detect timing-independent changes to the
snapshot tree and in the event of such changes, preservation of proper progress reporting needs to
be verified manually.
-/
set_option internal.cmdlineSnapshots false
set_option trace.Elab.snapshotTree true
example : True := by
sleep 0
sleep 100
· next =>
induction 0 with
| zero =>
sleep 100
trivial
| succ n =>
sleep 100
trivial