Skip to content

Commit 7d58a31

Browse files
authored
Merge pull request #13419 from microsoft/main
Merge for 1.24.4
2 parents 2acdea1 + acc2a84 commit 7d58a31

21 files changed

+540
-387
lines changed

.github/actions/package-lock.json

Lines changed: 205 additions & 213 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: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
"author": "",
1212
"dependencies": {
1313
"@actions/core": "^1.9.1",
14-
"@actions/github": "^5.0.3",
15-
"@octokit/rest": "^19.0.3",
14+
"@actions/github": "^6.0.0",
15+
"@octokit/rest": "^21.1.1",
1616
"@slack/web-api": "^6.9.1",
1717
"applicationinsights": "^2.5.1",
1818
"axios": "^1.8.2",

Build/cg/cg.yml

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -84,35 +84,26 @@ extends:
8484
inputs:
8585
version: 18.x
8686

87-
- task: CmdLine@2
87+
- script: IF EXIST %SYSTEMDRIVE%\Users\%USERNAME%\.npmrc del %SYSTEMDRIVE%\Users\%USERNAME%\.npmrc
8888
displayName: Delete .npmrc if it exists
89-
inputs:
90-
script: IF EXIST %SYSTEMDRIVE%\Users\%USERNAME%\.npmrc del %SYSTEMDRIVE%\Users\%USERNAME%\.npmrc
9189

9290
- task: Npm@0
93-
name: NpmInstall_2
9491
displayName: Install vsce
9592
inputs:
9693
arguments: --global @vscode/vsce
9794

98-
- task: CmdLine@1
99-
name: ProcessRunner_11
95+
- script: mkdir $(Build.ArtifactStagingDirectory)\Extension
10096
displayName: Create Extension Staging Directory
101-
inputs:
102-
filename: mkdir
103-
arguments: $(Build.ArtifactStagingDirectory)\Extension
10497

10598
- script: yarn run vsix-prepublish
10699
displayName: Build files
107100
workingDirectory: $(Build.SourcesDirectory)\Extension
108101

109-
- task: CmdLine@1
102+
- script: |
103+
cd $(Build.SourcesDirectory)\Extension
104+
vsce package --yarn -o $(Build.ArtifactStagingDirectory)\Extension\cpptools.vsix
110105
name: ProcessRunner_12
111106
displayName: Run VSCE to package vsix
112-
inputs:
113-
filename: vsce
114-
arguments: package --yarn -o $(Build.ArtifactStagingDirectory)\Extension\cpptools.vsix
115-
workingFolder: $(Build.SourcesDirectory)\Extension
116107
117108
- task: Npm@0
118109
displayName: Uninstall vsce

Build/package/jobs_package_vsix.yml

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,18 +34,13 @@ jobs:
3434
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@3
3535
displayName: Use Yarn 1.x
3636

37-
- task: CmdLine@1
37+
- script: mkdir $(Build.ArtifactStagingDirectory)\vsix
3838
displayName: Create Staging Directory
39-
inputs:
40-
filename: mkdir
41-
arguments: $(Build.ArtifactStagingDirectory)\vsix
4239

43-
- task: CmdLine@1
40+
- script: |
41+
cd $(Build.SourcesDirectory)\${{ parameters.srcDir }}
42+
vsce package -o $(Build.ArtifactStagingDirectory)\vsix\${{ parameters.vsixName }}
4443
displayName: Run VSCE to package vsix
45-
inputs:
46-
filename: vsce
47-
arguments: package -o $(Build.ArtifactStagingDirectory)\vsix\${{ parameters.vsixName }}
48-
workingFolder: $(Build.SourcesDirectory)\${{ parameters.srcDir }}
4944
5045
- task: Npm@0
5146
displayName: Uninstall vsce

Extension/CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
# C/C++ for Visual Studio Code Changelog
22

3+
## Version 1.24.4: March 25, 2025
4+
### Enhancements
5+
* Add a new `recursiveIncludes` property to `c_cpp_properties.json`. [PR #13374](https://github.com/microsoft/vscode-cpptools/pull/13374)
6+
* Turn Copilot hover on by default. [PR #13385](https://github.com/microsoft/vscode-cpptools/pull/13385)
7+
* On shutdown, immediately terminate the IntelliSense process instead of waiting 2 seconds.
8+
9+
### Bug Fixes
10+
* Fix one potential cause of the `get_mangled_function_name` IntelliSense process crash. [#13358](https://github.com/Microsoft/vscode-cpptools/issues/13358)
11+
* Fix Copilot-related logging appearing when it shouldn't. [PR #13388](https://github.com/microsoft/vscode-cpptools/pull/13388)
12+
* Fix relative compiler paths being expanded in `compile_commands.json`. [#13405](https://github.com/microsoft/vscode-cpptools/issues/13405)
13+
* Fix all caps clang-format logging on Windows. [#13406](https://github.com/microsoft/vscode-cpptools/issues/13406)
14+
* Fix an IntelliSense process crash in `handle_function`.
15+
* Avoid reporting an error due to multiple `didOpen` requests after a crash.
16+
317
## Version 1.24.3: March 18, 2025
418
### Enhancements
519
* Add detected test frameworks to the Copilot context when `#cpp` is used. [PR #13285](https://github.com/microsoft/vscode-cpptools/pull/13285)

Extension/c_cpp_properties.schema.json

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,10 @@
180180
"mergeConfigurations": {
181181
"markdownDescription": "Set to `true` to merge include paths, defines, and forced includes with those from a configuration provider.",
182182
"descriptionHint": "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered.",
183-
"type": "boolean"
183+
"type": [
184+
"boolean",
185+
"string"
186+
]
184187
},
185188
"browse": {
186189
"type": "object",
@@ -208,6 +211,42 @@
208211
},
209212
"additionalProperties": false
210213
},
214+
"recursiveIncludes": {
215+
"type": "object",
216+
"properties": {
217+
"reduce": {
218+
"markdownDescription": "Set to `always` to always reduce the number of recursive include paths provided to IntelliSense to only those paths currently referenced by #include statements. This requires first parsing files to determine which headers are included. Set to `never` to provide all recursive include paths to IntelliSense. Reducing the number of recursive include paths may improve IntelliSense performance when a very large number of recursive include paths are involved. Not reducing the number of recursive include paths can improve IntelliSense performance by avoiding the need to parse files to determine which include paths to provide. The `default` value is currently to reduce the number of recursive include paths provided to IntelliSense.",
219+
"descriptionHint": "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered.",
220+
"type": "string",
221+
"enum": [
222+
"always",
223+
"never",
224+
"default",
225+
"${default}"
226+
]
227+
},
228+
"priority": {
229+
"markdownDescription": "The priority of recursive include paths. If set to `beforeSystemIncludes`, the recursive include paths will be searched before system include paths. If set to `afterSystemIncludes`, the recursive include paths will be searched after system include paths. `beforeSystemIncludes` would more closely reflect the search order of a compiler, while `afterSystemIncludes` may result in improved performance.",
230+
"descriptionHint": "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered.",
231+
"type": "string",
232+
"enum": [
233+
"beforeSystemIncludes",
234+
"afterSystemIncludes",
235+
"${default}"
236+
]
237+
},
238+
"order": {
239+
"markdownDescription": "The order in which subdirectories of recursive includes are searched.",
240+
"type": "string",
241+
"enum": [
242+
"depthFirst",
243+
"breadthFirst",
244+
"${default}"
245+
]
246+
}
247+
},
248+
"additionalProperties": false
249+
},
211250
"customConfigurationVariables": {
212251
"type": "object",
213252
"markdownDescription": "Custom variables that can be queried through the command `${cpptools:activeConfigCustomVariable}` to use for the input variables in `launch.json` or `tasks.json`.",

Extension/package.json

Lines changed: 34 additions & 3 deletions
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.24.3-main",
5+
"version": "1.24.4-main",
66
"publisher": "ms-vscode",
77
"icon": "LanguageCCPP_color_128x.png",
88
"readme": "README.md",
@@ -897,6 +897,37 @@
897897
"markdownDescription": "%c_cpp.configuration.default.dotConfig.markdownDescription%",
898898
"scope": "resource"
899899
},
900+
"C_Cpp.default.recursiveIncludes.reduce": {
901+
"type": "string",
902+
"enum": [
903+
"always",
904+
"never",
905+
"default"
906+
],
907+
"default": "default",
908+
"markdownDescription": "%c_cpp.configuration.default.recursiveIncludes.reduce.markdownDescription%",
909+
"scope": "resource"
910+
},
911+
"C_Cpp.default.recursiveIncludes.priority": {
912+
"type": "string",
913+
"enum": [
914+
"beforeSystemIncludes",
915+
"afterSystemIncludes"
916+
],
917+
"default": "afterSystemIncludes",
918+
"markdownDescription": "%c_cpp.configuration.default.recursiveIncludes.priority.markdownDescription%",
919+
"scope": "resource"
920+
},
921+
"C_Cpp.default.recursiveIncludes.order": {
922+
"type": "string",
923+
"enum": [
924+
"depthFirst",
925+
"breadthFirst"
926+
],
927+
"default": "depthFirst",
928+
"markdownDescription": "%c_cpp.configuration.default.recursiveIncludes.order.markdownDescription%",
929+
"scope": "resource"
930+
},
900931
"C_Cpp.configurationWarnings": {
901932
"type": "string",
902933
"enum": [
@@ -3339,7 +3370,8 @@
33393370
"type": "string",
33403371
"enum": [
33413372
"default",
3342-
"disabled"
3373+
"disabled",
3374+
"enabled"
33433375
],
33443376
"default": "default",
33453377
"markdownDescription": "%c_cpp.configuration.copilotHover.markdownDescription%",
@@ -6580,7 +6612,6 @@
65806612
"gulp-typescript": "^5.0.1",
65816613
"minimist": "^1.2.8",
65826614
"mocha": "^10.4.0",
6583-
"parse-git-config": "^3.0.0",
65846615
"parse5": "^7.1.2",
65856616
"parse5-traverse": "^1.0.3",
65866617
"proxyquire": "^2.1.3",

Extension/package.nls.json

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -682,7 +682,7 @@
682682
]
683683
},
684684
"c_cpp.configuration.default.mergeConfigurations.markdownDescription": {
685-
"message": "Set to `true` to merge include paths, defines, and forced includes with those from a configuration provider.",
685+
"message": "The value to use in a configuration if `mergeConfigurations` is either not specified or set to `${default}`.",
686686
"comment": [
687687
"Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered."
688688
]
@@ -724,7 +724,25 @@
724724
]
725725
},
726726
"c_cpp.configuration.default.dotConfig.markdownDescription": {
727-
"message": "The value to use in a configuration if `dotConfig` is not specified, or the value to insert if `${default}` is present in `dotConfig`.",
727+
"message": "The value to use in a configuration if `dotConfig` is either not specified or set to `${default}`.",
728+
"comment": [
729+
"Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered."
730+
]
731+
},
732+
"c_cpp.configuration.default.recursiveIncludes.reduce.markdownDescription": {
733+
"message": "The value to use in a configuration if `recursiveIncludes.reduce` is either not specified or set to `${default}`.",
734+
"comment": [
735+
"Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered."
736+
]
737+
},
738+
"c_cpp.configuration.default.recursiveIncludes.priority.markdownDescription": {
739+
"message": "The value to use in a configuration if `recursiveIncludes.priority` is either not specified or set to `${default}`.",
740+
"comment": [
741+
"Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered."
742+
]
743+
},
744+
"c_cpp.configuration.default.recursiveIncludes.order.markdownDescription": {
745+
"message": "The value to use in a configuration if `recursiveIncludes.order` is either not specified or set to `${default}`.",
728746
"comment": [
729747
"Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered."
730748
]

Extension/src/LanguageServer/Providers/CopilotHoverProvider.ts

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,10 @@ export class CopilotHoverProvider implements vscode.HoverProvider {
3333
await this.client.ready;
3434

3535
const settings: CppSettings = new CppSettings(vscode.workspace.getWorkspaceFolder(document.uri)?.uri);
36-
if (settings.hover === "disabled") {
36+
if (settings.hover === "disabled" ||
37+
settings.copilotHover === "disabled" ||
38+
(settings.copilotHover === "default" && await telemetry.isFlightEnabled("CppCopilotHoverDisabled"))) {
39+
// Either disabled by the user or by the flight.
3740
return undefined;
3841
}
3942

@@ -46,13 +49,6 @@ export class CopilotHoverProvider implements vscode.HoverProvider {
4649
}
4750
}
4851

49-
if (new CppSettings().copilotHover === "default") {
50-
// Check flight to make sure the feature is enabled.
51-
if (!await telemetry.isFlightEnabled("CppCopilotHover")) {
52-
return undefined;
53-
}
54-
}
55-
5652
const newHover = this.isNewHover(document, position);
5753
if (newHover) {
5854
this.reset();

Extension/src/LanguageServer/client.ts

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1332,17 +1332,9 @@ export class DefaultClient implements Client {
13321332
initializedClientCount = 0;
13331333
this.inlayHintsProvider = new InlayHintsProvider();
13341334
this.hoverProvider = new HoverProvider(this);
1335+
this.copilotHoverProvider = new CopilotHoverProvider(this);
13351336

1336-
const settings: CppSettings = new CppSettings();
1337-
this.currentCopilotHoverEnabled = new PersistentWorkspaceState<string>("cpp.copilotHover", settings.copilotHover);
1338-
if (settings.copilotHover !== "disabled") {
1339-
this.copilotHoverProvider = new CopilotHoverProvider(this);
1340-
this.disposables.push(vscode.languages.registerHoverProvider(util.documentSelector, instrument(this.copilotHoverProvider)));
1341-
}
1342-
1343-
if (settings.copilotHover !== this.currentCopilotHoverEnabled.Value) {
1344-
this.currentCopilotHoverEnabled.Value = settings.copilotHover;
1345-
}
1337+
this.disposables.push(vscode.languages.registerHoverProvider(util.documentSelector, instrument(this.copilotHoverProvider)));
13461338
this.disposables.push(vscode.languages.registerHoverProvider(util.documentSelector, instrument(this.hoverProvider)));
13471339
this.disposables.push(vscode.languages.registerInlayHintsProvider(util.documentSelector, instrument(this.inlayHintsProvider)));
13481340
this.disposables.push(vscode.languages.registerRenameProvider(util.documentSelector, instrument(new RenameProvider(this))));
@@ -1362,6 +1354,7 @@ export class DefaultClient implements Client {
13621354
this.codeFoldingProvider = new FoldingRangeProvider(this);
13631355
this.codeFoldingProviderDisposable = vscode.languages.registerFoldingRangeProvider(util.documentSelector, instrument(this.codeFoldingProvider));
13641356

1357+
const settings: CppSettings = new CppSettings();
13651358
if (settings.isEnhancedColorizationEnabled && semanticTokensLegend) {
13661359
this.semanticTokensProvider = instrument(new SemanticTokensProvider());
13671360
this.semanticTokensProviderDisposable = vscode.languages.registerDocumentSemanticTokensProvider(util.documentSelector, this.semanticTokensProvider, semanticTokensLegend);

0 commit comments

Comments
 (0)