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: go mod tidy diagnostic fails with tags in buildFlags #41803

Closed
ian-mi opened this issue Oct 5, 2020 · 2 comments
Closed

x/tools/gopls: go mod tidy diagnostic fails with tags in buildFlags #41803

ian-mi opened this issue Oct 5, 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

@ian-mi
Copy link

ian-mi commented Oct 5, 2020

What version of Go are you using (go version)?

$ go version
go version go1.15 linux/amd64

Does this issue reproduce with the latest release?

Yes

What did you do?

Loaded package in gopls

What did you expect to see?

No errors

What did you see instead?

2020/10/05 20:41:16 warning: diagnose go.mod: err: exit status 2: stderr: flag provided but not defined: -tags
usage: go mod tidy [-v]
Run 'go help mod tidy' for details.

@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 Oct 5, 2020
@gopherbot gopherbot added this to the Unreleased milestone Oct 5, 2020
@stamblerre stamblerre modified the milestones: Unreleased, gopls/v0.5.2 Oct 6, 2020
@ian-mi
Copy link
Author

ian-mi commented Oct 6, 2020

I also see a similar error running go version when opening a workspace:

LSP :: Error loading workspace folders (expected 1, got 1)
failed to load view for file:///...: err: exit status 2: stderr: flag provided but not defined: -tags
usage: go version [-m] [-v] [file ...]
Run 'go help version' for details.

@stamblerre stamblerre self-assigned this Oct 6, 2020
@gopherbot
Copy link

Change https://golang.org/cl/260000 mentions this issue: internal/lsp: don't pass build flags to go mod commands

@golang golang locked and limited conversation to collaborators Oct 8, 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