From 97363a3e577ef5906321f9bd8d257f14d5df20e6 Mon Sep 17 00:00:00 2001 From: Michelle Matias <38734287+michelleangela@users.noreply.github.com> Date: Wed, 23 Aug 2023 18:03:44 -0700 Subject: [PATCH 1/3] Reset FAR UI if no results returned (#11359) --- .../Providers/findAllReferencesProvider.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Extension/src/LanguageServer/Providers/findAllReferencesProvider.ts b/Extension/src/LanguageServer/Providers/findAllReferencesProvider.ts index 028b0bf2c2..306165d1f3 100644 --- a/Extension/src/LanguageServer/Providers/findAllReferencesProvider.ts +++ b/Extension/src/LanguageServer/Providers/findAllReferencesProvider.ts @@ -5,7 +5,7 @@ import * as vscode from 'vscode'; import { Position, RequestType } from 'vscode-languageclient'; import { DefaultClient, workspaceReferences } from '../client'; -import { CancellationSender, ReferenceInfo, ReferencesParams, ReferencesResult, ReferenceType } from '../references'; +import { CancellationSender, ReferenceInfo, ReferenceType, ReferencesParams, ReferencesResult } from '../references'; const FindAllReferencesRequest: RequestType = new RequestType('cpptools/findAllReferences'); @@ -37,7 +37,6 @@ export class FindAllReferencesProvider implements vscode.ReferenceProvider { const response: ReferencesResult = await this.client.languageClient.sendRequest(FindAllReferencesRequest, params, cancelSource.token); // Reset anything that can be cleared before processing the result. - // Note: ReferencesManager.resetReferences is called in ReferencesManager.showResultsInPanelView workspaceReferences.resetProgressBar(); cancellationTokenListener.dispose(); requestCanceledListener.dispose(); @@ -48,8 +47,9 @@ export class FindAllReferencesProvider implements vscode.ReferenceProvider { // "Cannot destructure property 'range' of 'e.location' as it is undefined." // TODO: per issue https://github.com/microsoft/vscode/issues/169698 // vscode.CancellationError is expected, so when VS Code fixes the error use vscode.CancellationError again. + workspaceReferences.resetReferences(); return undefined; - } else if (response.referenceInfos.length !== 0) { + } else if (response.referenceInfos.length > 0) { response.referenceInfos.forEach((referenceInfo: ReferenceInfo) => { if (referenceInfo.type === ReferenceType.Confirmed) { const uri: vscode.Uri = vscode.Uri.file(referenceInfo.file); @@ -60,7 +60,10 @@ export class FindAllReferencesProvider implements vscode.ReferenceProvider { }); // Display other reference types in panel or channel view. + // Note: ReferencesManager.resetReferences is called in ReferencesManager.showResultsInPanelView workspaceReferences.showResultsInPanelView(response); + } else { + workspaceReferences.resetReferences(); } return locationsResult; From 9299e8df9563b719efa328d47720b3258a71bbbb Mon Sep 17 00:00:00 2001 From: Colen Garoutte-Carson <49173979+Colengms@users.noreply.github.com> Date: Thu, 24 Aug 2023 18:29:52 -0700 Subject: [PATCH 2/3] Disable AutoPCH early on platforms that don't support it (#11362) --- Extension/src/LanguageServer/client.ts | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/Extension/src/LanguageServer/client.ts b/Extension/src/LanguageServer/client.ts index d0caa9d1b9..ccf32694ad 100644 --- a/Extension/src/LanguageServer/client.ts +++ b/Extension/src/LanguageServer/client.ts @@ -1597,13 +1597,27 @@ export class DefaultClient implements Client { debug: { command: serverModule, args: [serverName], options: { detached: true } } }; + // The IntelliSense process should automatically detect when AutoPCH is + // not supportable (on platforms that don't support disabling ASLR/PIE). + // We've had reports of issues on arm64 macOS that are addressed by + // disabling the IntelliSense cache, suggesting fallback does not + // always work as expected. It's actually more efficient to disable + // the cache on platforms we know do not support it. We do that here. let intelliSenseCacheDisabled: boolean = false; if (os.platform() === "darwin") { - const releaseParts: string[] = os.release().split("."); - if (releaseParts.length >= 1) { - // AutoPCH doesn't work for older Mac OS's. - intelliSenseCacheDisabled = parseInt(releaseParts[0]) < 17; + // AutoPCH doesn't work for arm64 macOS. + if (os.arch() === "arm64") { + intelliSenseCacheDisabled = true; + } else { + // AutoPCH doesn't work for older x64 macOS's. + const releaseParts: string[] = os.release().split("."); + if (releaseParts.length >= 1) { + intelliSenseCacheDisabled = parseInt(releaseParts[0]) < 17; + } } + } else { + // AutoPCH doesn't work for arm64 Windows. + intelliSenseCacheDisabled = os.platform() === "win32" && os.arch() === "arm64"; } const localizedStrings: string[] = []; From 1efac2736aada77c14d7e6521b6886d942c9e5d3 Mon Sep 17 00:00:00 2001 From: Michelle Matias <38734287+michelleangela@users.noreply.github.com> Date: Fri, 25 Aug 2023 13:50:14 -0700 Subject: [PATCH 3/3] 1.17.5 changelog (#11363) --- Extension/CHANGELOG.md | 7 +++++++ Extension/package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Extension/CHANGELOG.md b/Extension/CHANGELOG.md index bb778a2c0f..caa50bc568 100644 --- a/Extension/CHANGELOG.md +++ b/Extension/CHANGELOG.md @@ -1,5 +1,12 @@ # C/C++ for Visual Studio Code Changelog +## Version 1.17.5: August 28, 2023 +### Bug Fixes +* Fix a language server crash for platforms that don't support the IntelliSense cache (AutoPCH). [#10789](https://github.com/microsoft/vscode-cpptools/issues/10789) +* Fix markdown in comments when inline/block code is used. [#11322](https://github.com/microsoft/vscode-cpptools/issues/11322) +* Fix Find All References and Call Hierarchy for C files when the cursor is at the end of a symbol. [#11338](https://github.com/microsoft/vscode-cpptools/issues/11338) +* Fix usage of the `/Zc:alignedNew-` MSVC compiler option. [#11350](https://github.com/microsoft/vscode-cpptools/issues/11350) + ## Version 1.17.4: August 21, 2023 ### Bug Fixes * Fix crash recovery for the main extension process. [#11335](https://github.com/microsoft/vscode-cpptools/issues/11335) diff --git a/Extension/package.json b/Extension/package.json index 08fed039b5..85c892cdd7 100644 --- a/Extension/package.json +++ b/Extension/package.json @@ -2,7 +2,7 @@ "name": "cpptools", "displayName": "C/C++", "description": "C/C++ IntelliSense, debugging, and code browsing.", - "version": "1.17.4-main", + "version": "1.17.5-main", "publisher": "ms-vscode", "icon": "LanguageCCPP_color_128x.png", "readme": "README.md",