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: a replacement for guru's whicherrs #63574

Closed
danp opened this issue Oct 16, 2023 · 2 comments
Closed

x/tools/gopls: a replacement for guru's whicherrs #63574

danp opened this issue Oct 16, 2023 · 2 comments
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.

Comments

@danp
Copy link
Contributor

danp commented Oct 16, 2023

The guru command used to have a whicherrs query that:

reports the set of possible constants, global variables, and concrete types that may appear in a value of type error.

In our work projects we try and follow the Whether to wrap section of the Working with Errors in Go 1.13 blog post. We have some legacy code that we've had to convert to wrapping unconditionally and something like whicherrs would greatly help us understand where it's safe to stop doing that.

@danp danp added gopls Issues related to the Go language server, gopls. Tools This label describes issues relating to any tools in the x/tools repository. labels Oct 16, 2023
@gopherbot gopherbot added this to the Unreleased milestone Oct 16, 2023
@findleyr
Copy link
Contributor

Thanks for filing. @adonovan has also recently lamented the loss of some guru features.

It would be fun to have a mini project to reimplement some of these features in the LSP. Perhaps a good candidate for an upcoming team code jam.

@adonovan
Copy link
Member

Clever though it was, whicherrs was one of many features of guru that relied on pointer analysis, which we made the decision to stop supporting because of the inherent problems of that technology described in #59676. So I don't think this is a feature of guru that anyone should attempt to bring back, at least not using its previous approach.

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