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: changing build tags does not take effect without restarting the server #43432

Closed
hyangah opened this issue Dec 30, 2020 · 2 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.
Milestone

Comments

@hyangah
Copy link
Contributor

hyangah commented Dec 30, 2020

gopls version v0.6.1
go version 1.15.6

How to repro

Open a folder with the following two go files

$ cat main.go
package main

func main() {
        F()
}
$ cat tag.go
//+build tag1

package main

func F() {}

Gopls correctly shows the issue in both main.go and tag.go as expected.

Screen Shot 2020-12-30 at 10 16 13 AM

Now, remove //+build tag1 from tag.go and save.
The old diagnostic message in main.go lingers.

Screen Shot 2020-12-30 at 10 16 44 AM

What's more puzzling is:
When adding back //+build tag1, all the diagnostics disappear.

Screen Shot 2020-12-30 at 10 20 34 AM

@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 Dec 30, 2020
@gopherbot gopherbot added this to the Unreleased milestone Dec 30, 2020
@stamblerre
Copy link
Contributor

This seems like at least a partial duplicate of #38732.

@hyangah
Copy link
Contributor Author

hyangah commented Dec 30, 2020

Hah! I filed the same issue. Feel free to close one of them. :-)

@golang golang locked and limited conversation to collaborators Dec 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.
Projects
None yet
Development

No branches or pull requests

3 participants