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

Closed
seankhliao opened this issue Sep 24, 2020 · 3 comments
Closed

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

seankhliao opened this issue Sep 24, 2020 · 3 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.

Comments

@seankhliao
Copy link
Member

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 Tools This label describes issues relating to any tools in the x/tools repository. gopls Issues related to the Go language server, gopls. labels Sep 24, 2020
@gopherbot gopherbot added this to the Unreleased milestone Sep 24, 2020
@myitcv
Copy link
Member

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 Needs Triage in vscode-go: gopls by default Nov 10, 2020
@stamblerre stamblerre moved this from Needs Triage to Critical in vscode-go: gopls by default Nov 10, 2020
@findleyr findleyr self-assigned this Nov 11, 2020
@stamblerre stamblerre assigned stamblerre and unassigned findleyr Dec 7, 2020
@stamblerre stamblerre moved this from Critical to Needs Triage in vscode-go: gopls by default Dec 16, 2020
@stamblerre stamblerre removed this from Needs Triage in vscode-go: gopls by default Dec 23, 2020
@stamblerre
Copy link
Contributor

Duplicate of #42266

@stamblerre stamblerre marked this as a duplicate of #42266 Dec 23, 2020
@stamblerre
Copy link
Contributor

Closing this, as #42266 will resolve this issue.

@stamblerre stamblerre removed this from the gopls/v1.0.0 milestone Dec 26, 2020
@golang golang locked and limited conversation to collaborators Dec 26, 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

5 participants