golang / go

The Go programming language
https://go.dev
BSD 3-Clause "New" or "Revised" License
123.91k stars 17.65k forks source link

x/tools/gopls: consider merging "missing go.sum entries" errors with the same root cause #50320

Open hyangah opened 2 years ago

hyangah commented 2 years ago

gopls version

%  go version -m ~/go/bin/gopls
/Users/hakim/go/bin/gopls: go1.17.5
        path    golang.org/x/tools/gopls
        mod     golang.org/x/tools/gopls        v0.7.4  h1:hw8cpqjio1iMwIKbbDkG3MeW4l8R9dY/yqOHqv7HImA=
        dep     github.com/BurntSushi/toml      v0.4.1  h1:GaI7EiDXDRfa8VshkTj7Fym7ha+y8/XxIgD2okUIjLw=
        dep     github.com/google/go-cmp        v0.5.6  h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ=
        dep     github.com/sergi/go-diff        v1.1.0  h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0=
        dep     golang.org/x/mod        v0.5.1  h1:OJxoQ/rynoF0dcCdI7cLPktw/hR2cueqYfjm43oqK38=
        dep     golang.org/x/sync       v0.0.0-20210220032951-036812b2e83c      h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ=
        dep     golang.org/x/sys        v0.0.0-20211019181941-9d821ace8654      h1:id054HUawV2/6IGm2IV8KZQjqtwAOo2CYlOToYqa0d0=
        dep     golang.org/x/text       v0.3.7  h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk=
        dep     golang.org/x/tools      v0.1.9-0.20211209172050-90a85b2969be    h1:JRBiPXZpZ1FsceyPRRme0vX394zXC3xlhqu705k9nzM=
        dep     golang.org/x/xerrors    v0.0.0-20200804184101-5ec99f83aff1      h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
        dep     honnef.co/go/tools      v0.2.1  h1:/EPr//+UMMXwMTkXvCCoaJDq8cpjMO80Ou+L4PDo2mY=
        dep     mvdan.cc/gofumpt        v0.1.1  h1:bi/1aS/5W00E2ny5q65w9SnKpWEF/UIOqDYBILpo9rA=
        dep     mvdan.cc/xurls/v2       v2.3.0  h1:59Olnbt67UKpxF1EwVBopJvkSUBmgtb468E4GVWIZ1I=

go env

%  go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/hakim/Library/Caches/go-build"
GOENV="/Users/hakim/Library/Application Support/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOINSECURE=""
GOMODCACHE="/Users/hakim/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/hakim/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/Cellar/go/1.17.5/libexec"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/Cellar/go/1.17.5/libexec/pkg/tool/darwin_amd64"
GOVCS=""
GOVERSION="go1.17.5"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/hakim/ww/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 -arch x86_64 -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/bw/6r6k9d113sv1_vvzk_1kfxbm001py5/T/go-build3137589959=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?

What did you expect to see?

What did you see instead?

https://user-images.githubusercontent.com/4999471/147162506-9a82330b-a032-4914-b72d-fe65b2b3ec05.mp4

Actually, they are not duplicates - each of which is reporting an error for a different package. So, I think this is working as intended technically speaking. I wonder if there is a way to improve presentation if they all share the same quickfix.

Editor and settings

    "gopls": {
        "ui.semanticTokens": false,
        "build.experimentalWorkspaceModule": false
    }

Logs

gopls.log

findleyr commented 2 years ago

I've started working on this, which is why I've been so reluctant to bump it to the v0.8.1 milestone...

But it's not going to make v0.8.0, and is not critical for Go 1.18. Moving to v0.8.1.