Skip to content

Commit 401eca0

Browse files
findleyrgopherbot
authored andcommitted
gopls/internal/settings: remove "allowImplicitNetworkAccess"
This setting was slated for removal in [email protected]. Nobody has complained on the linked bug. Remove it. Fixes golang/go#66861 Change-Id: I942dbd06755114a13ef097b4a57ffe169441e76f Reviewed-on: https://go-review.googlesource.com/c/tools/+/621877 LUCI-TryBot-Result: Go LUCI <[email protected]> Auto-Submit: Robert Findley <[email protected]> Reviewed-by: Alan Donovan <[email protected]>
1 parent 6618569 commit 401eca0

File tree

5 files changed

+12
-43
lines changed

5 files changed

+12
-43
lines changed

gopls/doc/release/v0.17.0.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
# Configuration Changes
22

3-
The `fieldalignment` analyzer, previously disabled by default, has
4-
been removed: it is redundant with the hover size/offset information
5-
displayed by v0.16.0 and its diagnostics were confusing.
6-
7-
The kind (identifiers) of all of gopls' code actions have changed
8-
to use more specific hierarchical names. For example, "Inline call"
9-
has changed from `refactor.inline` to `refactor.inline.call`.
10-
This allows clients to request particular code actions more precisely.
11-
The user manual now includes the identifier in the documentation for each code action.
3+
- The `fieldalignment` analyzer, previously disabled by default, has
4+
been removed: it is redundant with the hover size/offset information
5+
displayed by v0.16.0 and its diagnostics were confusing.
6+
- The kind (identifiers) of all of gopls' code actions have changed
7+
to use more specific hierarchical names. For example, "Inline call"
8+
has changed from `refactor.inline` to `refactor.inline.call`.
9+
This allows clients to request particular code actions more precisely.
10+
The user manual now includes the identifier in the documentation for each code action.
11+
- The experimental `allowImplicitNetworkAccess` setting is removed, following
12+
its deprecation in [email protected]. See golang/go#66861 for details.
1213

1314
# New features
1415

gopls/doc/settings.md

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -119,17 +119,6 @@ gopls has to do to keep your workspace up to date.
119119

120120
Default: `true`.
121121

122-
<a id='allowImplicitNetworkAccess'></a>
123-
### `allowImplicitNetworkAccess bool`
124-
125-
**This setting is experimental and may be deleted.**
126-
127-
allowImplicitNetworkAccess disables GOPROXY=off, allowing implicit module
128-
downloads rather than requiring user action. This option will eventually
129-
be removed.
130-
131-
Default: `false`.
132-
133122
<a id='standaloneTags'></a>
134123
### `standaloneTags []string`
135124

gopls/internal/cache/snapshot.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,7 @@ func (s *Snapshot) GoCommandInvocation(allowNetwork bool, inv *gocommand.Invocat
516516
)
517517
inv.BuildFlags = slices.Clone(s.Options().BuildFlags)
518518

519-
if !allowNetwork && !s.Options().AllowImplicitNetworkAccess {
519+
if !allowNetwork {
520520
inv.Env = append(inv.Env, "GOPROXY=off")
521521
}
522522

gopls/internal/doc/api.json

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -79,19 +79,6 @@
7979
"Status": "experimental",
8080
"Hierarchy": "build"
8181
},
82-
{
83-
"Name": "allowImplicitNetworkAccess",
84-
"Type": "bool",
85-
"Doc": "allowImplicitNetworkAccess disables GOPROXY=off, allowing implicit module\ndownloads rather than requiring user action. This option will eventually\nbe removed.\n",
86-
"EnumKeys": {
87-
"ValueType": "",
88-
"Keys": null
89-
},
90-
"EnumValues": null,
91-
"Default": "false",
92-
"Status": "experimental",
93-
"Hierarchy": "build"
94-
},
9582
{
9683
"Name": "standaloneTags",
9784
"Type": "[]string",

gopls/internal/settings/settings.go

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -135,11 +135,6 @@ type BuildOptions struct {
135135
// gopls has to do to keep your workspace up to date.
136136
ExpandWorkspaceToModule bool `status:"experimental"`
137137

138-
// AllowImplicitNetworkAccess disables GOPROXY=off, allowing implicit module
139-
// downloads rather than requiring user action. This option will eventually
140-
// be removed.
141-
AllowImplicitNetworkAccess bool `status:"experimental"`
142-
143138
// StandaloneTags specifies a set of build constraints that identify
144139
// individual Go source files that make up the entire main package of an
145140
// executable.
@@ -1138,10 +1133,7 @@ func (o *Options) setOne(name string, value any) error {
11381133
return setBool(&o.AnalysisProgressReporting, value)
11391134

11401135
case "allowImplicitNetworkAccess":
1141-
if err := setBool(&o.AllowImplicitNetworkAccess, value); err != nil {
1142-
return err
1143-
}
1144-
return softErrorf("gopls setting \"allowImplicitNetworkAccess\" is deprecated.\nPlease comment on https://go.dev/issue/66861 if this impacts your workflow.")
1136+
return deprecatedError("")
11451137

11461138
case "standaloneTags":
11471139
return setStringSlice(&o.StandaloneTags, value)

0 commit comments

Comments
 (0)