Skip to content

Commit 0940fb7

Browse files
Merge pull request #6177 from microsoft/1.0.1
* Fix issue with LSP process not getting shut down gracefully (#6141) * Update version number and changelog * Update changelog, fwlinks, and hashes. Co-authored-by: Colen Garoutte-Carson <[email protected]> Co-authored-by: Sean McManus <[email protected]>
2 parents 9525fc7 + 9d79f0f commit 0940fb7

File tree

4 files changed

+50
-45
lines changed

4 files changed

+50
-45
lines changed

Extension/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# C/C++ for Visual Studio Code Change Log
22

3+
## Version 1.0.1: September 21, 2020
4+
### Bug Fixes
5+
* Fix "No IL available" IntelliSense error on Linux/macOS when `#error` directives are present in the source code. [#6009](https://github.com/microsoft/vscode-cpptools/issues/6009), [#6114](https://github.com/microsoft/vscode-cpptools/issues/6114)
6+
* Fix issue on Windows with the language server not shutting down properly which causes the IntelliSense database to become corrupted. [PR #6141](https://github.com/microsoft/vscode-cpptools/issues/6141)
7+
* Fix "No IL available" IntelliSense error when predefined macros are undefined. [#6147](https://github.com/microsoft/vscode-cpptools/issues/6147)
8+
* Fix infinite loop IntelliSense regression. [#6166](https://github.com/microsoft/vscode-cpptools/issues/6166)
9+
310
## Version 1.0.0: September 14, 2020
411
### New Features
512
* Support non-UTF-8 file encodings (GBK, UTF-16, etc.), excluding `files.autoGuessEncoding` support. [#414](https://github.com/microsoft/vscode-cpptools/issues/414)

Extension/package.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "cpptools",
33
"displayName": "C/C++",
44
"description": "C/C++ IntelliSense, debugging, and code browsing.",
5-
"version": "1.0.0",
5+
"version": "1.0.1",
66
"publisher": "ms-vscode",
77
"icon": "LanguageCCPP_color_128x.png",
88
"readme": "README.md",
@@ -2290,7 +2290,7 @@
22902290
"runtimeDependencies": [
22912291
{
22922292
"description": "C/C++ language components (Linux / x86_64)",
2293-
"url": "https://go.microsoft.com/fwlink/?linkid=2135548",
2293+
"url": "https://go.microsoft.com/fwlink/?linkid=2143240",
22942294
"platforms": [
22952295
"linux"
22962296
],
@@ -2301,11 +2301,11 @@
23012301
"./bin/cpptools",
23022302
"./bin/cpptools-srv"
23032303
],
2304-
"integrity": "1C38F099F1A0B7998AA3C96715D1E3122AF3B14E15F6F0DABFBC7EC189D6A9C3"
2304+
"integrity": "EE9F56D1F6499B606BAC390505C88C0B5CC749A00B410C67E20269A9F60FA9E4"
23052305
},
23062306
{
23072307
"description": "C/C++ language components (Linux / armhf)",
2308-
"url": "https://go.microsoft.com/fwlink/?linkid=2135628",
2308+
"url": "https://go.microsoft.com/fwlink/?linkid=2143241",
23092309
"platforms": [
23102310
"linux"
23112311
],
@@ -2316,11 +2316,11 @@
23162316
"./bin/cpptools",
23172317
"./bin/cpptools-srv"
23182318
],
2319-
"integrity": "3888B34E283BD466B1BD967A4AEE3FFA7AF7DF800598B99DEAB524134A8F8DD3"
2319+
"integrity": "3C37FD864ED5F7CECED0D9487DA3EEEC30A3BA973C9B943A5B93B11960B18761"
23202320
},
23212321
{
23222322
"description": "C/C++ language components (Linux / aarch64)",
2323-
"url": "https://go.microsoft.com/fwlink/?linkid=2143106",
2323+
"url": "https://go.microsoft.com/fwlink/?linkid=2143080",
23242324
"platforms": [
23252325
"linux"
23262326
],
@@ -2331,31 +2331,31 @@
23312331
"./bin/cpptools",
23322332
"./bin/cpptools-srv"
23332333
],
2334-
"integrity": "E42742E4E9963BF945C61AA60ED62D4A953174CDD1865E1496F8588A53A7C3DF"
2334+
"integrity": "E83B2522E2EC9EE14E0A0E8E95DE1DE1C816A1BED128189C6F4DD8B99D4E4AC9"
23352335
},
23362336
{
23372337
"description": "C/C++ language components (OS X)",
2338-
"url": "https://go.microsoft.com/fwlink/?linkid=2135549",
2338+
"url": "https://go.microsoft.com/fwlink/?linkid=2143079",
23392339
"platforms": [
23402340
"darwin"
23412341
],
23422342
"binaries": [
23432343
"./bin/cpptools",
23442344
"./bin/cpptools-srv"
23452345
],
2346-
"integrity": "2213A48C1C53763B4EA548D702171C8C0DDB33C684433F2707F23B9A4AEA6F72"
2346+
"integrity": "5FE3F5D8FB3B05246104BCC76659EA4B1E7F585D6147FB583BAFF561F4907193"
23472347
},
23482348
{
23492349
"description": "C/C++ language components (Windows)",
2350-
"url": "https://go.microsoft.com/fwlink/?linkid=2135298",
2350+
"url": "https://go.microsoft.com/fwlink/?linkid=2143078",
23512351
"platforms": [
23522352
"win32"
23532353
],
23542354
"binaries": [
23552355
"./bin/cpptools.exe",
23562356
"./bin/cpptools-srv.exe"
23572357
],
2358-
"integrity": "1C86575AD572B8EE1787F168BD7002B77091CA0079DEE054EB4E015B3CBBDC56"
2358+
"integrity": "BA67FC5F787552BE73F6613E08D1374FE3E3C3501417CF03E1D871A46DE4224A"
23592359
},
23602360
{
23612361
"description": "ClangFormat (Linux / x86_64)",

Extension/src/LanguageServer/client.ts

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -559,7 +559,7 @@ export interface Client {
559559
handleConfigurationEditUICommand(): void;
560560
handleAddToIncludePathCommand(path: string): void;
561561
onInterval(): void;
562-
dispose(): Thenable<void>;
562+
dispose(): void;
563563
addFileAssociations(fileAssociations: string, is_c: boolean): void;
564564
sendDidChangeSettings(settings: any): void;
565565
}
@@ -3102,33 +3102,34 @@ export class DefaultClient implements Client {
31023102
}
31033103
}
31043104

3105-
public dispose(): Thenable<void> {
3106-
const promise: Thenable<void> = (this.languageClient && clientCollection.Count === 0) ? this.languageClient.stop() : Promise.resolve();
3107-
return promise.then(() => {
3108-
this.disposables.forEach((d) => d.dispose());
3109-
this.disposables = [];
3110-
if (this.documentFormattingProviderDisposable) {
3111-
this.documentFormattingProviderDisposable.dispose();
3112-
this.documentFormattingProviderDisposable = undefined;
3113-
}
3114-
if (this.formattingRangeProviderDisposable) {
3115-
this.formattingRangeProviderDisposable.dispose();
3116-
this.formattingRangeProviderDisposable = undefined;
3117-
}
3118-
if (this.onTypeFormattingProviderDisposable) {
3119-
this.onTypeFormattingProviderDisposable.dispose();
3120-
this.onTypeFormattingProviderDisposable = undefined;
3121-
}
3122-
if (this.codeFoldingProviderDisposable) {
3123-
this.codeFoldingProviderDisposable.dispose();
3124-
this.codeFoldingProviderDisposable = undefined;
3125-
}
3126-
if (this.semanticTokensProviderDisposable) {
3127-
this.semanticTokensProviderDisposable.dispose();
3128-
this.semanticTokensProviderDisposable = undefined;
3129-
}
3130-
this.model.dispose();
3131-
});
3105+
public dispose(): void {
3106+
this.disposables.forEach((d) => d.dispose());
3107+
this.disposables = [];
3108+
if (this.documentFormattingProviderDisposable) {
3109+
this.documentFormattingProviderDisposable.dispose();
3110+
this.documentFormattingProviderDisposable = undefined;
3111+
}
3112+
if (this.formattingRangeProviderDisposable) {
3113+
this.formattingRangeProviderDisposable.dispose();
3114+
this.formattingRangeProviderDisposable = undefined;
3115+
}
3116+
if (this.onTypeFormattingProviderDisposable) {
3117+
this.onTypeFormattingProviderDisposable.dispose();
3118+
this.onTypeFormattingProviderDisposable = undefined;
3119+
}
3120+
if (this.codeFoldingProviderDisposable) {
3121+
this.codeFoldingProviderDisposable.dispose();
3122+
this.codeFoldingProviderDisposable = undefined;
3123+
}
3124+
if (this.semanticTokensProviderDisposable) {
3125+
this.semanticTokensProviderDisposable.dispose();
3126+
this.semanticTokensProviderDisposable = undefined;
3127+
}
3128+
this.model.dispose();
3129+
}
3130+
3131+
public static stopLanguageClient(): Thenable<void> {
3132+
return languageClient ? languageClient.stop() : Promise.resolve();
31323133
}
31333134

31343135
public handleReferencesIcon(): void {
@@ -3254,10 +3255,9 @@ class NullClient implements Client {
32543255
handleConfigurationEditUICommand(): void {}
32553256
handleAddToIncludePathCommand(path: string): void {}
32563257
onInterval(): void {}
3257-
dispose(): Thenable<void> {
3258+
dispose(): void {
32583259
this.booleanEvent.dispose();
32593260
this.stringEvent.dispose();
3260-
return Promise.resolve();
32613261
}
32623262
addFileAssociations(fileAssociations: string, is_c: boolean): void {}
32633263
sendDidChangeSettings(settings: any): void {}

Extension/src/LanguageServer/clientCollection.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -206,14 +206,12 @@ export class ClientCollection {
206206
}
207207

208208
public dispose(): Thenable<void> {
209-
const promises: Thenable<void>[] = [];
210209
this.disposables.forEach((d: vscode.Disposable) => d.dispose());
211210

212211
// this.defaultClient is already in this.languageClients, so do not call dispose() on it.
213-
214-
this.languageClients.forEach(client => promises.push(client.dispose()));
212+
this.languageClients.forEach(client => client.dispose());
215213
this.languageClients.clear();
216214
cpptools.disposeWorkspaceData();
217-
return Promise.all(promises).then(() => undefined);
215+
return cpptools.DefaultClient.stopLanguageClient();
218216
}
219217
}

0 commit comments

Comments
 (0)