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: consider merging "missing go.sum entries" errors with the same root cause #50320

Open
hyangah opened this issue Dec 22, 2021 · 0 comments

Comments

@hyangah
Copy link
Contributor

@hyangah hyangah commented Dec 22, 2021

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?

  • go get a module from VS Code integrated terminal
  • start to use it from the code
  • run hover over diagnostics

What did you expect to see?

  • one diagnostic message about incomplete go.sum and one quick fix for it.

What did you see instead?

  • multiple, duplicate diagnostics and indistinguishable quick fix entries
duplicatediagnostics.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

@gopherbot gopherbot added this to the Unreleased milestone Dec 22, 2021
@hyangah hyangah changed the title x/tools/gopls: duplicate "missing go.sum entries" error messages x/tools/gopls: consider merging "missing go.sum entries" errors with the same root cause Dec 22, 2021
@findleyr findleyr removed this from the Unreleased milestone Dec 23, 2021
@findleyr findleyr added this to the gopls/v0.7.5 milestone Dec 23, 2021
@findleyr findleyr removed this from the gopls/v0.7.5 milestone Jan 4, 2022
@findleyr findleyr added this to the gopls/v0.8.0 milestone Jan 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants