@@ -13,13 +13,13 @@ import {
13
13
14
14
import { DeprecatePythonPath } from '../../common/experiments/groups' ;
15
15
import { traceDecorators , traceError } from '../../common/logger' ;
16
- import { IConfigurationService , IExperimentsManager , IInterpreterPathService , Resource } from '../../common/types' ;
16
+ import { IExperimentsManager , IInterpreterPathService , Resource } from '../../common/types' ;
17
17
import { createDeferred , Deferred , sleep } from '../../common/utils/async' ;
18
18
import { swallowExceptions } from '../../common/utils/decorators' ;
19
19
import { noop } from '../../common/utils/misc' ;
20
20
import { LanguageServerSymbolProvider } from '../../providers/symbolProvider' ;
21
21
import { PythonEnvironment } from '../../pythonEnvironments/info' ;
22
- import { captureTelemetry , sendTelemetryEvent } from '../../telemetry' ;
22
+ import { captureTelemetry } from '../../telemetry' ;
23
23
import { EventName } from '../../telemetry/constants' ;
24
24
import { ITestManagementService } from '../../testing/types' ;
25
25
import { FileBasedCancellationStrategy } from '../common/cancellationUtils' ;
@@ -44,7 +44,6 @@ export class JediLanguageServerProxy implements ILanguageServerProxy {
44
44
constructor (
45
45
@inject ( ILanguageClientFactory ) private readonly factory : ILanguageClientFactory ,
46
46
@inject ( ITestManagementService ) private readonly testManager : ITestManagementService ,
47
- @inject ( IConfigurationService ) private readonly configurationService : IConfigurationService ,
48
47
@inject ( IExperimentsManager ) private readonly experiments : IExperimentsManager ,
49
48
@inject ( IInterpreterPathService ) private readonly interpreterPathService : IInterpreterPathService ,
50
49
) {
@@ -81,7 +80,7 @@ export class JediLanguageServerProxy implements ILanguageServerProxy {
81
80
82
81
@traceDecorators . error ( 'Failed to start language server' )
83
82
@captureTelemetry (
84
- EventName . LANGUAGE_SERVER_ENABLED ,
83
+ EventName . JEDI_LANGUAGE_SERVER_ENABLED ,
85
84
undefined ,
86
85
true ,
87
86
undefined ,
@@ -107,7 +106,7 @@ export class JediLanguageServerProxy implements ILanguageServerProxy {
107
106
// late the server may have already sent a message (which leads to failures). Register
108
107
// these on the state change to running to ensure they are ready soon enough.
109
108
if ( e . newState === State . Running ) {
110
- this . registerHandlers ( resource ) ;
109
+ this . registerHandlers ( ) ;
111
110
}
112
111
} ) ;
113
112
@@ -131,7 +130,7 @@ export class JediLanguageServerProxy implements ILanguageServerProxy {
131
130
}
132
131
133
132
@captureTelemetry (
134
- EventName . LANGUAGE_SERVER_READY ,
133
+ EventName . JEDI_LANGUAGE_SERVER_READY ,
135
134
undefined ,
136
135
true ,
137
136
undefined ,
@@ -155,7 +154,7 @@ export class JediLanguageServerProxy implements ILanguageServerProxy {
155
154
await this . testManager . activate ( new LanguageServerSymbolProvider ( this . languageClient ) ) ;
156
155
}
157
156
158
- private registerHandlers ( resource : Resource ) {
157
+ private registerHandlers ( ) {
159
158
if ( this . disposed ) {
160
159
// Check if it got disposed in the interim.
161
160
return ;
@@ -167,7 +166,7 @@ export class JediLanguageServerProxy implements ILanguageServerProxy {
167
166
if ( this . experiments . inExperiment ( DeprecatePythonPath . experiment ) ) {
168
167
this . disposables . push (
169
168
this . interpreterPathService . onDidChange ( ( ) => {
170
- // Manually send didChangeConfiguration in order to get the server to requery
169
+ // Manually send didChangeConfiguration in order to get the server to re-query
171
170
// the workspace configurations (to then pick up pythonPath set in the middleware).
172
171
// This is needed as interpreter changes via the interpreter path service happen
173
172
// outside of VS Code's settings (which would mean VS Code sends the config updates itself).
@@ -177,18 +176,5 @@ export class JediLanguageServerProxy implements ILanguageServerProxy {
177
176
} ) ,
178
177
) ;
179
178
}
180
-
181
- const settings = this . configurationService . getSettings ( resource ) ;
182
- if ( settings . downloadLanguageServer ) {
183
- this . languageClient ! . onTelemetry ( ( telemetryEvent ) => {
184
- const eventName = telemetryEvent . EventName || EventName . LANGUAGE_SERVER_TELEMETRY ;
185
- const formattedProperties = {
186
- ...telemetryEvent . Properties ,
187
- // Replace all slashes in the method name so it doesn't get scrubbed by vscode-extension-telemetry.
188
- method : telemetryEvent . Properties . method ?. replace ( / \/ / g, '.' ) ,
189
- } ;
190
- sendTelemetryEvent ( eventName , telemetryEvent . Measurements , formattedProperties ) ;
191
- } ) ;
192
- }
193
179
}
194
180
}
0 commit comments