Open kubukoz opened 1 year ago
To reproduce:
a.smithy
$version: "2"
namespace test
operation HelloWorld { input := {} errors: [TestErr] }
@error("client") structure TestErr {}
2. Go to `errors: [Test<cursor>Err]` 3. Trigger "go to definition" 4. See "No references found for 'TestErr'" (in vscode) LSP request/response:
[Trace - 15:28:27] Sending request 'textDocument/definition - (237)'. Params: { "textDocument": { "uri": "file:///Users/kubukoz/projects/demos/a.smithy" }, "position": { "line": 6, "character": 17 } }
[Trace - 15:28:27] Received response 'textDocument/definition - (237)' in 3ms. Result: [ { "uri": "file:/Users/kubukoz/projects/demos/a.smithy", "range": { "start": { "line": 5, "character": 13 }, "end": { "line": 6, "character": 21 } } } ]
The response is present, but incorrect: the range `[5, 13] - [6, 21]` (0-indexed) translates to this text:
{} errors: [TestErr]
and interestingly, vscode decides to ignore that rather than navigate to the incorrect range.
Guess who just tried to report it again 😅
To reproduce:
a.smithy
:namespace test
operation HelloWorld { input := {} errors: [TestErr] }
@error("client") structure TestErr {}
[Trace - 15:28:27] Sending request 'textDocument/definition - (237)'. Params: { "textDocument": { "uri": "file:///Users/kubukoz/projects/demos/a.smithy" }, "position": { "line": 6, "character": 17 } }
[Trace - 15:28:27] Received response 'textDocument/definition - (237)' in 3ms. Result: [ { "uri": "file:/Users/kubukoz/projects/demos/a.smithy", "range": { "start": { "line": 5, "character": 13 }, "end": { "line": 6, "character": 21 } } } ]
{} errors: [TestErr]