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: allow to clear upgrade check diagnostics #54065

Closed
hyangah opened this issue Jul 26, 2022 · 2 comments
Closed

x/tools/gopls: allow to clear upgrade check diagnostics #54065

hyangah opened this issue Jul 26, 2022 · 2 comments
Assignees
Labels
FeatureRequest FrozenDueToAge 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

@hyangah
Copy link
Contributor

hyangah commented Jul 26, 2022

"Check for upgrades", "Upgrade transitive dependencies", "Upgrade direct dependencies" codelenses in go.mod file provide convenient ways of checking available upgrades from time to time.

Screen Shot 2022-07-26 at 10 50 40 AM

However, often times, I want to stay with the current dependencies after selectively upgrading a couple of chosen modules.
Currently there is no convenient way to hide the diagnostics produced as a result of running one of these code lenses without upgrading the modules. (except restarting the language server)

It would be nice if there is a way to clear these diagnostics.
One way to do it is to use the approach gc_details codelens uses (toggle).
Another way is to provide a separate codelens that disposes all the upgrade check diagnostics. (One concern is currently, there are too many codelenses :-))

@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 Jul 26, 2022
@gopherbot gopherbot added this to the Unreleased milestone Jul 26, 2022
@hyangah hyangah modified the milestones: Unreleased, gopls/later Jul 26, 2022
@hyangah hyangah added FeatureRequest gopls/analysis Issues related to running analysis in gopls labels Jul 26, 2022
@suzmue
Copy link
Contributor

suzmue commented Aug 15, 2022

Another alternative is to add a command to clear the upgrade check diagnostics / all of the additional diagnostics that were added (vulnerability diagnostics, upgrade information, etc): > Go: Reset go.mod Diagnostics

This command can then be run to get rid of the diagnostics, but will not take the extra space of a codelens in the go.mod file.

cc @jamalc

@suzmue suzmue self-assigned this Aug 18, 2022
@gopherbot
Copy link

Change https://go.dev/cl/426016 mentions this issue: gopls: add codelens to reset upgrade diagnostics

@findleyr findleyr modified the milestones: gopls/later, gopls/v0.10.0 Oct 20, 2022
@golang golang locked and limited conversation to collaborators Oct 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FeatureRequest FrozenDueToAge 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

4 participants