[LS] Imported contract symbols not resolving properly
jribbink opened this issue · 1 comments
Instructions
Problem
There seems to be some sort of issue resolving imported symbols. This appeared in onflow/vscode-cadence#312 when we updated vscode-langaugeclient from 8.0.2 to 8.1.0 - we have since downgraded to prevent this error message.
I think what happened was not that this actually created any new issue, but rather that vscode just was not displaying the error prior (see microsoft/vscode-languageserver-node@55eb8e3).
I did some logging in order to debug this. Below is the output of the textDocument/documentSymbol
response for the FlowToken contract.
Notice how we have a symbol with no name (which is forbidden in LSP). This is the import symbol and we need to assign it a name.
Steps to Reproduce
Try to update vscode-languageclient in vscode-cadence and use the extension on a file with one or more imports. It will begin to throw the error.