Skip to content

x/tools/gopls: empty title for go mod tidy suggested fix #43234

@zhaytee

Description

@zhaytee

What version of Go, VS Code & VS Code Go extension are you using?

go version: go1.14.9 linux/amd64
gopls version: golang.org/x/tools/gopls v0.6.0
vscode version: 1.52.1 (commit ea3859d4ba2f3e577a159bc91e3074c5d85c0523)
vscode-go version: 0.19.1

Checking configured tools....
GOBIN: undefined
toolsGopath: 
gopath: /home/zhaytee/go
GOROOT: /usr/local/go
PATH: /usr/local/go/bin:/home/zhaytee/.vscode-server/bin/ea3859d4ba2f3e577a159bc91e3074c5d85c0523/bin:/home/zhaytee/.nvm/versions/node/v12.18.4/bin:/home/zhaytee/.vscode-server/bin/ea3859d4ba2f3e577a159bc91e3074c5d85c0523/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/zhaytee/go/bin:/home/zhaytee/.local/bin

   gocode: gocode not installed
   gopkgs: gopkgs not installed
   go-outline: go-outline not installed
   go-symbols: go-symbols not installed
   guru: guru not installed
   gorename: gorename not installed
   gotests: gotests not installed
   gomodifytags: gomodifytags not installed
   impl: impl not installed
   fillstruct: fillstruct not installed
   goplay: goplay not installed
   godoctor: godoctor not installed
   dlv: dlv not installed
   gocode-gomod: gocode-gomod not installed
   godef: godef not installed
   goreturns: goreturns not installed
   golint: golint not installed
   gopls: /home/zhaytee/go/bin/gopls installed

go env
Workspace Folder (api): /home/zhaytee/Development/platform/api
	GO111MODULE=""
	GOARCH="amd64"
	GOBIN=""
	GOCACHE="/home/zhaytee/.cache/go-build"
	GOENV="/home/zhaytee/.config/go/env"
	GOEXE=""
	GOFLAGS=""
	GOHOSTARCH="amd64"
	GOHOSTOS="linux"
	GOINSECURE=""
	GONOPROXY=""
	GONOSUMDB=""
	GOOS="linux"
	GOPATH="/home/zhaytee/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=""
	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-build361984029=/tmp/go-build -gno-record-gcc-switches"

Share the Go related settings you have added/edited

{
    "go.autocompleteUnimportedPackages": true,
    "gopls": {
        "usePlaceholders": false,
        "staticcheck": false
    },
    "go.languageServerExperimentalFeatures": {
        "diagnostics": true
    },
    "[go.mod]": {
        "editor.formatOnSave": true,
        "editor.codeActionsOnSave": {
            "source.organizeImports": true,
        },
    },
    "[go]": {
        "editor.formatOnSave": true,
        "editor.codeActionsOnSave": {
            "source.organizeImports": true,
        },
        "editor.snippetSuggestions": "none",
    }
}

Describe the bug

VSCode is running on macOS, vscode-go is running on linux/amd64 (I'm using the remote-ssh extension).

I just upgraded to gopls 0.60. Now vscode is yelling at me about the workspace needing go.mod changes, presumably due to the -mod=readonly change introduced to gopls 0.60. The status bar reads "Error loading workspace", and has a permanent spinner.

I'm not aware of anything I can do configuration-wise to solve this problem, so I think this might count as a bug. Not entirely sure.

Error loading workspace: go [-e -json -compiled=true -test=true -export=false -deps=true -find=false -- builtin github.com/myorg/platform/api/compiled/go/...]: exit status 1: go: updates to go.mod needed, disabled by -mod=readonly

Any help would be appreciated. Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeToolsThis label describes issues relating to any tools in the x/tools repository.goplsIssues related to the Go language server, gopls.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions