Skip to content

Commit 3735585

Browse files
findleyrgopherbot
authored andcommitted
gopls/internal/settings: deprecate "allowImplicitNetworkAccess"
This setting changes the behavior of gopls in fundamental low-level ways, and therefore is severely under-tested and now worth maintaining. Gopls should make accurate decisions about whether to allow network access for commands. Fixes golang/go#66860 Change-Id: Ia2f58bf146fc6bd37d769b65fc227cb2d0027032 Reviewed-on: https://go-review.googlesource.com/c/tools/+/579437 Reviewed-by: Alan Donovan <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> Auto-Submit: Robert Findley <[email protected]>
1 parent f4888c5 commit 3735585

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

gopls/doc/release/v0.16.0.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ go install golang.org/x/tools/[email protected]
1010
that if your LSP client is able and configured to request semantic tokens,
1111
gopls will provide them. The default was previously false because VS Code
1212
historically provided no client-side way for users to disable the feature.
13+
- The experimental "allowImplicitNetworkAccess" setting is deprecated (but not
14+
yet removed). Please comment on https://go.dev/issue/66861 if you use this
15+
setting and would be impacted by its removal.
1316

1417
## New features
1518

gopls/internal/settings/settings.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -985,6 +985,7 @@ func (o *Options) set(name string, value interface{}, seen map[string]struct{})
985985
result.deprecated("")
986986

987987
case "allowImplicitNetworkAccess":
988+
result.softErrorf("gopls setting \"allowImplicitNetworkAccess\" is deprecated.\nPlease comment on https://go.dev/issue/66861 if this impacts your workflow.")
988989
result.setBool(&o.AllowImplicitNetworkAccess)
989990

990991
case "experimentalUseInvalidMetadata":

gopls/internal/test/integration/misc/configuration_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,7 @@ func TestDeprecatedSettings(t *testing.T) {
239239
"experimentalWorkspaceModule": true,
240240
"tempModfile": true,
241241
"allowModfileModifications": true,
242+
"allowImplicitNetworkAccess": true,
242243
},
243244
).Run(t, "", func(t *testing.T, env *Env) {
244245
env.OnceMet(
@@ -248,6 +249,7 @@ func TestDeprecatedSettings(t *testing.T) {
248249
ShownMessage("experimentalWatchedFileDelay"),
249250
ShownMessage("tempModfile"),
250251
ShownMessage("allowModfileModifications"),
252+
ShownMessage("allowImplicitNetworkAccess"),
251253
)
252254
})
253255
}

0 commit comments

Comments
 (0)