Skip to content

Commit fce5d98

Browse files
committed
Merge branch 'main' into seanmcm/vsApr27
2 parents 81b40ca + d9a3f8e commit fce5d98

4 files changed

Lines changed: 90 additions & 11 deletions

File tree

Extension/CHANGELOG.md

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,30 @@
11
# C/C++ for Visual Studio Code Changelog
22

3-
## Version 1.32.1: April 20, 2026
4-
### Bug Fixes
5-
* Fix an IntelliSense crash when three special-case comments are used in a template. [#14360](https://github.com/microsoft/vscode-cpptools/issues/14360)
6-
* Fix `Reinstalling the Extension.md` not being found. [#14389](https://github.com/microsoft/vscode-cpptools/issues/14389)
7-
* Fix the `C/C++ DevTools` extension language service tools not working after the `C/C++` extension updates via `Restart Extensions`. [#14392](https://github.com/microsoft/vscode-cpptools/issues/14392)
8-
* Fix the clang-tidy error `Error: no checks enabled.` when checks are not otherwise set. [#14391](https://github.com/microsoft/vscode-cpptools/issues/14391)
9-
* Update localized strings.
10-
11-
## Version 1.32.0: April 14, 2026
3+
## Version 1.32.2: April 28, 2026
124
### New Feature
13-
* Add support for run without debugging. [#1201](https://github.com/microsoft/vscode-cpptools/issues/1201)
5+
* Add support for "Run without debugging". [#1201](https://github.com/microsoft/vscode-cpptools/issues/1201)
146

157
### Enhancements
168
* Add a `C_Cpp.doxygen.generateOnCodeAction` setting to allow disabling of Doxygen generation code actions. [#14341](https://github.com/microsoft/vscode-cpptools/issues/14341)
9+
* Add a `cpptools.waitForTagParsing` command (for use by the `C/C++ DevTools` extension). [PR #14407](https://github.com/microsoft/vscode-cpptools/pull/14407/changes)
1710
* Improve wildcard matching with the debugger natvis. [MIEngine#1162](https://github.com/microsoft/MIEngine/issues/1162)
1811
* Add support for `HideRawView` with the debugger natvis. [MIEngine#1458](https://github.com/microsoft/MIEngine/issues/1458)
1912

2013
### Bug Fixes
2114
* Fix high CPU usage caused by repeated calls to `selectChatModels`. [#14168](https://github.com/microsoft/vscode-cpptools/issues/14168), [#14211](https://github.com/microsoft/vscode-cpptools/issues/14211), [#14241](https://github.com/microsoft/vscode-cpptools/issues/14241)
2215
* Fix the MSVC developer environment not working if `UCRTVersion` isn't found, and update the walkthrough instructions for installing MSVC. [#14352](https://github.com/microsoft/vscode-cpptools/issues/14352)
16+
* Fix an IntelliSense crash when three special-case comments are used in a template. [#14360](https://github.com/microsoft/vscode-cpptools/issues/14360)
2317
* Fix Copilot hover taking too many premium requests. [#14372](https://github.com/microsoft/vscode-cpptools/issues/14372)
2418
* Fix null pointers being expandable for variables in the debugger. [MIEngine#698](https://github.com/microsoft/MIEngine/issues/698)
2519
* Fix recursive `{this}` evaluation with the debugger natvis. [MIEngine#1391](https://github.com/microsoft/MIEngine/issues/1391)
2620
* Update clang-tidy and clang-format from 22.1.1 to 22.1.3 (bug fixes).
2721
* Fix a bug with semantic colorization of operators.
2822

23+
## Version 1.31.5: April 20, 2026
24+
### Bug Fixes
25+
* Fix `Reinstalling the Extension.md` not being found. [#14389](https://github.com/microsoft/vscode-cpptools/issues/14389)
26+
* Fix the `C/C++ DevTools` extension language service tools not working after the `C/C++` extension updates via `Restart Extensions`. [#14392](https://github.com/microsoft/vscode-cpptools/issues/14392)
27+
2928
## Version 1.31.4: March 31, 2026
3029
### Bug Fix
3130
* Debugging cpptools and cpptools-srv processes on macOS (to get call stacks) is now blocked when SIP is enabled (due to a potential security issue).

Extension/package.json

Lines changed: 1 addition & 1 deletion
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.32.1-main",
5+
"version": "1.32.2-main",
66
"publisher": "ms-vscode",
77
"icon": "LanguageCCPP_color_128x.png",
88
"readme": "README.md",

Extension/src/LanguageServer/client.ts

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,12 @@ interface ConfigStateReceived {
104104
timeout: boolean;
105105
}
106106

107+
interface PendingTagParsingCall {
108+
promise: ManualPromise<boolean>;
109+
timer: NodeJS.Timeout;
110+
cancellationListener: vscode.Disposable;
111+
}
112+
107113
let workspaceHash: string = "";
108114

109115
let workspaceDisposables: vscode.Disposable[] = [];
@@ -805,6 +811,7 @@ export interface Client {
805811
setCurrentConfigName(configurationName: string): Thenable<void>;
806812
getCurrentConfigName(): Thenable<string | undefined>;
807813
getCurrentConfigCustomVariable(variableName: string): Thenable<string>;
814+
waitForTagParsing(timeout: number, token: vscode.CancellationToken): Promise<boolean>;
808815
getVcpkgInstalled(): Thenable<boolean>;
809816
getVcpkgEnabled(): Thenable<boolean>;
810817
getCurrentCompilerPathAndArgs(): Thenable<util.CompilerPathAndArgs | undefined>;
@@ -919,6 +926,7 @@ export class DefaultClient implements Client {
919926

920927
private configStateReceived: ConfigStateReceived = { compilers: false, compileCommands: false, configProviders: undefined, timeout: false };
921928
private showConfigureIntelliSenseButton: boolean = false;
929+
private pendingTagParsingCalls: PendingTagParsingCall[] = [];
922930

923931
/** A queue of asynchronous tasks that need to be processed befofe ready is considered active. */
924932
private static queue = new Array<[ManualPromise<unknown>, () => Promise<unknown>] | [ManualPromise<unknown>]>();
@@ -1008,6 +1016,62 @@ export class DefaultClient implements Client {
10081016
};
10091017
}
10101018

1019+
// If there are any pending calls that were waiting for tag parsing to complete, we can resolve them since it's finished. If there are no pending calls, this does nothing.
1020+
private resolvePendingTagParsingCallsIfReady(): void {
1021+
if (!this.pendingTagParsingCalls.length || this.IsTagParsing) {
1022+
return;
1023+
}
1024+
1025+
const pendingCalls: PendingTagParsingCall[] = this.pendingTagParsingCalls;
1026+
this.pendingTagParsingCalls = [];
1027+
pendingCalls.forEach(pendingCall => {
1028+
if (pendingCall.timer) {
1029+
clearTimeout(pendingCall.timer);
1030+
}
1031+
pendingCall.cancellationListener.dispose();
1032+
pendingCall.promise.resolve(true);
1033+
});
1034+
}
1035+
1036+
public async waitForTagParsing(timeout: number, token: vscode.CancellationToken): Promise<boolean> {
1037+
// On initialization, the client has UI bools all set to false which could cause an early return. We want to ensure it's ready first.
1038+
await this.ready;
1039+
1040+
if (!this.IsTagParsing) {
1041+
return true;
1042+
}
1043+
1044+
if (token.isCancellationRequested) {
1045+
throw new vscode.CancellationError();
1046+
}
1047+
1048+
const pendingCall: PendingTagParsingCall = {
1049+
promise: new ManualPromise<boolean>(),
1050+
1051+
timer: global.setTimeout(() => {
1052+
const index: number = this.pendingTagParsingCalls.indexOf(pendingCall);
1053+
if (index !== -1) {
1054+
this.pendingTagParsingCalls.splice(index, 1);
1055+
}
1056+
pendingCall.cancellationListener.dispose();
1057+
pendingCall.promise.resolve(false);
1058+
}, timeout),
1059+
1060+
cancellationListener: token.onCancellationRequested(() => {
1061+
const index: number = this.pendingTagParsingCalls.indexOf(pendingCall);
1062+
if (index !== -1) {
1063+
this.pendingTagParsingCalls.splice(index, 1);
1064+
}
1065+
clearTimeout(pendingCall.timer);
1066+
pendingCall.cancellationListener.dispose();
1067+
pendingCall.promise.reject(new vscode.CancellationError());
1068+
})
1069+
};
1070+
1071+
this.pendingTagParsingCalls.push(pendingCall);
1072+
return pendingCall.promise;
1073+
}
1074+
10111075
private getName(workspaceFolder?: vscode.WorkspaceFolder): string {
10121076
return workspaceFolder ? workspaceFolder.name : "untitled";
10131077
}
@@ -2893,6 +2957,8 @@ export class DefaultClient implements Client {
28932957
} else if (message.includes("/")) {
28942958
this.lastInvokedLspMessage = message;
28952959
}
2960+
2961+
this.resolvePendingTagParsingCallsIfReady();
28962962
}
28972963

28982964
private updateTagParseStatus(tagParseStatus: TagParseStatus): void {
@@ -4208,6 +4274,14 @@ export class DefaultClient implements Client {
42084274
}
42094275

42104276
public dispose(): void {
4277+
this.pendingTagParsingCalls.forEach(pendingCall => {
4278+
if (pendingCall.timer) {
4279+
clearTimeout(pendingCall.timer);
4280+
}
4281+
pendingCall.cancellationListener.dispose();
4282+
pendingCall.promise.resolve(false);
4283+
});
4284+
this.pendingTagParsingCalls = [];
42114285
this.disposables.forEach((d) => d.dispose());
42124286
this.disposables = [];
42134287
if (this.documentFormattingProviderDisposable) {
@@ -4360,6 +4434,7 @@ class NullClient implements Client {
43604434
setCurrentConfigName(configurationName: string): Thenable<void> { return Promise.resolve(); }
43614435
getCurrentConfigName(): Thenable<string> { return Promise.resolve(""); }
43624436
getCurrentConfigCustomVariable(variableName: string): Thenable<string> { return Promise.resolve(""); }
4437+
waitForTagParsing(timeout: number, token: vscode.CancellationToken): Promise<boolean> { return Promise.resolve(true); }
43634438
getVcpkgInstalled(): Thenable<boolean> { return Promise.resolve(false); }
43644439
getVcpkgEnabled(): Thenable<boolean> { return Promise.resolve(false); }
43654440
getCurrentCompilerPathAndArgs(): Thenable<util.CompilerPathAndArgs | undefined> { return Promise.resolve(undefined); }

Extension/src/LanguageServer/extension.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -430,6 +430,7 @@ export async function registerCommands(enabled: boolean): Promise<void> {
430430
commandDisposables.push(vscode.commands.registerCommand('cpptools.activeConfigName', enabled ? onGetActiveConfigName : onDisabledCommand));
431431
commandDisposables.push(vscode.commands.registerCommand('cpptools.activeConfigCustomVariable', enabled ? onGetActiveConfigCustomVariable : onDisabledCommand));
432432
commandDisposables.push(vscode.commands.registerCommand('cpptools.setActiveConfigName', enabled ? onSetActiveConfigName : onDisabledCommand));
433+
commandDisposables.push(vscode.commands.registerCommand('cpptools.waitForTagParsing', enabled ? onWaitForTagParsing : () => true));
433434
commandDisposables.push(vscode.commands.registerCommand('C_Cpp.RestartIntelliSenseForFile', enabled ? onRestartIntelliSenseForFile : onDisabledCommand));
434435
commandDisposables.push(vscode.commands.registerCommand('C_Cpp.GenerateDoxygenComment', enabled ? onGenerateDoxygenComment : onDisabledCommand));
435436
commandDisposables.push(vscode.commands.registerCommand('C_Cpp.CreateDeclarationOrDefinition', enabled ? onCreateDeclarationOrDefinition : onDisabledCommand));
@@ -977,6 +978,10 @@ function onGetActiveConfigCustomVariable(variableName: string): Thenable<string>
977978
return clients.ActiveClient.getCurrentConfigCustomVariable(variableName);
978979
}
979980

981+
async function onWaitForTagParsing(timeout: number, token: vscode.CancellationToken): Promise<boolean> {
982+
return clients.getDefaultClient().waitForTagParsing(timeout, token);
983+
}
984+
980985
function onLogDiagnostics(): Promise<void> {
981986
return clients.ActiveClient.logDiagnostics();
982987
}

0 commit comments

Comments
 (0)