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

hyangah opened this issue Dec 30, 2020 · 2 comments


Copy link

@hyangah 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() {
$ 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 this to the Unreleased milestone Dec 30, 2020
Copy link

@stamblerre stamblerre commented Dec 30, 2020

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

Copy link
Contributor Author

@hyangah hyangah commented Dec 30, 2020

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

@stamblerre stamblerre closed this Dec 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants