Skip to content

Commit 4ddf1c2

Browse files
author
Dave Bartolomeo
committed
Merge remote-tracking branch 'origin/main' into dbartol/debug-context
2 parents 348e923 + 23f783b commit 4ddf1c2

2 files changed

Lines changed: 9 additions & 3 deletions

File tree

extensions/ql-vscode/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
## [UNRELEASED]
44

5+
- Restart the CodeQL language server whenever the _CodeQL: Restart Query Server_ command is invoked. This avoids bugs where the CLI version changes to support new language features, but the language server is not updated. [#2238](https://github.com/github/vscode-codeql/pull/2238)
6+
57
## 1.8.1 - 23 March 2023
68

79
- Show data flow paths of a variant analysis in a new tab. [#2172](https://github.com/github/vscode-codeql/pull/2172) & [#2182](https://github.com/github/vscode-codeql/pull/2182)

extensions/ql-vscode/src/extension.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ function getCommands(
158158
app: App,
159159
cliServer: CodeQLCliServer,
160160
queryRunner: QueryRunner,
161+
ideServer: LanguageClient,
161162
): BaseCommands {
162163
const getCliVersion = async () => {
163164
try {
@@ -174,9 +175,12 @@ function getCommands(
174175
"codeQL.restartQueryServer": async () =>
175176
withProgress(
176177
async (progress: ProgressCallback, token: CancellationToken) => {
177-
// We restart the CLI server too, to ensure they are the same version
178+
// Restart all of the spawned servers: cli, query, and language.
178179
cliServer.restartCliServer();
179-
await queryRunner.restartQueryServer(progress, token);
180+
await Promise.all([
181+
queryRunner.restartQueryServer(progress, token),
182+
ideServer.restart(),
183+
]);
180184
void showAndLogInformationMessage("CodeQL Query Server restarted.", {
181185
outputLogger: queryServerLogger,
182186
});
@@ -896,7 +900,7 @@ async function activateWithInstalledDistribution(
896900
void extLogger.log("Registering top-level command palette commands.");
897901

898902
const allCommands: AllExtensionCommands = {
899-
...getCommands(app, cliServer, qs),
903+
...getCommands(app, cliServer, qs, client),
900904
...getQueryEditorCommands({
901905
commandManager: app.commands,
902906
queryRunner: qs,

0 commit comments

Comments
 (0)