Skip to content

Commit f09670c

Browse files
authored
Remove unused interpreterPathService.onDidChange notification (#19251)
Remove unused onDidChange notification
1 parent 8bdd966 commit f09670c

File tree

2 files changed

+5
-25
lines changed

2 files changed

+5
-25
lines changed

src/client/activation/jedi/languageServerProxy.ts

Lines changed: 3 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,10 @@
22
// Licensed under the MIT License.
33

44
import '../../common/extensions';
5-
import {
6-
DidChangeConfigurationNotification,
7-
Disposable,
8-
LanguageClient,
9-
LanguageClientOptions,
10-
} from 'vscode-languageclient/node';
5+
import { Disposable, LanguageClient, LanguageClientOptions } from 'vscode-languageclient/node';
116

127
import { ChildProcess } from 'child_process';
13-
import { IInterpreterPathService, Resource } from '../../common/types';
8+
import { Resource } from '../../common/types';
149
import { PythonEnvironment } from '../../pythonEnvironments/info';
1510
import { captureTelemetry } from '../../telemetry';
1611
import { EventName } from '../../telemetry/constants';
@@ -27,10 +22,7 @@ export class JediLanguageServerProxy implements ILanguageServerProxy {
2722

2823
private lsVersion: string | undefined;
2924

30-
constructor(
31-
private readonly factory: ILanguageClientFactory,
32-
private readonly interpreterPathService: IInterpreterPathService,
33-
) {}
25+
constructor(private readonly factory: ILanguageClientFactory) {}
3426

3527
private static versionTelemetryProps(instance: JediLanguageServerProxy) {
3628
return {
@@ -112,17 +104,5 @@ export class JediLanguageServerProxy implements ILanguageServerProxy {
112104
private registerHandlers(client: LanguageClient) {
113105
const progressReporting = new ProgressReporting(client);
114106
this.disposables.push(progressReporting);
115-
116-
this.disposables.push(
117-
this.interpreterPathService.onDidChange(() => {
118-
// Manually send didChangeConfiguration in order to get the server to re-query
119-
// the workspace configurations (to then pick up pythonPath set in the middleware).
120-
// This is needed as interpreter changes via the interpreter path service happen
121-
// outside of VS Code's settings (which would mean VS Code sends the config updates itself).
122-
client.sendNotification(DidChangeConfigurationNotification.type, {
123-
settings: null,
124-
});
125-
}),
126-
);
127107
}
128108
}

src/client/languageServer/jediLSExtensionManager.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export class JediLSExtensionManager extends LanguageServerCapabilities
3737
_experimentService: IExperimentService,
3838
workspaceService: IWorkspaceService,
3939
configurationService: IConfigurationService,
40-
interpreterPathService: IInterpreterPathService,
40+
_interpreterPathService: IInterpreterPathService,
4141
interpreterService: IInterpreterService,
4242
environmentService: IEnvironmentVariablesProvider,
4343
commandManager: ICommandManager,
@@ -51,7 +51,7 @@ export class JediLSExtensionManager extends LanguageServerCapabilities
5151
workspaceService,
5252
);
5353
this.clientFactory = new JediLanguageClientFactory(interpreterService);
54-
this.serverProxy = new JediLanguageServerProxy(this.clientFactory, interpreterPathService);
54+
this.serverProxy = new JediLanguageServerProxy(this.clientFactory);
5555
this.serverManager = new JediLanguageServerManager(
5656
serviceContainer,
5757
this.analysisOptions,

0 commit comments

Comments
 (0)