lean4-htt/tests/lean/interactive/interactiveDiagnostics.lean.expected.out
Marc Huisinga 80b8e44072
test: fix test flakiness (#10680)
This PR fixes several causes of test flakiness and re-enables the tests
that were disabled in #10665, #10669 and #10673.

Specifically, it fixes:
- A race condition in the file worker that caused it to report an
incomplete snapshot prefix in the inlay hint request (confirmed to be
the cause of #10665)
- A bug in the test runner where it didn't correctly account for
non-deterministic message ordering inducing different RPC pointer
numbering (confirmed to be the cause of #10673)
- A race condition in the watchdog that would sometimes cause the module
hierarchy to be empty (likely the cause of #10669, but not confirmed as
this issue only reproduced again once in tens of thousands of test runs
on various machines, including CI)
- An unrelated bug in the module hierarchy implementation that would
cause it to report an empty module hierarchy when the file was changed

It also replaces some calls to `Task.get` in the language server with
`IO.wait` to protect the code against unfortunate compiler re-ordering.
2025-10-08 13:33:56 +00:00

91 lines
3.3 KiB
Text

{"version": 1,
"uri": "file:///interactiveDiagnostics.lean",
"diagnostics":
[{"source": "Lean 4",
"severity": 2,
"range":
{"start": {"line": 0, "character": 4}, "end": {"line": 0, "character": 7}},
"message": "declaration uses 'sorry'",
"fullRange":
{"start": {"line": 0, "character": 4}, "end": {"line": 0, "character": 7}}},
{"source": "Lean 4",
"severity": 1,
"range":
{"start": {"line": 2, "character": 4}, "end": {"line": 2, "character": 7}},
"message": "Failed to infer type of definition `bar`",
"fullRange":
{"start": {"line": 2, "character": 4}, "end": {"line": 2, "character": 7}},
"code": "lean.inferDefTypeFailed"},
{"source": "Lean 4",
"severity": 3,
"range":
{"start": {"line": 4, "character": 0}, "end": {"line": 4, "character": 5}},
"message": "1",
"fullRange":
{"start": {"line": 4, "character": 0}, "end": {"line": 4, "character": 5}}},
{"source": "Lean 4",
"severity": 3,
"range":
{"start": {"line": 6, "character": 0}, "end": {"line": 6, "character": 6}},
"message": "Nat : Type",
"fullRange":
{"start": {"line": 6, "character": 0}, "end": {"line": 6, "character": 6}}}]}
{"lineRange": {"start": 0, "end": 8}}
[{"source": "Lean 4",
"severity": 2,
"range":
{"start": {"line": 0, "character": 4}, "end": {"line": 0, "character": 7}},
"message":
{"append":
[{"tag": [{"expr": {"text": "declaration uses '"}}, {"text": ""}]},
{"tag":
[{"expr":
{"tag": [{"subexprPos": "/", "info": {"p": "0"}}, {"text": "sorry"}]}},
{"text": ""}]},
{"tag": [{"expr": {"text": "'"}}, {"text": ""}]}]},
"fullRange":
{"start": {"line": 0, "character": 4}, "end": {"line": 0, "character": 7}}},
{"source": "Lean 4",
"severity": 1,
"range":
{"start": {"line": 2, "character": 4}, "end": {"line": 2, "character": 7}},
"message":
{"append":
[{"tag": [{"expr": {"text": "Failed to infer type of "}}, {"text": ""}]},
{"tag": [{"expr": {"text": "definition `"}}, {"text": ""}]},
{"tag": [{"expr": {"text": "bar"}}, {"text": ""}]},
{"tag": [{"expr": {"text": "`"}}, {"text": ""}]},
{"tag":
[{"widget":
{"wi":
{"props":
{"explanationUrl":
"REFERENCE/find/?domain=Manual.errorExplanation&name=lean.inferDefTypeFailed",
"code": "lean.inferDefTypeFailed"},
"javascriptHash": "14043757810349425459",
"id": "Lean.errorDescriptionWidget"},
"alt": {"tag": [{"expr": {"text": ""}}, {"text": ""}]}}},
{"text": ""}]}]},
"fullRange":
{"start": {"line": 2, "character": 4}, "end": {"line": 2, "character": 7}},
"code": "lean.inferDefTypeFailed"},
{"source": "Lean 4",
"severity": 3,
"range":
{"start": {"line": 4, "character": 0}, "end": {"line": 4, "character": 5}},
"message": {"tag": [{"expr": {"text": "1"}}, {"text": ""}]},
"fullRange":
{"start": {"line": 4, "character": 0}, "end": {"line": 4, "character": 5}}},
{"source": "Lean 4",
"severity": 3,
"range":
{"start": {"line": 6, "character": 0}, "end": {"line": 6, "character": 6}},
"message":
{"tag":
[{"expr":
{"append":
[{"text": "Nat : "},
{"tag": [{"subexprPos": "/1", "info": {"p": "0"}}, {"text": "Type"}]}]}},
{"text": ""}]},
"fullRange":
{"start": {"line": 6, "character": 0}, "end": {"line": 6, "character": 6}}}]