You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[release] src/goLanguageServer: partial revert of cl/280601
This partially reverts commit 4c91c38.
In https://go-review.googlesource.com/c/vscode-go/+/280601,
we tried to remove the languageServerExperimentalFeatures setting
because gopls's diagnostics feature is no longer in its experimental
state and that was the only flag left in this setting.
However, we learned some users depend on this flag because the
extension turns off buildOnSave and vetOnSave features when gopls's
diagnostics is used and they need to run custom vet analyzers.
This is not ideal and the extension shouldn't prevent users from
running their custom analyzers. That needs more investigation and
experiment.
For now, we rollback the change, but place the deprecation notice.
Update #50Fixes#1110
Change-Id: I376692b152d3011aaa8da7a1b5121ba33e2188b6
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/285253
Trust: Hyang-Ah Hana Kim <[email protected]>
Run-TryBot: Hyang-Ah Hana Kim <[email protected]>
TryBot-Result: kokoro <[email protected]>
Reviewed-by: Rebecca Stambler <[email protected]>
(cherry picked from commit fbd2fc4)
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/285256
Copy file name to clipboardExpand all lines: docs/settings.md
+17-2Lines changed: 17 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -76,7 +76,7 @@ Flags to `go build`/`go test` used during build-on-save or running tests. (e.g.
76
76
77
77
### `go.buildOnSave`
78
78
79
-
Compiles code on file save using 'go build -i' or 'go test -c -i'. Options are 'workspace', 'package', or 'off'.
79
+
Compiles code on file save using 'go build' or 'go test -c'. Options are 'workspace', 'package', or 'off'. Not applicable when using the language server's diagnostics is used. See 'go.languageServerExperimentalFeatures.diagnostics' setting.
80
80
81
81
Allowed Values:`[package workspace off]`
82
82
@@ -324,6 +324,21 @@ If true, then `-i` flag will be passed to `go build` everytime the code is compi
324
324
325
325
Default: `false`
326
326
327
+
### `go.languageServerExperimentalFeatures`
328
+
329
+
Temporary flag to enable/disable diagnostics from the language server. This setting will be deprecated soon. Please see and response to [Issue 50](https://github.com/golang/vscode-go/issues/50).
330
+
331
+
| Properties | Description |
332
+
| --- | --- |
333
+
|`diagnostics`| If true, the language server will provide build, vet errors and the extension will ignore the `buildOnSave`, `vetOnSave` settings. |
334
+
|||
335
+
336
+
337
+
Default:{<br/>
338
+
`"diagnostics": true`,<br/>
339
+
}
340
+
341
+
327
342
### `go.languageServerFlags`
328
343
329
344
Flags like -rpc.trace and -logfile to be used while running the language server.
@@ -515,7 +530,7 @@ Flags to pass to `go tool vet` (e.g. ["-all", "-shadow"])
515
530
516
531
### `go.vetOnSave`
517
532
518
-
Vets code on file save using 'go tool vet'. Not applicable when using the language server.
533
+
Vets code on file save using 'go tool vet'. Not applicable when using the language server's diagnostics is used. See 'go.languageServerExperimentalFeatures.diagnostics' setting.
Copy file name to clipboardExpand all lines: package.json
+17-2Lines changed: 17 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -865,7 +865,7 @@
865
865
"off"
866
866
],
867
867
"default": "package",
868
-
"description": "Compiles code on file save using 'go build -i' or 'go test -c -i'. Options are 'workspace', 'package', or 'off'.",
868
+
"description": "Compiles code on file save using 'go build' or 'go test -c'. Options are 'workspace', 'package', or 'off'. Not applicable when using the language server's diagnostics is used. See 'go.languageServerExperimentalFeatures.diagnostics' setting.",
869
869
"scope": "resource"
870
870
},
871
871
"go.buildFlags": {
@@ -939,7 +939,7 @@
939
939
"off"
940
940
],
941
941
"default": "package",
942
-
"description": "Vets code on file save using 'go tool vet'. Not applicable when using the language server.",
942
+
"description": "Vets code on file save using 'go tool vet'. Not applicable when using the language server's diagnostics is used. See 'go.languageServerExperimentalFeatures.diagnostics' setting.",
943
943
"scope": "resource"
944
944
},
945
945
"go.vetFlags": {
@@ -1253,6 +1253,21 @@
1253
1253
"default": [],
1254
1254
"description": "Flags like -rpc.trace and -logfile to be used while running the language server."
1255
1255
},
1256
+
"go.languageServerExperimentalFeatures": {
1257
+
"type": "object",
1258
+
"properties": {
1259
+
"diagnostics": {
1260
+
"type": "boolean",
1261
+
"default": true,
1262
+
"description": "If true, the language server will provide build, vet errors and the extension will ignore the `buildOnSave`, `vetOnSave` settings."
1263
+
}
1264
+
},
1265
+
"additionalProperties": false,
1266
+
"default": {
1267
+
"diagnostics": true
1268
+
},
1269
+
"markdownDescription": "Temporary flag to enable/disable diagnostics from the language server. This setting will be deprecated soon. Please see and response to [Issue 50](https://github.com/golang/vscode-go/issues/50)."
0 commit comments