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

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

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

stamblerre opened this issue May 10, 2019 · 4 comments
Labels
FrozenDueToAge gopls Issues related to the Go language server, gopls. NeedsFix The path to resolution is known, but the work has not been done. Tools This label describes issues relating to any tools in the x/tools repository.

Comments

@stamblerre
Copy link
Contributor

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 Issues related to the Go language server, gopls. label May 10, 2019
@andybons andybons added the NeedsFix The path to resolution is known, but the work has not been done. label May 13, 2019
@muirdm
Copy link

muirdm 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
Copy link

freeformz 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
Copy link
Contributor Author

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
@gopherbot gopherbot added the Tools This label describes issues relating to any tools in the x/tools repository. label Sep 12, 2019
@stamblerre stamblerre modified the milestones: Unreleased, gopls unplanned Dec 4, 2019
@gopherbot
Copy link

Change https://golang.org/cl/216484 mentions this issue: internal/lsp/cache: improve completion after dangling selector

@stamblerre stamblerre modified the milestones: gopls unplanned, gopls completion Jan 29, 2020
@golang golang locked and limited conversation to collaborators Feb 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge gopls Issues related to the Go language server, gopls. NeedsFix The path to resolution is known, but the work has not been done. Tools This label describes issues relating to any tools in the x/tools repository.
Projects
None yet
Development

No branches or pull requests

6 participants
@freeformz @andybons @stamblerre @gopherbot @muirdm and others