Skip to content

x/tools/gopls: incorrectly tokenized import statements #42831

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

Closed
stamblerre opened this issue Nov 25, 2020 · 5 comments
Closed

x/tools/gopls: incorrectly tokenized import statements #42831

stamblerre opened this issue Nov 25, 2020 · 5 comments
Labels
FrozenDueToAge gopls Issues related to the Go language server, gopls. Tools This label describes issues relating to any tools in the x/tools repository. WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.

Comments

@stamblerre
Copy link
Contributor

Screen Shot 2020-11-25 at 11 50 37 AM

See the colors in this block:

import (
    "fmt"
    "os"
)

The entirety of "fmt" and the closing quote of "os" are tokenized as strings, and "os is tokenized as a namespace. My guess is that there's something off about the positions.

/cc @pjweinb

@stamblerre stamblerre added this to the gopls/unplanned milestone Nov 25, 2020
@gopherbot gopherbot added Tools This label describes issues relating to any tools in the x/tools repository. gopls Issues related to the Go language server, gopls. labels Nov 25, 2020
@stamblerre stamblerre added the NeedsFix The path to resolution is known, but the work has not been done. label Nov 25, 2020
@pjweinb
Copy link

pjweinb commented Nov 25, 2020 via email

@pjweinb
Copy link

pjweinb commented Nov 25, 2020 via email

@pjweinb
Copy link

pjweinb commented Nov 25, 2020 via email

@pjweinb
Copy link

pjweinb commented Nov 26, 2020

hmm, lost the colors. But in your block, I don't think semantic tokens is on. With semantic tokens, fmt and Println would have different types and different colors. (As would os and Exit)
Screen Shot 2020-11-26 at 07 58 18

@pjweinb pjweinb added WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. and removed NeedsFix The path to resolution is known, but the work has not been done. labels Nov 26, 2020
@stamblerre
Copy link
Contributor Author

I thought semantic tokens was on, but you're right, I can no longer reproduce.

@stamblerre stamblerre removed this from the gopls/unplanned milestone Nov 30, 2020
@golang golang locked and limited conversation to collaborators Nov 30, 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. Tools This label describes issues relating to any tools in the x/tools repository. WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Projects
None yet
Development

No branches or pull requests

3 participants