package.json: remove go.languageServerExperimentalFeatures setting
The deprecation note was present for over two years. No objection
was raised.
Updates golang/vscode-go#1109
Updates golang/vscode-go#50
Change-Id: Ia78b894a200f4120c76fb473ec84ae39578f215f
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/501199
Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
diff --git a/docs/settings.md b/docs/settings.md
index 9935c29..a5b5d54 100644
--- a/docs/settings.md
+++ b/docs/settings.md
@@ -369,19 +369,6 @@
If true, then `-i` flag will be passed to `go build` everytime the code is compiled. Since Go 1.10, setting this may be unnecessary unless you are in GOPATH mode and do not use the language server.
Default: `false`
-### `go.languageServerExperimentalFeatures`
-
-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).
-| Properties | Description |
-| --- | --- |
-| `diagnostics` | If true, the language server will provide build, vet errors and the extension will ignore the `buildOnSave`, `vetOnSave` settings. <br/> Default: `true` |
-
-Default:
-```
-{
- "diagnostics" : true,
-}
-```
### `go.languageServerFlags`
Flags like -rpc.trace and -logfile to be used while running the language server.
diff --git a/package.json b/package.json
index 1feb0c3..e3d262c 100644
--- a/package.json
+++ b/package.json
@@ -1582,21 +1582,6 @@
"default": [],
"description": "Flags like -rpc.trace and -logfile to be used while running the language server."
},
- "go.languageServerExperimentalFeatures": {
- "type": "object",
- "properties": {
- "diagnostics": {
- "type": "boolean",
- "default": true,
- "description": "If true, the language server will provide build, vet errors and the extension will ignore the `buildOnSave`, `vetOnSave` settings."
- }
- },
- "additionalProperties": false,
- "default": {
- "diagnostics": true
- },
- "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)."
- },
"go.trace.server": {
"type": "string",
"enum": [
diff --git a/src/goCheck.ts b/src/goCheck.ts
index 589752b..ff81136 100644
--- a/src/goCheck.ts
+++ b/src/goCheck.ts
@@ -69,7 +69,7 @@
// If a user has enabled diagnostics via a language server,
// then we disable running build or vet to avoid duplicate errors and warnings.
const lspConfig = buildLanguageServerConfig(goConfig);
- const disableBuildAndVet = lspConfig.enabled && lspConfig.features.diagnostics;
+ const disableBuildAndVet = lspConfig.enabled;
let testPromise: Thenable<boolean>;
const testConfig: TestConfig = {
diff --git a/src/goMain.ts b/src/goMain.ts
index 73bfa2c..79304cb 100644
--- a/src/goMain.ts
+++ b/src/goMain.ts
@@ -392,21 +392,4 @@
}
}
}
- const experimentalFeatures = cfg['languageServerExperimentalFeatures'];
- if (experimentalFeatures) {
- // TODO(golang/vscode-go#50): Eventually notify about deprecation of
- // all of the settings. See golang/vscode-go#1109 too.
- // The `diagnostics` setting is still used as a workaround for running custom vet.
- const promptKey = 'promptedLanguageServerExperimentalFeatureDeprecation';
- const prompted = getFromGlobalState(promptKey, false);
- if (!prompted && experimentalFeatures['diagnostics'] === false) {
- const msg = `The 'go.languageServerExperimentalFeature.diagnostics' setting will be deprecated soon.
- If you would like additional configuration for diagnostics from gopls, please see and response to [Issue 50](https://go.dev/s/vscode-issue/50).`;
- const selected = await vscode.window.showInformationMessage(msg, "Don't show again");
- switch (selected) {
- case "Don't show again":
- updateGlobalState(promptKey, true);
- }
- }
- }
}
diff --git a/src/goTools.ts b/src/goTools.ts
index ef6f444..ddd82cd 100644
--- a/src/goTools.ts
+++ b/src/goTools.ts
@@ -227,8 +227,7 @@
) {
return false;
}
- const features = goConfig['languageServerExperimentalFeatures'];
- return !features || features['diagnostics'] === true;
+ return true;
}
export const gocodeClose = async (env: NodeJS.Dict<string>): Promise<string> => {
diff --git a/src/language/goLanguageServer.ts b/src/language/goLanguageServer.ts
index e7938e6..d2521a5 100644
--- a/src/language/goLanguageServer.ts
+++ b/src/language/goLanguageServer.ts
@@ -72,7 +72,6 @@
flags: string[];
env: any;
features: {
- diagnostics: boolean;
formatter?: GoDocumentFormattingEditProvider;
};
checkForUpdates: string;
@@ -616,9 +615,6 @@
diagnostics: vscode.Diagnostic[],
next: HandleDiagnosticsSignature
) => {
- if (!cfg.features.diagnostics) {
- return null;
- }
const { buildDiagnosticCollection, lintDiagnosticCollection, vetDiagnosticCollection } = goCtx;
// Deduplicate diagnostics with those found by the other tools.
removeDuplicateDiagnostics(vetDiagnosticCollection, uri, diagnostics);
@@ -925,7 +921,6 @@
if (
e.affectsConfiguration('go.useLanguageServer') ||
e.affectsConfiguration('go.languageServerFlags') ||
- e.affectsConfiguration('go.languageServerExperimentalFeatures') ||
e.affectsConfiguration('go.alternateTools') ||
e.affectsConfiguration('go.toolsEnvVars') ||
e.affectsConfiguration('go.formatTool')
@@ -954,7 +949,6 @@
features: {
// TODO: We should have configs that match these names.
// Ultimately, we should have a centralized language server config rather than separate fields.
- diagnostics: goConfig['languageServerExperimentalFeatures']['diagnostics'],
formatter: formatter
},
env: toolExecutionEnvironment(),
diff --git a/test/gopls/update.test.ts b/test/gopls/update.test.ts
index 2bc6366..a8ea197 100644
--- a/test/gopls/update.test.ts
+++ b/test/gopls/update.test.ts
@@ -210,9 +210,7 @@
version: undefined,
checkForUpdates: 'proxy',
env: {},
- features: {
- diagnostics: true
- },
+ features: {},
flags: [],
modtime: new Date(),
serverName: 'gopls'