Skip to content

x/tools/gopls: add StubMethods as a quick-fix for missing method diagnostics #51478

Closed
@findleyr

Description

@findleyr

Reminder issue: right now StubMethods is available as a code-action when there are missing methods. For discoverability it should also be available as a quick-fix for the go/types error.

Activity

added this to the gopls/v0.8.1 milestone on Mar 4, 2022
added
ToolsThis label describes issues relating to any tools in the x/tools repository.
goplsIssues related to the Go language server, gopls.
on Mar 4, 2022
self-assigned this
on May 3, 2022
findleyr

findleyr commented on May 9, 2022

@findleyr
MemberAuthor

Hmm, I think fixing this requires some deeper digging / refactoring of how type error analysis works. It seems like we have some error analyzers that show up as code lenses, and others that are supposed to be quick fixes that don't actually function as such:

E.g. if I have

var x intx := 1

We're supposed to suggest a quick fix changing the last statement to x = 1 (the nonewvars analyzer), but AFAICT this simply doesn't work.

Bumping out of the milestone, as this appears to be a larger project than expected.

added
FeatureRequestIssues asking for a new feature that does not need a proposal.
on May 10, 2022

10 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

FeatureRequestIssues asking for a new feature that does not need a proposal.FrozenDueToAgeToolsThis label describes issues relating to any tools in the x/tools repository.goplsIssues related to the Go language server, gopls.gopls/analysisIssues related to running analysis in gopls

Type

No type

Projects

No projects

Relationships

None yet

    Development

    No branches or pull requests

      Participants

      @hyangah@gopherbot@findleyr

      Issue actions

        x/tools/gopls: add StubMethods as a quick-fix for missing method diagnostics · Issue #51478 · golang/go