lean4-htt/tests/lean/interactive/incrementalTactic.lean.expected.out
Sebastian Ullrich adfd438164
fix: incremental reuse leading to goals in front of the text cursor being shown (#4395)
As [reported on
Zulip](https://leanprover.zulipchat.com/#narrow/stream/113488-general/topic/maybe.20a.20cache.20bug.3F).

We expected that for sound reuse of elaboration results, it is
sufficient to compare the old and new syntax tree's structure and atoms
including position info, but not the whitespace in between them.
However, we have at least one request handler, the goal view, that
inspects the whitespace after a tactic and thus could return incorrect
results on reuse. For now we implement the straightforward fix of
checking the whitespace as well. Alternatives like updating the
whitespace stored in the reused info tree are tbd.

This has the slight disadvantage that adding whitespace at the end of a
tactic will re-execute it (or the entire body, but not the header, if
the body is not a tactic block), but only up to typing the first
character of the next tactic or command.
2024-06-08 15:08:14 +00:00

64 lines
2 KiB
Text

b 0
b 1
b 2
b 2.5
t 0
t 1
t 2
t 2
{"version": 3,
"uri": "file:///incrementalTactic.lean",
"diagnostics":
[{"source": "Lean 4",
"severity": 1,
"range":
{"start": {"line": 4, "character": 4}, "end": {"line": 4, "character": 13}},
"message":
"tactic 'introN' failed, insufficient number of binders\na n : Nat\n⊢ True",
"fullRange":
{"start": {"line": 4, "character": 4}, "end": {"line": 4, "character": 13}}},
{"source": "Lean 4",
"severity": 1,
"range":
{"start": {"line": 2, "character": 22}, "end": {"line": 3, "character": 0}},
"message": "unsolved goals\nthis : Nat → Nat → True\n⊢ True",
"fullRange":
{"start": {"line": 2, "character": 22},
"end": {"line": 10, "character": 11}}}]}
{"version": 1,
"uri": "file:///incrementalTactic.lean",
"diagnostics":
[{"source": "Lean 4",
"severity": 1,
"range":
{"start": {"line": 1, "character": 38}, "end": {"line": 4, "character": 3}},
"message": "unexpected token '/-!'; expected ')', '_', identifier or term",
"fullRange":
{"start": {"line": 1, "character": 38},
"end": {"line": 4, "character": 3}}}]}
{"version": 1,
"uri": "file:///incrementalTactic.lean",
"diagnostics":
[{"source": "Lean 4",
"severity": 1,
"range":
{"start": {"line": 2, "character": 9}, "end": {"line": 2, "character": 11}},
"message": "unknown identifier 'no'",
"fullRange":
{"start": {"line": 2, "character": 9}, "end": {"line": 2, "character": 11}}},
{"source": "Lean 4",
"severity": 1,
"range":
{"start": {"line": 3, "character": 9}, "end": {"line": 3, "character": 16}},
"message": "unsolved goals\n⊢ Nat",
"fullRange":
{"start": {"line": 3, "character": 9},
"end": {"line": 3, "character": 16}}}]}
s
{ goals := #[{ type := Lean.Widget.TaggedText.tag
{ subexprPos := "/", diffStatus? := none }
(Lean.Widget.TaggedText.text "True"),
isInserted? := some false,
isRemoved? := none,
hyps := #[] }] }