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 · 1 comment
Labels
FeatureRequest gopls Issues related to the Go language server, gopls. Tools This label describes issues relating to any tools in the x/tools repository.
Milestone

Comments

@hyangah
Copy link
Contributor

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 Tools This label describes issues relating to any tools in the x/tools repository. gopls Issues related to the Go language server, gopls. labels Dec 22, 2021
@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 modified the milestones: Unreleased, gopls/v0.7.5 Dec 23, 2021
@findleyr findleyr modified the milestones: gopls/v0.7.5, gopls/v0.8.0 Jan 4, 2022
@findleyr findleyr self-assigned this Feb 28, 2022
@findleyr
Copy link
Contributor

findleyr commented Feb 28, 2022

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.

@findleyr findleyr modified the milestones: gopls/v0.8.0, gopls/v0.8.1 Feb 28, 2022
@findleyr findleyr modified the milestones: gopls/v0.8.1, gopls/v0.8.2 Mar 7, 2022
@findleyr findleyr modified the milestones: gopls/v0.8.4, gopls/v0.9.0 May 18, 2022
@findleyr findleyr modified the milestones: gopls/v0.9.0, gopls/later Jun 9, 2022
@findleyr findleyr removed their assignment Aug 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FeatureRequest 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

4 participants