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: editing go.mod breaks workspace load #41615

Open
seankhliao opened this issue Sep 24, 2020 · 1 comment
Open

x/tools/gopls: editing go.mod breaks workspace load #41615

seankhliao opened this issue Sep 24, 2020 · 1 comment
Labels
Milestone

Comments

@seankhliao
Copy link
Contributor

@seankhliao seankhliao commented Sep 24, 2020

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

$ go version
go version go1.15.2 linux/amd64
$ gopls version
golang.org/x/tools/gopls v0.5.0
    golang.org/x/tools/gopls@v0.5.0 h1:XEmO9RylgmaXp33iGrWfCGopVYDGBmLy+KmsIsfIo8Y=

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
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/arccy/.cache/go-build"
GOENV="/home/arccy/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/home/arccy/data/xdg/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/arccy/data/xdg/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/home/arccy/sdk/go1.15.2"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/home/arccy/sdk/go1.15.2/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/home/arccy/testrepo-161/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-build069944845=/tmp/go-build -gno-record-gcc-switches"

What did you do?

  1. go mod init x
  2. open go.mod in editor (neovim + coc.nvim)
  3. try to type anything

What did you expect to see?

no error messages while I type

What did you see instead?

2020-09-24-192555

Apparently due to the broken state of go.mod while editing breaking gopls's ability to load workspace information. Continuing to type works except when typing a space where it is interpreted to dismiss the error message first, though I think that's (neo)vim specific behaviour.

@gopherbot gopherbot added this to the Unreleased milestone Sep 24, 2020
@myitcv
Copy link
Member

@myitcv myitcv commented Sep 24, 2020

I also ran into a variant of this whilst resolving merge conflicts in a go.mod file.

@stamblerre stamblerre modified the milestones: Unreleased, gopls/v1.0.0 Sep 24, 2020
@stamblerre stamblerre added this to Bugs in gopls/v1.0.0 Sep 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.