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/internal/lsp: support (or ignore) build tags #31286

Closed
diegs opened this issue Apr 5, 2019 · 1 comment
Closed

x/tools/internal/lsp: support (or ignore) build tags #31286

diegs opened this issue Apr 5, 2019 · 1 comment

Comments

@diegs
Copy link

diegs commented Apr 5, 2019

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

$ go version
go version go1.12 linux/amd64

Does this issue reproduce with the latest release?

Yes

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/diegs/.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/diegs"
GOPROXY=""
GORACE=""
GOROOT="/usr/local/go"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build320516596=/tmp/go-build -gno-record-gcc-switches"

What did you do?

Installed latest gopls. Set it up with vim-ale. Works great!

Opened a (test) file that has the following build tag at the top:

// build +integration

What did you expect to see?

Completions and diagnostics in that file.

What did you see instead?

No completions or diagnostics in that file. If I remove the build tag, I start getting diagnostics. Oddly enough, if I add the tag back, I still get diagnostics. Perhaps there's some caching happening then?

It would be great to have completion and diagnostics for every file I'm editing. I imagine this might be difficult for arch tags and such, but it would be good to customize this. For example, golangci-lint lets you set build tags to pass when running it.

@gopherbot gopherbot added this to the Unreleased milestone Apr 5, 2019
@agnivade
Copy link
Contributor

agnivade commented Apr 5, 2019

Duplicate of #29202.

@agnivade agnivade closed this as completed Apr 5, 2019
@golang golang locked and limited conversation to collaborators Apr 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants