[tools] gopls/internal/server: don't pop up errors when resolving code actions

1 view
Skip to first unread message

Robert Findley (Gerrit)

unread,
Nov 11, 2025, 9:25:16 AM (yesterday) Nov 11
to goph...@pubsubhelper.golang.org, golang-...@googlegroups.com, Alan Donovan, Go LUCI, golang-co...@googlegroups.com

Robert Findley submitted the change

Change information

Commit message:
gopls/internal/server: don't pop up errors when resolving code actions

When codeAction/resolve fails to resolve edits, don't fail the resolve
operation: instead, simply return the codeaction (with its Command set),
and let the action fail when the client invokes the command.

This may result in redundant work, but avoids pop-ups on clients that
eagerly resolve the code actions (golang/go#75442).

Fixes golang/go#75442
Change-Id: I33df382dbbe02cd33aefdebe6bcb9102dd3deb3c
Reviewed-by: Alan Donovan <adon...@google.com>
Files:
  • M gopls/internal/server/code_action.go
  • M gopls/internal/test/integration/fake/editor.go
  • M gopls/internal/test/marker/doc.go
  • M gopls/internal/test/marker/marker_test.go
  • A gopls/internal/test/marker/testdata/codeaction/failedresolve.txt
Change size: M
Delta: 5 files changed, 188 insertions(+), 46 deletions(-)
Branch: refs/heads/master
Submit Requirements:
  • requirement satisfiedCode-Review: +2 by Alan Donovan
  • requirement satisfiedTryBots-Pass: LUCI-TryBot-Result+1 by Go LUCI
Open in Gerrit
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: merged
Gerrit-Project: tools
Gerrit-Branch: master
Gerrit-Change-Id: I33df382dbbe02cd33aefdebe6bcb9102dd3deb3c
Gerrit-Change-Number: 704736
Gerrit-PatchSet: 6
Gerrit-Owner: Robert Findley <rfin...@google.com>
Gerrit-Reviewer: Alan Donovan <adon...@google.com>
Gerrit-Reviewer: Robert Findley <rfin...@google.com>
open
diffy
satisfied_requirement
Reply all
Reply to author
Forward
0 new messages