Skip to content

Commit a1487e5

Browse files
authored
Merge pull request #12185 from microsoft/main
Merge for 1.20.1
2 parents 6f19496 + 4650cfe commit a1487e5

File tree

7 files changed

+153
-15
lines changed

7 files changed

+153
-15
lines changed

Build/cg/cg.yml

+95
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
name: $(date:yyyyMMdd)$(rev:.r)
2+
trigger:
3+
branches:
4+
include:
5+
- main
6+
- release
7+
8+
schedules:
9+
- cron: 30 5 * * 0
10+
branches:
11+
include:
12+
- main
13+
always: true
14+
15+
resources:
16+
repositories:
17+
- repository: MicroBuildTemplate
18+
type: git
19+
name: 1ESPipelineTemplates/MicroBuildTemplate
20+
ref: refs/tags/release
21+
22+
extends:
23+
template: azure-pipelines/MicroBuild.1ES.Official.yml@MicroBuildTemplate
24+
parameters:
25+
pool:
26+
name: AzurePipelines-EO
27+
image: AzurePipelinesWindows2022compliantGPT
28+
os: windows
29+
sdl:
30+
sourceAnalysisPool:
31+
name: AzurePipelines-EO
32+
image: AzurePipelinesWindows2022compliantGPT
33+
os: windows
34+
tsa:
35+
enabled: false
36+
featureFlags:
37+
autoBaseline: false
38+
39+
stages:
40+
- stage: build
41+
jobs:
42+
- job: Phase_1
43+
displayName: Build cpptools.vsix
44+
timeoutInMinutes: 60
45+
cancelTimeoutInMinutes: 1
46+
templateContext:
47+
outputs:
48+
- output: pipelineArtifact
49+
displayName: 'cpptools.vsix'
50+
condition: succeeded()
51+
targetPath: $(Build.ArtifactStagingDirectory)\Extension
52+
artifactName: cpptools.vsix
53+
54+
steps:
55+
- checkout: self
56+
57+
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@3
58+
displayName: Use Yarn 1.x
59+
60+
- task: UseNode@1
61+
displayName: Use Node 16.x
62+
inputs:
63+
version: 16.x
64+
65+
- task: CmdLine@2
66+
displayName: Delete .npmrc if it exists
67+
inputs:
68+
script: IF EXIST %SYSTEMDRIVE%\Users\%USERNAME%\.npmrc del %SYSTEMDRIVE%\Users\%USERNAME%\.npmrc
69+
70+
- task: Npm@0
71+
name: NpmInstall_2
72+
displayName: Install vsce
73+
inputs:
74+
arguments: --global @vscode/vsce
75+
76+
- task: CmdLine@1
77+
name: ProcessRunner_11
78+
displayName: Create Extension Staging Directory
79+
inputs:
80+
filename: mkdir
81+
arguments: $(Build.ArtifactStagingDirectory)\Extension
82+
83+
- task: CmdLine@1
84+
name: ProcessRunner_12
85+
displayName: Run VSCE to package vsix
86+
inputs:
87+
filename: vsce
88+
arguments: package --yarn -o $(Build.ArtifactStagingDirectory)\Extension\cpptools.vsix
89+
workingFolder: $(Build.SourcesDirectory)\Extension
90+
91+
- task: Npm@0
92+
displayName: Uninstall vsce
93+
inputs:
94+
command: uninstall
95+
arguments: --global @vscode/vsce

Extension/CHANGELOG.md

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
11
# C/C++ for Visual Studio Code Changelog
22

3+
## Version 1.20.1: April 9, 2024
4+
### Bug Fixes
5+
* Fix 'Add #include' code actions for code scoped by a namespace or class. [#11541](https://github.com/microsoft/vscode-cpptools/issues/11541)
6+
* Fix the IntelliSense server not starting when a completion, signature help, or document highlight occurs from external commands. [#12143](https://github.com/microsoft/vscode-cpptools/issues/12143)
7+
* Fix the IntelliSense configuration not falling back to the `c_cpp_properties.json` configuration for a file not handled by a configuration provider. [#12144](https://github.com/microsoft/vscode-cpptools/issues/12144)
8+
39
## Version 1.20.0: March 26, 2024
410
### Enhancements
511
* Add support for C++ modules IFC version 0.43. [#10843](https://github.com/microsoft/vscode-cpptools/issues/10843)
612
* Add support for `${userHome}` in `c_cpp_properties.json`. [#11756](https://github.com/microsoft/vscode-cpptools/issues/11756)
713
* Reduce the default max workspace symbol search results and add `C_Cpp.maxSymbolSearchResults`. [PR #12131](https://github.com/microsoft/vscode-cpptools/pull/12131)
8-
* Update to `clang-format`/`clang-tidy` 18.1.2. [PR #12135](https://github.com/microsoft/vscode-cpptools/pull/12135)
14+
* Update `clang-format`/`clang-tidy` to 18.1.2. [PR #12135](https://github.com/microsoft/vscode-cpptools/pull/12135)
915
* Update IntelliSense engine.
1016

1117
### Bug Fixes

Extension/ThirdPartyNotices.txt

+35-2
Original file line numberDiff line numberDiff line change
@@ -1793,7 +1793,7 @@ THE SOFTWARE.
17931793

17941794
---------------------------------------------------------
17951795

1796-
follow-redirects 1.15.5 - MIT
1796+
follow-redirects 1.15.6 - MIT
17971797
https://github.com/follow-redirects/follow-redirects
17981798

17991799
Copyright 2014-present Olivier Lalonde <[email protected]> , James Talmage <[email protected]> , Ruben Verborgh
@@ -3003,9 +3003,10 @@ The notices below are from non-npm sources.
30033003
- ANTLR (http://www.antlr2.org/)
30043004
- C++11 Sublime Text Snippets (https://github.com/Rapptz/cpp-sublime-snippet)
30053005
- Clang (https://clang.llvm.org/)
3006-
- gcc-9/libgcc (https://packages.ubuntu.com/focal/gcc-9-base)
3006+
- gcc-11/libgcc (https://packages.ubuntu.com/jammy/gcc-11-base)
30073007
- Guidelines Support Library (https://github.com/Microsoft/GSL)
30083008
- libc++ (https://libcxx.llvm.org/index.html)
3009+
- libexecinfo (https://github.com/ronchaine/libexecinfo)
30093010
- libuv (https://github.com/libuv/libuv)
30103011
- LLDB (https://lldb.llvm.org/)
30113012
- LLVM (http://llvm.org/)
@@ -3850,6 +3851,38 @@ obstacle to adoption, that text has been removed.
38503851
=========================================
38513852
END OF musl NOTICES AND INFORMATION
38523853

3854+
%% libexecinfo NOTICES AND INFORMATION BEGIN HERE
3855+
=========================================
3856+
libexecinfo is licensed for use as follows:
3857+
3858+
====
3859+
Copyright (c) 2003 Maxim Sobolev <[email protected]>
3860+
All rights reserved.
3861+
*
3862+
Redistribution and use in source and binary forms, with or without
3863+
modification, are permitted provided that the following conditions
3864+
are met:
3865+
1. Redistributions of source code must retain the above copyright
3866+
notice, this list of conditions and the following disclaimer.
3867+
2. Redistributions in binary form must reproduce the above copyright
3868+
notice, this list of conditions and the following disclaimer in the
3869+
documentation and/or other materials provided with the distribution.
3870+
*
3871+
THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
3872+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
3873+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
3874+
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
3875+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
3876+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
3877+
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
3878+
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
3879+
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
3880+
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
3881+
SUCH DAMAGE.
3882+
3883+
=========================================
3884+
END OF libexecinfo NOTICES AND INFORMATION
3885+
38533886
%% libuv NOTICES AND INFORMATION BEGIN HERE
38543887
=========================================
38553888
libuv is licensed for use as follows:

Extension/package.json

+1-1
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.20.0-main",
5+
"version": "1.20.1-main",
66
"publisher": "ms-vscode",
77
"icon": "LanguageCCPP_color_128x.png",
88
"readme": "README.md",

Extension/src/LanguageServer/client.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1489,8 +1489,8 @@ export class DefaultClient implements Client {
14891489
}
14901490
const serverName: string = this.getName(this.rootFolder);
14911491
const serverOptions: ServerOptions = {
1492-
run: { command: serverModule, options: { detached: false } },
1493-
debug: { command: serverModule, args: [serverName], options: { detached: true } }
1492+
run: { command: serverModule, options: { detached: false, cwd: util.getExtensionFilePath("bin") } },
1493+
debug: { command: serverModule, args: [serverName], options: { detached: true, cwd: util.getExtensionFilePath("bin") } }
14941494
};
14951495

14961496
// The IntelliSense process should automatically detect when AutoPCH is

Extension/src/LanguageServer/extension.ts

+11-9
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,6 @@ function sendActivationTelemetry(): void {
144144
* activate: set up the extension for language services
145145
*/
146146
export async function activate(): Promise<void> {
147-
148147
sendActivationTelemetry();
149148
const checkForConflictingExtensions: PersistentState<boolean> = new PersistentState<boolean>("CPP." + util.packageJson.version + ".checkForConflictingExtensions", true);
150149
if (checkForConflictingExtensions.Value) {
@@ -960,7 +959,7 @@ function reportMacCrashes(): void {
960959
}
961960

962961
export function watchForCrashes(crashDirectory: string): void {
963-
if (process.platform !== "win32") {
962+
if (process.platform !== "win32" && (process.platform === "darwin" || os.arch() === "x64")) {
964963
prevCrashFile = "";
965964
fs.stat(crashDirectory, (err) => {
966965
const crashObject: Record<string, string> = {};
@@ -1125,9 +1124,9 @@ async function handleCrashFileRead(crashDirectory: string, crashFile: string, er
11251124
data = crashFile + "\n";
11261125
const filtPath: string | null = which.sync("c++filt", { nothrow: true });
11271126
const isMac: boolean = process.platform === "darwin";
1128-
const startStr: string = isMac ? " _" : "(";
1129-
const offsetStr: string = isMac ? " + " : "+0x";
1130-
const endOffsetStr: string = isMac ? " " : ")";
1127+
const startStr: string = isMac ? " _" : "<";
1128+
const offsetStr: string = isMac ? " + " : "+";
1129+
const endOffsetStr: string = isMac ? " " : " <";
11311130
const dotStr: string = "…";
11321131
data += lines[0]; // signal type
11331132
for (let lineNum: number = 2; lineNum < lines.length - 3; ++lineNum) { // skip first/last lines
@@ -1137,7 +1136,7 @@ async function handleCrashFileRead(crashDirectory: string, crashFile: string, er
11371136
}
11381137
const line: string = lines[lineNum];
11391138
const startPos: number = line.indexOf(startStr);
1140-
if (startPos === -1 || line[startPos + 1] === "+") {
1139+
if (startPos === -1 || line[startPos + (isMac ? 1 : 4)] === "+") {
11411140
data += dotStr;
11421141
const startAddressPos: number = line.indexOf("0x");
11431142
const endAddressPos: number = line.indexOf(endOffsetStr, startAddressPos + 2);
@@ -1156,7 +1155,10 @@ async function handleCrashFileRead(crashDirectory: string, crashFile: string, er
11561155
const startPos2: number = startPos + 1;
11571156
let funcStr: string = line.substring(startPos2, offsetPos);
11581157
if (filtPath) {
1159-
const ret: util.ProcessReturnType | undefined = await util.spawnChildProcess(filtPath, [funcStr], undefined, true).catch(logAndReturn.undefined);
1158+
let ret: util.ProcessReturnType | undefined = await util.spawnChildProcess(filtPath, ["--no-strip-underscore", funcStr], undefined, true).catch(logAndReturn.undefined);
1159+
if (ret?.output === funcStr) {
1160+
ret = await util.spawnChildProcess(filtPath, [funcStr], undefined, true).catch(logAndReturn.undefined);
1161+
}
11601162
if (ret !== undefined) {
11611163
funcStr = ret.output;
11621164
funcStr = funcStr.replace(/std::(?:__1|__cxx11)/g, "std"); // simplify std namespaces.
@@ -1179,9 +1181,9 @@ async function handleCrashFileRead(crashDirectory: string, crashFile: string, er
11791181
}
11801182
addressData += `${line.substring(startAddressPos, startPos)}`;
11811183
} else {
1182-
const endPos: number = line.indexOf(")", offsetPos2);
1184+
const endPos: number = line.indexOf(">", offsetPos2);
11831185
if (endPos === -1) {
1184-
data += "<Missing )>";
1186+
data += "<Missing > >";
11851187
continue; // unexpected
11861188
}
11871189
data += line.substring(offsetPos2, endPos);

Extension/src/main.ts

+2
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,8 @@ async function makeBinariesExecutable(): Promise<void> {
188188
];
189189
oldMacBinaries.forEach(binary => promises.push(util.allowExecution(util.getExtensionFilePath(binary))));
190190
}
191+
} else if (os.arch() === "x64") {
192+
promises.push(util.allowExecution(util.getExtensionFilePath("./bin/libc.so")));
191193
}
192194
}
193195
await Promise.all(promises);

0 commit comments

Comments
 (0)