Skip to content

Commit 4764b28

Browse files
committed
Review feedback
1 parent d7d23b1 commit 4764b28

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

src/lsptoolshost/roslynLanguageServer.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ import { reportProjectConfigurationEvent } from '../shared/projectConfiguration'
6767
import { getDotnetInfo } from '../shared/utils/getDotnetInfo';
6868
import { registerLanguageServerOptionChanges } from './optionChanges';
6969
import { Observable } from 'rxjs';
70+
import { DotnetInfo } from '../shared/utils/dotnetInfo';
7071

7172
let _languageServer: RoslynLanguageServer;
7273
let _channel: vscode.OutputChannel;
@@ -209,8 +210,11 @@ export class RoslynLanguageServer {
209210
});
210211

211212
// Retrieve the dotnet info outside of the notification so we're not running dotnet --info every time the project changes.
212-
const dotnetInfo = await getDotnetInfo([]);
213-
this._languageClient.onNotification(RoslynProtocol.ProjectConfigurationNotification.type, (params) => {
213+
let dotnetInfo: DotnetInfo | undefined = undefined;
214+
this._languageClient.onNotification(RoslynProtocol.ProjectConfigurationNotification.type, async (params) => {
215+
if (!dotnetInfo) {
216+
dotnetInfo = await getDotnetInfo([]);
217+
}
214218
reportProjectConfigurationEvent(
215219
this.telemetryReporter,
216220
params,

src/lsptoolshost/roslynProtocol.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ export namespace ProjectInitializationCompleteNotification {
163163
}
164164

165165
export namespace ProjectConfigurationNotification {
166-
export const method = 'workspace/projectConfiguration';
166+
export const method = 'workspace/projectConfigurationTelemetry';
167167
export const messageDirection: lsp.MessageDirection = lsp.MessageDirection.serverToClient;
168168
export const type = new lsp.NotificationType<ProjectConfigurationMessage>(method);
169169
}

0 commit comments

Comments
 (0)