[tools/gopls-release-branch.0.22] [gopls-release-branch.0.22] gopls: deprecate importsSource and remove its use

0 views
Skip to first unread message

Gopher Robot (Gerrit)

unread,
May 11, 2026, 12:54:23 PM (11 hours ago) May 11
to Alan Donovan, Peter Weinberger, goph...@pubsubhelper.golang.org, golang-...@googlegroups.com, golang...@luci-project-accounts.iam.gserviceaccount.com, Madeline Kalil, golang-co...@googlegroups.com

Gopher Robot submitted the change

Change information

Commit message:
[gopls-release-branch.0.22] gopls: deprecate importsSource and remove its use

The experimental option importsSource is no longer needed.
It controlled the use of an index in the user's module cache to satisfy
unimported completions. This is now used by default, if the user has
a module cache. Unimported completions will fail silently if the user does
not have a module cache, as can happen with some build configurations.
(Of course users without a module cache cannot satisfy unimported completions,
Now there will be no messages about, nor attempts to build an index.)

This change removes three hundred lines of code in completions.go

Change-Id: I2183fef846da3f060cc16bd8cd5e476d041efc4c
Reviewed-on: https://go-review.googlesource.com/c/tools/+/762160
Reviewed-by: Alan Donovan <adon...@google.com>
LUCI-TryBot-Result: golang...@luci-project-accounts.iam.gserviceaccount.com <golang...@luci-project-accounts.iam.gserviceaccount.com>
(cherry picked from commit 19df82c1b29b1d2b1b79d065663fb0f34ff5232d)
Reviewed-on: https://go-review.googlesource.com/c/tools/+/776780
Auto-Submit: Alan Donovan <adon...@google.com>
Reviewed-by: Madeline Kalil <mka...@google.com>
Files:
  • M gopls/internal/cache/session.go
  • M gopls/internal/cache/source.go
  • M gopls/internal/cache/view.go
  • M gopls/internal/golang/completion/completion.go
  • M gopls/internal/golang/format.go
  • M gopls/internal/golang/rename.go
  • M gopls/internal/settings/settings.go
  • M gopls/internal/test/integration/misc/imports_test.go
  • M gopls/internal/test/marker/testdata/completion/issue59096.txt
  • M gopls/internal/test/marker/testdata/completion/issue60545.txt
  • M gopls/internal/test/marker/testdata/completion/randv2.txt
  • M gopls/internal/test/marker/testdata/completion/unimported.txt
  • M internal/imports/fix.go
  • M internal/imports/imports.go
Change size: L
Delta: 14 files changed, 107 insertions(+), 434 deletions(-)
Branch: refs/heads/gopls-release-branch.0.22
Submit Requirements:
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: gopls-release-branch.0.22
Gerrit-Change-Id: I2183fef846da3f060cc16bd8cd5e476d041efc4c
Gerrit-Change-Number: 776780
Gerrit-PatchSet: 2
Gerrit-Owner: Alan Donovan <adon...@google.com>
Gerrit-Reviewer: Alan Donovan <adon...@google.com>
Gerrit-Reviewer: Gopher Robot <go...@golang.org>
Gerrit-Reviewer: Madeline Kalil <mka...@google.com>
Gerrit-CC: Peter Weinberger <p...@google.com>
open
diffy
satisfied_requirement
Reply all
Reply to author
Forward
0 new messages