Skip to content

Commit 2189c23

Browse files
sean-mcmanusdependabot[bot]lukkabenmcmorranbobbrow
authored
Merge for 1.32.0 (pre-release) (#14375)
* Update changelog and TPN. (#14298) * Update flatted and fast-xml-parser. (#14303) * Bump flatted from 3.4.1 to 3.4.2 in /Extension (#14304) Bumps [flatted](https://github.com/WebReflection/flatted) from 3.4.1 to 3.4.2. - [Commits](WebReflection/flatted@v3.4.1...v3.4.2) --- updated-dependencies: - dependency-name: flatted dependency-version: 3.4.2 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Update changelog with recent fixes. (#14313) * Bump picomatch from 2.3.1 to 2.3.2 in /ExtensionPack (#14318) Bumps [picomatch](https://github.com/micromatch/picomatch) from 2.3.1 to 2.3.2. - [Release notes](https://github.com/micromatch/picomatch/releases) - [Changelog](https://github.com/micromatch/picomatch/blob/master/CHANGELOG.md) - [Commits](micromatch/picomatch@2.3.1...2.3.2) --- updated-dependencies: - dependency-name: picomatch dependency-version: 2.3.2 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump picomatch from 2.3.1 to 2.3.2 in /.github/actions (#14319) Bumps [picomatch](https://github.com/micromatch/picomatch) from 2.3.1 to 2.3.2. - [Release notes](https://github.com/micromatch/picomatch/releases) - [Changelog](https://github.com/micromatch/picomatch/blob/master/CHANGELOG.md) - [Commits](micromatch/picomatch@2.3.1...2.3.2) --- updated-dependencies: - dependency-name: picomatch dependency-version: 2.3.2 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Sean McManus <seanmcm@microsoft.com> * Bump picomatch from 2.3.1 to 2.3.2 in /Themes (#14323) Bumps [picomatch](https://github.com/micromatch/picomatch) from 2.3.1 to 2.3.2. - [Release notes](https://github.com/micromatch/picomatch/releases) - [Changelog](https://github.com/micromatch/picomatch/blob/master/CHANGELOG.md) - [Commits](micromatch/picomatch@2.3.1...2.3.2) --- updated-dependencies: - dependency-name: picomatch dependency-version: 2.3.2 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Update picomatch. (#14324) * Update brace-expansion v5. (#14325) * Bump serialize-javascript from 7.0.4 to 7.0.5 in /.github/actions (#14332) Bumps [serialize-javascript](https://github.com/yahoo/serialize-javascript) from 7.0.4 to 7.0.5. - [Release notes](https://github.com/yahoo/serialize-javascript/releases) - [Commits](yahoo/serialize-javascript@v7.0.4...v7.0.5) --- updated-dependencies: - dependency-name: serialize-javascript dependency-version: 7.0.5 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Update brace-expansion and serialize-javascript. (#14328) * minimize the calls to lm.selectChatModels (#14327) * Update brace-expansion for other folders (#14333) * Update brace-expansion for other folders. * Update changelog for 1.31.4. (#14338) * Bump @xmldom/xmldom from 0.8.11 to 0.8.12 in /Extension (#14340) Bumps [@xmldom/xmldom](https://github.com/xmldom/xmldom) from 0.8.11 to 0.8.12. - [Release notes](https://github.com/xmldom/xmldom/releases) - [Changelog](https://github.com/xmldom/xmldom/blob/master/CHANGELOG.md) - [Commits](xmldom/xmldom@0.8.11...0.8.12) --- updated-dependencies: - dependency-name: "@xmldom/xmldom" dependency-version: 0.8.12 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Update TPN. (#14343) * Update npmrc. (#14346) * Prefer GPT-5-mini for Copilot Hover (#14349) * Update lodash. (#14350) * Fix npx @vscode/vsce. (#14354) * Fix npx @vscode/vsce. * Fix cg.yml. (#14355) * UCRTVersion is not required for a developer environment (#14358) * Update instructions for installing MSVC (#14361) * Bump axios from 1.13.6 to 1.15.0 in /.github/actions (#14365) Bumps [axios](https://github.com/axios/axios) from 1.13.6 to 1.15.0. - [Release notes](https://github.com/axios/axios/releases) - [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md) - [Commits](axios/axios@v1.13.6...v1.15.0) --- updated-dependencies: - dependency-name: axios dependency-version: 1.15.0 dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Add setting doxygen.generateOnCodeAction. (#14342) * Run without debugging (#14351) * Switch to GPT-4o. (#14364) * Fallback to GPT-5.4-mini and cache the model used. (#14369) * Fallback to GPT-5.4-mini and cache the model used. * Add a script to copy language server and debugger binaries to the Extension folder (#14370) * Add internal silent find-all-references command (#14281) * Add internal silent find-all-references command Introduce an internal C_Cpp.FindAllReferences command that issues the existing cpptools/findAllReferences request without joining the workspaceReferences single-flight cancellation path. Extract the shared request and confirmed-location mapping logic from FindAllReferencesProvider so the existing vscode.executeReferenceProvider flow and the new silent command use the same request translation and cancellation handling for server-side cancel responses. Keep the interactive provider behavior unchanged: user-invoked references still cancel prior work, reset reference progress state, and update the ReferencesManager UI. The new command resolves the owning client from the target URI and returns locations without progress UI, preview notifications, or references panel updates, enabling concurrent silent callers such as Copilot. * Add internal quiet definition and call hierarchy commands Align cpptools with the companion changes that now prefer internal C_Cpp.* navigation commands over the generic vscode.* provider commands when running extension-driven symbol queries. Add C_Cpp.GoToDefinition, C_Cpp.PrepareCallHierarchy, C_Cpp.CallHierarchyCallsTo, and C_Cpp.CallHierarchyCallsFrom as internal commands that resolve the owning DefaultClient from the target URI and send requests directly to cpptools without joining the workspaceReferences UI and single-flight cancellation path. Extract shared call hierarchy request and conversion logic from CallHierarchyProvider so the existing interactive provider flow and the new silent commands share the same request translation and server-cancellation handling. Add a dedicated go-to-definition helper that sends the standard definition request through the language client and normalizes both Location and DefinitionLink responses to Location[] so companion callers can consume a stable result shape. Keep interactive behavior unchanged: user-invoked providers continue to use the existing VS Code registrations, progress handling, and workspaceReferences-driven cancellation semantics, while extension callers such as the devtools companion can use the new internal command surface without canceling overlapping work. * Update changelog for 1.32.0. (#14373) * Update changelog for 1.32.0. --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Luca <681992+lukka@users.noreply.github.com> Co-authored-by: Ben McMorran <bemcmorr@microsoft.com> Co-authored-by: Bob Brown <bobbrow@users.noreply.github.com> Co-authored-by: Carson Radtke <carsonradtke@microsoft.com>
2 parents f0d05b9 + 37e3936 commit 2189c23

39 files changed

Lines changed: 1673 additions & 278 deletions

.github/actions/.npmrc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
registry=https://pkgs.dev.azure.com/azure-public/VisualCpp/_packaging/cpp_PublicPackages/npm/registry/
2-
always-auth=true
2+
always-auth=true
3+
# Disable postinstall scripts for supply chain security. Allowlist exceptions with npm trust: https://docs.npmjs.com/cli/v11/commands/npm-trust
4+
ignore-scripts=true

.github/actions/package-lock.json

Lines changed: 34 additions & 31 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/actions/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"@octokit/rest": "^21.1.1",
1616
"@slack/web-api": "^6.9.1",
1717
"applicationinsights": "^2.5.1",
18-
"axios": "^1.13.5",
18+
"axios": "^1.15.0",
1919
"uuid": "^8.3.2"
2020
},
2121
"devDependencies": {
@@ -40,8 +40,8 @@
4040
"yargs": "^17.5.1"
4141
},
4242
"overrides": {
43-
"serialize-javascript": "^7.0.4",
44-
"flatted": "^3.4.1",
45-
"fast-xml-parser": "^5.5.6"
43+
"serialize-javascript": "^7.0.5",
44+
"flatted": "^3.4.2",
45+
"fast-xml-parser": "^5.5.7"
4646
}
4747
}

.github/workflows/job-compile-and-test.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,11 @@ jobs:
6666
# run: yarn test --scenario=MultirootDeadlockTest
6767
# working-directory: Extension
6868

69+
# - name: Run E2E IntelliSense features tests
70+
# if: ${{ inputs.platform == 'windows' }}
71+
# run: yarn test --scenario=RunWithoutDebugging
72+
# working-directory: Extension
73+
6974
# NOTE: For mac/linux run the tests with xvfb-action for UI support.
7075
# Another way to start xvfb https://github.com/microsoft/vscode-test/blob/master/sample/azure-pipelines.yml
7176

@@ -83,3 +88,10 @@ jobs:
8388
# run: yarn test --scenario=MultirootDeadlockTest
8489
# working-directory: Extension
8590

91+
# - name: Run E2E IntelliSense features tests (xvfb)
92+
# if: ${{ inputs.platform == 'mac' || inputs.platform == 'linux' }}
93+
# uses: coactions/setup-xvfb@v1
94+
# with:
95+
# run: yarn test --scenario=RunWithoutDebugging
96+
# working-directory: Extension
97+

Build/cg/cg.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,14 @@ extends:
107107
fi
108108
retryCountOnTaskFailure: 3
109109

110-
- script: |
111-
cd $(Build.SourcesDirectory)\Extension
112-
npx @vscode/vsce@3.7.1 package --yarn -o $(Build.ArtifactStagingDirectory)\Extension\cpptools.vsix
113-
name: ProcessRunner_12
110+
- script: yarn install --frozen-lockfile
111+
displayName: Install dependencies with yarn
112+
workingDirectory: $(Build.SourcesDirectory)\Extension
113+
114+
- script: if not exist node_modules\@vscode\vsce-sign\bin\vsce-sign.exe (echo Missing vsce-sign.exe && exit 1)
115+
displayName: Verify vsce-sign binary exists
116+
workingDirectory: $(Build.SourcesDirectory)\Extension
117+
118+
- script: npx vsce package --yarn -o $(Build.ArtifactStagingDirectory)\Extension\cpptools.vsix
114119
displayName: Run VSCE to package vsix
120+
workingDirectory: $(Build.SourcesDirectory)\Extension

Build/package/jobs_package_vsix.yml

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,24 @@ jobs:
5959
- script: mkdir $(Build.ArtifactStagingDirectory)\vsix
6060
displayName: Create Staging Directory
6161

62-
- script: |
63-
cd $(Build.SourcesDirectory)\${{ parameters.srcDir }}
64-
npx @vscode/vsce@3.7.1 package -o $(Build.ArtifactStagingDirectory)\vsix\${{ parameters.vsixName }}.vsix
62+
- script: npm install --no-save --ignore-scripts=false --include=optional --force @vscode/vsce@3.7.1
63+
displayName: Install vsce
64+
workingDirectory: $(Build.SourcesDirectory)\${{ parameters.srcDir }}
65+
66+
- script: npm rebuild @vscode/vsce-sign --ignore-scripts=false
67+
displayName: Rebuild vsce-sign binary
68+
workingDirectory: $(Build.SourcesDirectory)\${{ parameters.srcDir }}
69+
70+
- script: if not exist node_modules\@vscode\vsce-sign\bin\vsce-sign.exe (echo Missing vsce-sign.exe && exit 1)
71+
displayName: Verify vsce-sign binary exists
72+
workingDirectory: $(Build.SourcesDirectory)\${{ parameters.srcDir }}
73+
74+
- script: npx vsce package -o $(Build.ArtifactStagingDirectory)\vsix\${{ parameters.vsixName }}.vsix
6575
displayName: Run VSCE to package vsix
76+
workingDirectory: $(Build.SourcesDirectory)\${{ parameters.srcDir }}
6677

6778
# sign the vsix
68-
- script: npx @vscode/vsce@3.7.1 generate-manifest -i $(Build.ArtifactStagingDirectory)\vsix\${{ parameters.vsixName }}.vsix -o $(Build.ArtifactStagingDirectory)\vsix\${{ parameters.vsixName }}.manifest
79+
- script: npx vsce generate-manifest -i $(Build.ArtifactStagingDirectory)\vsix\${{ parameters.vsixName }}.vsix -o $(Build.ArtifactStagingDirectory)\vsix\${{ parameters.vsixName }}.manifest
6980
displayName: generate manifest
7081
workingDirectory: $(Build.SourcesDirectory)\${{ parameters.srcDir }}
7182
- script: copy $(Build.ArtifactStagingDirectory)\vsix\${{ parameters.vsixName }}.manifest $(Build.ArtifactStagingDirectory)\vsix\${{ parameters.vsixName }}.signature.p7s

Build/publish/jobs_publish_vsix.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,16 @@ jobs:
3131
$aadToken = az account get-access-token --query accessToken --resource $(AzureGuid) -o tsv
3232
Write-Host "##vso[task.setvariable variable=AAD_TOKEN;issecret=true]$aadToken"
3333
34-
- script: |
35-
npx @vscode/vsce@3.7.1 publish --skip-duplicate -i $(Build.StagingDirectory)\vsix\${{ parameters.vsixName }}.vsix --manifestPath $(Build.StagingDirectory)\vsix\${{ parameters.vsixName }}.manifest --signaturePath $(Build.StagingDirectory)\vsix\${{ parameters.vsixName }}.signature.p7s
34+
- script: npm install --no-save --ignore-scripts=false --include=optional --force @vscode/vsce@3.7.1
35+
displayName: Install vsce
36+
37+
- script: npm rebuild @vscode/vsce-sign --ignore-scripts=false
38+
displayName: Rebuild vsce-sign binary
39+
40+
- script: if not exist node_modules\@vscode\vsce-sign\bin\vsce-sign.exe (echo Missing vsce-sign.exe && exit 1)
41+
displayName: Verify vsce-sign binary exists
42+
43+
- script: npx vsce publish --skip-duplicate -i $(Build.StagingDirectory)\vsix\${{ parameters.vsixName }}.vsix --manifestPath $(Build.StagingDirectory)\vsix\${{ parameters.vsixName }}.manifest --signaturePath $(Build.StagingDirectory)\vsix\${{ parameters.vsixName }}.signature.p7s
3644
displayName: Publish to Marketplace
3745
env:
3846
VSCE_PAT: $(AAD_TOKEN)

Extension/.npmrc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
registry=https://pkgs.dev.azure.com/azure-public/VisualCpp/_packaging/cpp_PublicPackages/npm/registry/
2-
always-auth=true
2+
always-auth=true
3+
# Disable postinstall scripts for supply chain security. Allowlist exceptions with npm trust: https://docs.npmjs.com/cli/v11/commands/npm-trust
4+
ignore-scripts=true
Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
/* --------------------------------------------------------------------------------------------
2+
* Copyright (c) Microsoft Corporation. All Rights Reserved.
3+
* See 'LICENSE' in the project root for license information.
4+
* ------------------------------------------------------------------------------------------ */
5+
6+
import { cp, readdir, rm, stat } from 'node:fs/promises';
7+
import { homedir } from 'node:os';
8+
import { join } from 'node:path';
9+
import { $args, $root, green, heading, note } from './common';
10+
11+
const extensionPrefix = 'ms-vscode.cpptools-';
12+
const foldersToCopy = ['bin', 'debugAdapters', 'LLVM'] as const;
13+
14+
type InstalledExtension = {
15+
path: string;
16+
version: number[];
17+
modified: number;
18+
};
19+
20+
function compareVersions(left: number[], right: number[]): number {
21+
const maxLength: number = Math.max(left.length, right.length);
22+
for (let i = 0; i < maxLength; i++) {
23+
const diff: number = (left[i] ?? 0) - (right[i] ?? 0);
24+
if (diff !== 0) {
25+
return diff;
26+
}
27+
}
28+
return 0;
29+
}
30+
31+
function tryParseVersion(folderName: string): number[] | undefined {
32+
if (!folderName.startsWith(extensionPrefix)) {
33+
return undefined;
34+
}
35+
36+
const versionText: string | undefined = folderName.substring(extensionPrefix.length).match(/^\d+\.\d+\.\d+/)?.[0];
37+
return versionText?.split('.').map(each => Number(each));
38+
}
39+
40+
async function getInstalledExtensions(root: string): Promise<InstalledExtension[]> {
41+
try {
42+
const entries = await readdir(root, { withFileTypes: true });
43+
const candidates: Promise<InstalledExtension | undefined>[] = entries.map(async (entry) => {
44+
if (!entry.isDirectory()) {
45+
return undefined;
46+
}
47+
48+
const version: number[] | undefined = tryParseVersion(entry.name);
49+
if (!version) {
50+
return undefined;
51+
}
52+
53+
const extensionPath: string = join(root, entry.name);
54+
for (const folder of foldersToCopy) {
55+
const info = await stat(join(extensionPath, folder)).catch(() => undefined);
56+
if (!info?.isDirectory()) {
57+
return undefined;
58+
}
59+
}
60+
61+
const info = await stat(extensionPath);
62+
return {
63+
path: extensionPath,
64+
version,
65+
modified: info.mtimeMs
66+
};
67+
});
68+
69+
const found = await Promise.all(candidates);
70+
return found.filter((entry): entry is InstalledExtension => entry !== undefined);
71+
} catch {
72+
return [];
73+
}
74+
}
75+
76+
async function findLatestInstalledExtension(providedPath?: string): Promise<string> {
77+
if (providedPath) {
78+
return providedPath;
79+
}
80+
81+
const searchRoots: string[] = [
82+
join(homedir(), '.vscode', 'extensions'),
83+
join(homedir(), '.vscode-insiders', 'extensions'),
84+
join(homedir(), '.vscode-server', 'extensions'),
85+
join(homedir(), '.vscode-server-insiders', 'extensions')
86+
];
87+
88+
const installed: InstalledExtension[] = (await Promise.all(searchRoots.map(each => getInstalledExtensions(each)))).flat();
89+
if (!installed.length) {
90+
throw new Error(`Unable to find an installed C/C++ extension under ${searchRoots.join(' or ')}.`);
91+
}
92+
93+
installed.sort((left, right) => compareVersions(right.version, left.version) || right.modified - left.modified);
94+
return installed[0].path;
95+
}
96+
97+
export async function main(sourcePath = $args[0]) {
98+
console.log(heading('Copy installed extension binaries'));
99+
100+
const installedExtensionPath: string = await findLatestInstalledExtension(sourcePath);
101+
note(`Using installed extension at ${installedExtensionPath}`);
102+
103+
for (const folder of foldersToCopy) {
104+
const source: string = join(installedExtensionPath, folder);
105+
const destination: string = join($root, folder);
106+
107+
console.log(`Copying ${green(folder)} from ${source}`);
108+
await rm(destination, { recursive: true, force: true });
109+
await cp(source, destination, { recursive: true, force: true });
110+
}
111+
112+
note(`Copied installed binaries into ${$root}`);
113+
}

Extension/.vscode/launch.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,10 @@
9797
"label": "MultirootDeadlockTest ",
9898
"value": "${workspaceFolder}/test/scenarios/MultirootDeadlockTest/assets/test.code-workspace"
9999
},
100+
{
101+
"label": "RunWithoutDebugging ",
102+
"value": "${workspaceFolder}/test/scenarios/RunWithoutDebugging/assets/"
103+
},
100104
{
101105
"label": "SimpleCppProject ",
102106
"value": "${workspaceFolder}/test/scenarios/SimpleCppProject/assets/simpleCppProject.code-workspace"

0 commit comments

Comments
 (0)