Skip to content

x/tools/gopls: add a test for renaming a directory (that contains tests) #41349

Open
@aarongable

Description

@aarongable

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

$ go version
go version go1.15.2 linux/amd64
$ gopls version
version master, built in $GOPATH mode

Does this issue reproduce with the latest release?

Yes, this is the latest release.

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

go env Output
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/aaron/.cache/go-build"
GOENV="/home/aaron/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/home/aaron/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/aaron/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/home/aaron/Code/boulder/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 -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build588592972=/tmp/go-build -gno-record-gcc-switches"

What did you do?

Install the "go" vscode extension. Use it to install gopls. Everything works as expected for a while.

In my project, rename a directory from "signer" to "issuance" (letsencrypt/boulder#5085).

What did you expect to see?

Everything continuing to wok as before.

What did you see instead?

Now the extension constantly pops up messages saying:

The code in the workspace failed to compile (see the error message below). If you believe this is a mistake, please file an issue: https://github.com/golang/go/issues/new. github.com/letsencrypt/boulder/signer [github.com/letsencrypt/boulder/signer.test] has no metadata

Screenshot from 2020-09-11 13-08-12

It makes sense that signer.test has no metadata, it doesn't exist anymore. I just haven't been able to convince gopls of that fact.

Metadata

Metadata

Assignees

No one assigned

    Labels

    NeedsFixThe path to resolution is known, but the work has not been done.TestingAn issue that has been verified to require only test changes, not just a test failure.ToolsThis label describes issues relating to any tools in the x/tools repository.goplsIssues related to the Go language server, gopls.gopls/workspaceIssues related to support for modules or multi-module workspaces.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions