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: add StubMethods as a quick-fix for missing method diagnostics #51478

Closed
findleyr opened this issue Mar 4, 2022 · 2 comments
Closed
Assignees
Labels
FeatureRequest gopls/analysis Issues related to running analysis in gopls 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

@findleyr
Copy link
Contributor

findleyr commented Mar 4, 2022

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.

@findleyr findleyr added this to the gopls/v0.8.1 milestone Mar 4, 2022
@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 Mar 4, 2022
@findleyr findleyr modified the milestones: gopls/v0.8.1, gopls/v0.8.2 Mar 14, 2022
@findleyr findleyr self-assigned this May 3, 2022
@findleyr
Copy link
Contributor Author

findleyr commented May 9, 2022

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.

@findleyr findleyr modified the milestones: gopls/v0.8.4, gopls/on-deck May 9, 2022
@findleyr findleyr added the gopls/analysis Issues related to running analysis in gopls label Aug 9, 2022
@findleyr findleyr removed their assignment Aug 9, 2022
@findleyr findleyr self-assigned this Jul 24, 2023
@findleyr findleyr modified the milestones: gopls/later, gopls/v0.12.5 Jul 24, 2023
@gopherbot
Copy link

Change https://go.dev/cl/511995 mentions this issue: gopls/internal/lsp: don't recompute diagnostics during code actions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FeatureRequest gopls/analysis Issues related to running analysis in gopls 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