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

Comments

@stamblerre
Copy link
Contributor

@stamblerre stamblerre 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
@muirdm

This comment has been minimized.

Copy link

@muirdm 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

This comment has been minimized.

Copy link
Contributor

@freeformz 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

This comment has been minimized.

Copy link
Contributor Author

@stamblerre stamblerre 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
@gopherbot gopherbot added the Tools label Sep 12, 2019
@stamblerre stamblerre removed the gopls-parse label Nov 7, 2019
@stamblerre stamblerre modified the milestones: Unreleased, gopls unplanned Dec 4, 2019
@gopherbot

This comment has been minimized.

Copy link

@gopherbot gopherbot commented Jan 27, 2020

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants
You can’t perform that action at this time.