Skip to content

Don't try to send dynamicInfoChanged if the server isn't running #7875

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Dec 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion azure-pipelines/prereqs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ steps:
- script: dotnet --info
displayName: Display dotnet info

- script: dotnet tool install --tool-path $(Agent.BuildDirectory) nbgv
- script: dotnet tool install --version 3.6.146 --tool-path $(Agent.BuildDirectory) nbgv
displayName: Install nbgv

# If we want to override the version, update the version.json here - vsix packaging will see this value
Expand Down
2 changes: 1 addition & 1 deletion azure-pipelines/test-matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
strategy:
matrix:
CSharpTests:
npmCommand: 'test:withoutDevKit'
npmCommand: 'test:unit' # Restore when integration test are stable: 'test:withoutDevKit'
DevKitTests:
npmCommand: test:integration:devkit
pool: ${{ parameters.pool }}
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@
"compileTest": "tsc -p ./ && webpack --mode development",
"watch": "tsc -watch -p ./",
"test": "tsc -p ./ && gulp test",
"test:unit": "tsc -p ./ && gulp test:unit",
"test:withoutDevKit": "tsc -p ./ && gulp test:withoutDevKit",
"test:integration:devkit": "tsc -p ./ && gulp test:integration:devkit",
"test:razor": "tsc -p ./ && npm run compile:razorTextMate && gulp test:razor",
Expand Down
12 changes: 10 additions & 2 deletions src/lsptoolshost/roslynLanguageServer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -792,8 +792,16 @@ export class RoslynLanguageServer {
);
vscode.commands.registerCommand(
DynamicFileInfoHandler.dynamicFileUpdatedCommand,
async (notification: RazorDynamicFileChangedParams) =>
this.sendNotification<RazorDynamicFileChangedParams>('razor/dynamicFileInfoChanged', notification)
async (notification: RazorDynamicFileChangedParams) => {
if (this.isRunning()) {
await this.sendNotification<RazorDynamicFileChangedParams>(
'razor/dynamicFileInfoChanged',
notification
);
} else {
_channel.warn('Tried to send razor/dynamicFileInfoChanged while server is not running');
}
}
);
}

Expand Down
Loading