lean4-htt/tests/lean/interactive/1265.lean.expected.out
Marc Huisinga f64bce6ef1
fix: auto-completion performance regression (#6794)
This PR fixes a significant auto-completion performance regression that
was introduced in #5666, i.e. v4.14.0.

#5666 introduced tactic docstrings, which were attempted to be collected
for every single completion item. This is slow for hundreds of thousands
of completion items. To fix this, this PR moves the docstring
computation into the completion item resolution, which is only called
when users select a specific completion item in the UI.

A downside of this approach is that we currently can't test completion
item resolution, so we lose a few tests that cover docstrings in
completions in this PR.
2025-01-27 21:15:09 +00:00

188 lines
5.4 KiB
Text

{"textDocument": {"uri": "file:///1265.lean"},
"position": {"line": 0, "character": 51}}
{"items":
[{"sortText": "0",
"label": "expandInterpolatedStr",
"kind": 3,
"data":
{"params":
{"textDocument": {"uri": "file:///1265.lean"},
"position": {"line": 0, "character": 51}},
"id": {"const": {"declName": "Lean.TSyntax.expandInterpolatedStr"}},
"cPos": 1}},
{"sortText": "1",
"label": "getChar",
"kind": 3,
"data":
{"params":
{"textDocument": {"uri": "file:///1265.lean"},
"position": {"line": 0, "character": 51}},
"id": {"const": {"declName": "Lean.TSyntax.getChar"}},
"cPos": 1}},
{"sortText": "2",
"label": "getDocString",
"kind": 3,
"data":
{"params":
{"textDocument": {"uri": "file:///1265.lean"},
"position": {"line": 0, "character": 51}},
"id": {"const": {"declName": "Lean.TSyntax.getDocString"}},
"cPos": 1}},
{"sortText": "3",
"label": "getHygieneInfo",
"kind": 3,
"data":
{"params":
{"textDocument": {"uri": "file:///1265.lean"},
"position": {"line": 0, "character": 51}},
"id": {"const": {"declName": "Lean.TSyntax.getHygieneInfo"}},
"cPos": 1}},
{"sortText": "4",
"label": "getId",
"kind": 3,
"data":
{"params":
{"textDocument": {"uri": "file:///1265.lean"},
"position": {"line": 0, "character": 51}},
"id": {"const": {"declName": "Lean.TSyntax.getId"}},
"cPos": 1}},
{"sortText": "5",
"label": "getName",
"kind": 3,
"data":
{"params":
{"textDocument": {"uri": "file:///1265.lean"},
"position": {"line": 0, "character": 51}},
"id": {"const": {"declName": "Lean.TSyntax.getName"}},
"cPos": 1}},
{"sortText": "6",
"label": "getNat",
"kind": 3,
"data":
{"params":
{"textDocument": {"uri": "file:///1265.lean"},
"position": {"line": 0, "character": 51}},
"id": {"const": {"declName": "Lean.TSyntax.getNat"}},
"cPos": 1}},
{"sortText": "7",
"label": "getScientific",
"kind": 3,
"data":
{"params":
{"textDocument": {"uri": "file:///1265.lean"},
"position": {"line": 0, "character": 51}},
"id": {"const": {"declName": "Lean.TSyntax.getScientific"}},
"cPos": 1}},
{"sortText": "8",
"label": "getString",
"kind": 3,
"data":
{"params":
{"textDocument": {"uri": "file:///1265.lean"},
"position": {"line": 0, "character": 51}},
"id": {"const": {"declName": "Lean.TSyntax.getString"}},
"cPos": 1}},
{"sortText": "9",
"label": "raw",
"kind": 5,
"data":
{"params":
{"textDocument": {"uri": "file:///1265.lean"},
"position": {"line": 0, "character": 51}},
"id": {"const": {"declName": "Lean.TSyntax.raw"}},
"cPos": 1}}],
"isIncomplete": true}
{"textDocument": {"uri": "file:///1265.lean"},
"position": {"line": 2, "character": 53}}
{"items":
[{"sortText": "0",
"label": "expandInterpolatedStr",
"kind": 3,
"data":
{"params":
{"textDocument": {"uri": "file:///1265.lean"},
"position": {"line": 2, "character": 53}},
"id": {"const": {"declName": "Lean.TSyntax.expandInterpolatedStr"}},
"cPos": 1}},
{"sortText": "1",
"label": "getChar",
"kind": 3,
"data":
{"params":
{"textDocument": {"uri": "file:///1265.lean"},
"position": {"line": 2, "character": 53}},
"id": {"const": {"declName": "Lean.TSyntax.getChar"}},
"cPos": 1}},
{"sortText": "2",
"label": "getDocString",
"kind": 3,
"data":
{"params":
{"textDocument": {"uri": "file:///1265.lean"},
"position": {"line": 2, "character": 53}},
"id": {"const": {"declName": "Lean.TSyntax.getDocString"}},
"cPos": 1}},
{"sortText": "3",
"label": "getHygieneInfo",
"kind": 3,
"data":
{"params":
{"textDocument": {"uri": "file:///1265.lean"},
"position": {"line": 2, "character": 53}},
"id": {"const": {"declName": "Lean.TSyntax.getHygieneInfo"}},
"cPos": 1}},
{"sortText": "4",
"label": "getId",
"kind": 3,
"data":
{"params":
{"textDocument": {"uri": "file:///1265.lean"},
"position": {"line": 2, "character": 53}},
"id": {"const": {"declName": "Lean.TSyntax.getId"}},
"cPos": 1}},
{"sortText": "5",
"label": "getName",
"kind": 3,
"data":
{"params":
{"textDocument": {"uri": "file:///1265.lean"},
"position": {"line": 2, "character": 53}},
"id": {"const": {"declName": "Lean.TSyntax.getName"}},
"cPos": 1}},
{"sortText": "6",
"label": "getNat",
"kind": 3,
"data":
{"params":
{"textDocument": {"uri": "file:///1265.lean"},
"position": {"line": 2, "character": 53}},
"id": {"const": {"declName": "Lean.TSyntax.getNat"}},
"cPos": 1}},
{"sortText": "7",
"label": "getScientific",
"kind": 3,
"data":
{"params":
{"textDocument": {"uri": "file:///1265.lean"},
"position": {"line": 2, "character": 53}},
"id": {"const": {"declName": "Lean.TSyntax.getScientific"}},
"cPos": 1}},
{"sortText": "8",
"label": "getString",
"kind": 3,
"data":
{"params":
{"textDocument": {"uri": "file:///1265.lean"},
"position": {"line": 2, "character": 53}},
"id": {"const": {"declName": "Lean.TSyntax.getString"}},
"cPos": 1}},
{"sortText": "9",
"label": "raw",
"kind": 5,
"data":
{"params":
{"textDocument": {"uri": "file:///1265.lean"},
"position": {"line": 2, "character": 53}},
"id": {"const": {"declName": "Lean.TSyntax.raw"}},
"cPos": 1}}],
"isIncomplete": true}