Skip to content

Commit c7455ae

Browse files
committed
update language client to 8.0.2
Signed-off-by: Shi Chen <[email protected]>
1 parent 31b0a60 commit c7455ae

12 files changed

+541
-535
lines changed

package-lock.json

+36-48
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"virtualWorkspaces": false
2424
},
2525
"engines": {
26-
"vscode": "^1.65.0"
26+
"vscode": "^1.67.0"
2727
},
2828
"repository": {
2929
"type": "git",
@@ -1400,7 +1400,7 @@
14001400
"@types/node": "^8.10.51",
14011401
"@types/semver": "^7.3.8",
14021402
"@types/sinon": "^10.0.12",
1403-
"@types/vscode": "^1.65.0",
1403+
"@types/vscode": "^1.67.0",
14041404
"@types/winreg": "^1.2.30",
14051405
"@types/winston": "^2.4.4",
14061406
"@vscode/test-electron": "^2.1.5",
@@ -1431,7 +1431,7 @@
14311431
"htmlparser2": "6.0.1",
14321432
"jdk-utils": "^0.4.4",
14331433
"semver": "^7.3.5",
1434-
"vscode-languageclient": "7.1.0-next.5",
1434+
"vscode-languageclient": "8.0.2",
14351435
"winreg-utf8": "^0.1.1",
14361436
"winston": "^3.2.1",
14371437
"winston-daily-rotate-file": "^3.10.0"

src/clientErrorHandler.ts

+18-8
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { window, commands } from "vscode";
2-
import { ErrorHandler, Message, ErrorAction, CloseAction } from "vscode-languageclient";
2+
import { ErrorHandler, Message, ErrorAction, CloseAction, ErrorHandlerResult, CloseHandlerResult } from "vscode-languageclient";
33
import { Commands } from "./commands";
44
import { logger } from "./log";
55

@@ -10,21 +10,27 @@ export class ClientErrorHandler implements ErrorHandler {
1010
this.restarts = [];
1111
}
1212

13-
public error(_error: Error, _message: Message, count: number): ErrorAction {
13+
public error(_error: Error, _message: Message, count: number): ErrorHandlerResult {
1414
if (count && count <= 3) {
1515
logger.error(`${this.name} server encountered error: ${_message}, ${_error && _error.toString()}`);
16-
return ErrorAction.Continue;
16+
return {
17+
action: ErrorAction.Continue
18+
};
1719
}
1820

1921
logger.error(`${this.name} server encountered error and will shut down: ${_message}, ${_error && _error.toString()}`);
20-
return ErrorAction.Shutdown;
22+
return {
23+
action: ErrorAction.Shutdown
24+
};
2125
}
2226

23-
public closed(): CloseAction {
27+
public closed(): CloseHandlerResult {
2428
this.restarts.push(Date.now());
2529
if (this.restarts.length < 5) {
2630
logger.error(`The ${this.name} server crashed and will restart.`);
27-
return CloseAction.Restart;
31+
return {
32+
action: CloseAction.Restart
33+
};
2834
} else {
2935
const diff = this.restarts[this.restarts.length - 1] - this.restarts[0];
3036
if (diff <= 3 * 60 * 1000) {
@@ -36,12 +42,16 @@ export class ClientErrorHandler implements ErrorHandler {
3642
commands.executeCommand(Commands.OPEN_LOGS);
3743
}
3844
});
39-
return CloseAction.DoNotRestart;
45+
return {
46+
action: CloseAction.DoNotRestart
47+
};
4048
}
4149

4250
logger.error(`The ${this.name} server crashed and will restart.`);
4351
this.restarts.shift();
44-
return CloseAction.Restart;
52+
return {
53+
action: CloseAction.Restart
54+
};
4555
}
4656
}
4757
}

0 commit comments

Comments
 (0)