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: change behavior of dependency upgrade suggestions #38339

Open
stamblerre opened this issue Apr 9, 2020 · 4 comments
Open

x/tools/gopls: change behavior of dependency upgrade suggestions #38339

stamblerre opened this issue Apr 9, 2020 · 4 comments

Comments

@stamblerre
Copy link
Contributor

@stamblerre stamblerre commented Apr 9, 2020

Some users have mentioned that the upgrade code lenses are a little invasive because they are shown per-line. Here are some general thoughts / ideas for how to handle this:

  • Don't show upgrades for pseudoversions? Or only for pseudoversions older than some amount of time (1 month? more?).
  • Offer upgrades as code actions instead of code lenses. The "upgrade all" could still be a code lens, but this way we could offer more granular updates. Someone may not want to update to a new major version, but they may want to update to a new minor or patch release - code actions give more options.
@stamblerre stamblerre added this to the gopls/v0.5.0 milestone Apr 9, 2020
@hyangah
Copy link
Contributor

@hyangah hyangah commented Apr 10, 2020

Or is there any way to disable some of the code lenses?
As we add more code lenses, we will have more diverse opinions about them.

@stamblerre
Copy link
Contributor Author

@stamblerre stamblerre commented Apr 10, 2020

Or is there any way to disable some of the code lenses?

There is a "editor.codeLens" setting, but I don't think you can configure it per-code lens.

@stamblerre
Copy link
Contributor Author

@stamblerre stamblerre commented Sep 9, 2020

We now have per-code lens configuration.

While I would like to eventually make improvements to the behavior of the upgrade code lenses, I don't think it's necessary for v1.0.

@stamblerre stamblerre removed this from the gopls/v1.0.0 milestone Sep 9, 2020
@stamblerre stamblerre added this to the gopls/unplanned milestone Oct 21, 2020
@stamblerre
Copy link
Contributor Author

@stamblerre stamblerre commented Nov 19, 2020

https://golang.org/cl/271297 removed the per-require upgrade code lenses, so we should prioritize adding the upgrades as diagnostics paired with suggested fixes. I think they should be treated similarly to how fillstruct works in Go files--we don't want to use a visible underlined diagnostic since it may bother the user visually (if they specifically chose a lower version), but when they click on the require, they should be prompted to upgrade it.

/cc @heschik

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.