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/cmd/gopls: Modifications outside of editor ignored #32436

Closed
atombender opened this issue Jun 4, 2019 · 1 comment
Closed

x/tools/cmd/gopls: Modifications outside of editor ignored #32436

atombender opened this issue Jun 4, 2019 · 1 comment
Labels
FrozenDueToAge gopls Issues related to the Go language server, gopls.
Milestone

Comments

@atombender
Copy link

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

$ go version
go version go1.11.5 darwin/amd64

Using revision 8aaa148 of tools.

Does this issue reproduce with the latest release?

N/A

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

go env Output
$ go env
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/alex/Library/Caches/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/alex/.go"
GOPROXY=""
GORACE=""
GOROOT="/usr/local/opt/go/libexec"
GOTMPDIR=""
GOTOOLDIR="/usr/local/opt/go/libexec/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/alex/Projects/Transparensee/enclosure-core/go.mod"
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 -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/qs/wpmg19r12_9_nz7pvvs2_82r0000gn/T/go-build840369688=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?

  1. I ran a go generate command, which generates Go files. In this case, the generated code previously defined a struct with a field NeighborhoodUIDs; the generate run renamed this to NeighborhoodUids.
  2. In VSCode, I now wanted to edit other files referencing this struct in order to update all the calling code that uses this field.
  3. Gopls insists that NeighborhoodUids is incorrect and that the old name is correct.

This implies that Gopls is not correctly monitoring the files on disk. It's only taking into account the changes I make through the editor.

Screen Shot 2019-06-04 at 18 20 14

What did you expect to see?

Gopls should always reflect the current state of files on disk, not just edits made in the editor that uses Gopls.

What did you see instead?

See above.

gopls.log.zip

@gopherbot gopherbot added this to the Unreleased milestone Jun 4, 2019
@gopherbot gopherbot added the gopls Issues related to the Go language server, gopls. label Jun 4, 2019
@stamblerre
Copy link
Contributor

Thanks for the detailed report! Closing this as a duplicate of #31553

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

No branches or pull requests

3 participants