Skip to content

Commit 203717d

Browse files
committed
src/goReferencesCodelens: delete references codelens code
The references codelens deprecation notice was sent in early Nov (v0.36.0 release). There was no complaint or user feedback. Deleting the code now. Fixes golang#2519 Change-Id: I4f0bf0a0f17d9b7520a938cdc7431d5be53dc5ea Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/464098 Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com> Reviewed-by: Peter Weinberger <pjw@google.com> TryBot-Result: kokoro <noreply+kokoro@google.com>
1 parent 196bd79 commit 203717d

File tree

2 files changed

+0
-179
lines changed

2 files changed

+0
-179
lines changed

src/goMain.ts

-44
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ import { setLogConfig } from './goLogging';
3939
import { GO_MODE } from './goMode';
4040
import { GO111MODULE, goModInit, isModSupported } from './goModules';
4141
import { playgroundCommand } from './goPlayground';
42-
import { GoReferencesCodeLensProvider } from './goReferencesCodelens';
4342
import { GoRunTestCodeLensProvider } from './goRunTestCodelens';
4443
import { disposeGoStatusBar, expandGoStatusBar, updateGoStatusBar } from './goStatus';
4544

@@ -121,7 +120,6 @@ export async function activate(ctx: vscode.ExtensionContext): Promise<ExtensionA
121120
registerCommand('go.environment.status', expandGoStatusBar);
122121

123122
GoRunTestCodeLensProvider.activate(ctx, goCtx);
124-
GoReferencesCodeLensProvider.activate(ctx, goCtx);
125123
GoDebugConfigurationProvider.activate(ctx, goCtx);
126124
GoDebugFactory.activate(ctx);
127125

@@ -391,46 +389,4 @@ async function showDeprecationWarning() {
391389
}
392390
}
393391
}
394-
const codelensFeatures = cfg['enableCodeLens'];
395-
if (codelensFeatures && codelensFeatures['references']) {
396-
const promptKey = 'promptedCodeLensReferencesFeatureDeprecation';
397-
const prompted = getFromGlobalState(promptKey, false);
398-
if (!prompted) {
399-
const msg =
400-
"The 'go.enableCodeLens.references' setting will be removed soon. Please see [Issue 2509](https://go.dev/s/vscode-issue/2509).";
401-
const selected = await vscode.window.showWarningMessage(msg, 'Update Settings', "Don't show again");
402-
switch (selected) {
403-
case 'Update Settings':
404-
{
405-
const { globalValue, workspaceValue, workspaceFolderValue } = cfg.inspect<{
406-
[key: string]: boolean;
407-
}>('enableCodeLens') || {
408-
globalValue: undefined,
409-
workspaceValue: undefined,
410-
workspaceFolderValue: undefined
411-
};
412-
if (globalValue && globalValue['references']) {
413-
delete globalValue.references;
414-
cfg.update('enableCodeLens', globalValue, vscode.ConfigurationTarget.Global);
415-
}
416-
if (workspaceValue && workspaceValue['references']) {
417-
delete workspaceValue.references;
418-
cfg.update('enableCodeLens', workspaceValue, vscode.ConfigurationTarget.Workspace);
419-
}
420-
if (workspaceFolderValue && workspaceFolderValue['references']) {
421-
delete workspaceFolderValue.references;
422-
cfg.update(
423-
'enableCodeLens',
424-
workspaceFolderValue,
425-
vscode.ConfigurationTarget.WorkspaceFolder
426-
);
427-
}
428-
}
429-
break;
430-
case "Don't show again":
431-
updateGlobalState(promptKey, true);
432-
break;
433-
}
434-
}
435-
}
436392
}

src/goReferencesCodelens.ts

-135
This file was deleted.

0 commit comments

Comments
 (0)