Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[LS] Imported contract symbols not resolving properly #125

Closed
jribbink opened this issue May 24, 2023 · 1 comment · Fixed by #127
Closed

[LS] Imported contract symbols not resolving properly #125

jribbink opened this issue May 24, 2023 · 1 comment · Fixed by #127
Labels
Bug The issue represents a bug, malfunction, regression Feedback

Comments

@jribbink
Copy link
Contributor

jribbink commented May 24, 2023

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.

image

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.

@jribbink jribbink added Bug The issue represents a bug, malfunction, regression Feedback labels May 24, 2023
@jribbink
Copy link
Contributor Author

I'm not sure if this is related to #97, but it might be.

@jribbink jribbink changed the title Imported contract symbols not resolving properly [LS] Imported contract symbols not resolving properly May 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug The issue represents a bug, malfunction, regression Feedback
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant