Skip to content

Commit

Permalink
Merge pull request #11366 from microsoft/dev/mimatias/r-17-5
Browse files Browse the repository at this point in the history
1.17.5 merge
  • Loading branch information
michelleangela authored Aug 25, 2023
2 parents 28d5715 + 1efac27 commit ef04f02
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 8 deletions.
7 changes: 7 additions & 0 deletions Extension/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
2 changes: 1 addition & 1 deletion Extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<ReferencesParams, ReferencesResult, void> =
new RequestType<ReferencesParams, ReferencesResult, void>('cpptools/findAllReferences');
Expand Down Expand Up @@ -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();
Expand All @@ -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);
Expand All @@ -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;
Expand Down
22 changes: 18 additions & 4 deletions Extension/src/LanguageServer/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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[] = [];
Expand Down

0 comments on commit ef04f02

Please sign in to comment.