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: too verbose message in diagnostic for go.mod #41462

Closed
leitzler opened this issue Sep 17, 2020 · 1 comment
Closed

x/tools/gopls: too verbose message in diagnostic for go.mod #41462

leitzler opened this issue Sep 17, 2020 · 1 comment
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

@leitzler
Copy link
Contributor

What version of Go are you using (go version)?

$ go version
go version devel +93810ac Thu Sep 3 22:08:58 2020 +0000 darwin/amd64

golang.org/x/tools v0.0.0-20200916122506-6ec2cde9631b
golang.org/x/tools/gopls v0.0.0-20200916122506-6ec2cde9631b

What did you do?

With tempmod enabled I opened up a go file in github.com/govim/govim and added a new import, github.com/moby/moby/api (to intentionally introduce an error).

What did you expect to see?

A less noisy diagnostic message.

As per Slack conversation with Heschi it looks like the error is parsed but the relevant text isn't extracted.

What did you see instead?

A super long and verbose message:

PublishDiagnostics callback: &protocol.PublishDiagnosticsParams{
    URI:         "file:///Users/leitzler/proj/govim/go.mod",
    Version:     8,
    Diagnostics: {
        {
            Range: protocol.Range{
                Start: protocol.Position{},
                End:   protocol.Position{Line:0, Character:29},
            },
            Severity:           1,
            Code:               nil,
            Source:             "",
            Message:            "go [-e -json -compiled=true -test=true -export=false -deps=true -find=false -mod=mod -modfile=/var/folders/j4/l2j99h6d5qd6knjlllql0bb80000gn/T/go.0535739845085bcd81322001a4009bf7933c87445ac818639dc283b06ce34f90.635768216.mod -- github.com/moby/moby/api]: exit status 1: go: finding module for package github.com/moby/moby/api\ngo: found github.com/moby/moby/api in github.com/moby/moby v1.13.1\ngo: finding module for package github.com/docker/docker/api/types\ngo: finding module for package github.com/docker/docker/pkg/ioutils\ngo: finding module for package github.com/Sirupsen/logrus\ngo: finding module for package github.com/docker/docker/pkg/system\ngo: finding module for package github.com/docker/libtrust\ngo: found github.com/Sirupsen/logrus in github.com/Sirupsen/logrus v1.6.0\ngo: found github.com/docker/docker/api/types in github.com/docker/docker v1.13.1\ngo: found github.com/docker/docker/pkg/ioutils in github.com/docker/docker v1.13.1\ngo: found github.com/docker/docker/pkg/system in github.com/docker/docker v1.13.1\ngo: found github.com/docker/libtrust in github.com/docker/libtrust v0.0.0-20160708172513-aabc10ec26b7\ngo: github.com/moby/moby/api imports\n\tgithub.com/Sirupsen/logrus: github.com/Sirupsen/logrus@v1.6.0: parsing go.mod:\n\tmodule declares its path as: github.com/sirupsen/logrus\n\t        but was required as: github.com/Sirupsen/logrus\n: packages.Load error",
            Tags:               nil,
            RelatedInformation: nil,
        },
    },
}
@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 17, 2020
@gopherbot gopherbot added this to the Unreleased milestone Sep 17, 2020
@stamblerre stamblerre modified the milestones: Unreleased, gopls/v1.0.0 Sep 17, 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
@stamblerre
Copy link
Contributor

Going to close this in favor of #42530, since that is the umbrella tracking issue for this general class of problems.

vscode-go: gopls by default automation moved this from Critical to Done Nov 12, 2020
@stamblerre stamblerre removed this from the gopls/vscode-go milestone Nov 12, 2020
@golang golang locked and limited conversation to collaborators Nov 12, 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

3 participants