microsoft / vscode-powerquery

Visual Studio Code extension for Power Query / M.
MIT License
88 stars 16 forks source link

Quoted Identifier error: hover failed with message: InvariantError: should never be reached #65

Closed ninmonkey closed 3 years ago

ninmonkey commented 4 years ago

Description

Hovering over function signatures has an error when the identifier is not correct.

Expected Behavior

image

Actual Behavior

It doesn't silently log like other errors. You get a popup: image

[Trace - 5:12:28 PM] Received response 'textDocument/hover - (40)' in 0ms. Request failed: Request textDocument/hover failed with message: InvariantError: should never be reached (-32603).
[Error - 5:12:28 PM] Request textDocument/hover failed.
  Message: Request textDocument/hover failed with message: InvariantError: should never be reached
  Code: -32603 

Steps to reproduce

Create a new file, then hover over the Numbers function.

let
   #"Stuff" = List.Numbers(1, 1, 1)
in
    #"Stuff

Fix

Close the quote on the final identifier.

let
   #"Stuff" = List.Numbers(1, 1, 1)
in
    #"Stuff"

error log - short.log

mattmasson commented 3 years ago

This seems to be fixed with #68