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

x/tools/gopls: completion fails on broken code #31973

Open
stamblerre opened this issue May 10, 2019 · 4 comments

Comments

Projects
None yet
5 participants
@stamblerre
Copy link
Contributor

commented May 10, 2019

Context: microsoft/vscode-go#2506

Repro case:

var x = []string{fmt.<>}

@gopherbot gopherbot added this to the Unreleased milestone May 10, 2019

@gopherbot gopherbot added the gopls label May 10, 2019

@andybons andybons added the NeedsFix label May 13, 2019

@muirrn

This comment has been minimized.

Copy link

commented Jun 1, 2019

This seems to work fine. I think the linked report didn't work because of the incomplete selector in the previous line:

fmt.
var x = []string{fmt.<>}

In this case, the second line is completely missing from the AST, so it is trickier to fix.

@freeformz

This comment has been minimized.

Copy link
Contributor

commented Jun 1, 2019

Is there a reasonable expectation that completion work if the code above the point at which completion is expected isn't syntactically correct (as is the case in the linked vscode-go issue).

@stamblerre

This comment has been minimized.

Copy link
Contributor Author

commented Jun 3, 2019

Yes, I think we want to do the most we can to get completion to work, even on broken code. I've added a gopls-parse label that we can use to mark such issues.

@stamblerre stamblerre changed the title x/tools/internal/lsp: completion fails on broken code x/tools/gopls: completion fails on broken code Jul 2, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.