Skip to content

Commit 36e3639

Browse files
authored
Merge branch 'main' into seanmcm/addCrashLogs
2 parents 64aeb98 + 69393c4 commit 36e3639

File tree

6 files changed

+103
-11
lines changed

6 files changed

+103
-11
lines changed

Extension/CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
# C/C++ for Visual Studio Code Changelog
22

3-
## Version 1.24.0: Febrary 10, 2025
3+
## Version 1.24.0: Febrary 11, 2025
44
### New Feature
55
* Add experimental support for Copilot descriptions in hover tooltips, controlled by the `C_Cpp.copilotHover` setting. This feature is currently off by default and may be subject to A/B experimentation. To opt-out of Copilot Hover experiments, set `C_Cpp.copilotHover` to `disabled`.
66

77
### Enhancement
88
* Improve/fix the switch header/source feature. [#2635](https://github.com/microsoft/vscode-cpptools/issues/2635)
99

1010
### Bug Fixes
11+
* Fix an IntelliSense crash in `build_sections`. [#12666](https://github.com/microsoft/vscode-cpptools/issues/12666), [#12956](https://github.com/microsoft/vscode-cpptools/issues/12956)
1112
* Fix a bug in which hundreds of custom configuration requests could be sent on startup before the configuration provider has registered. [#13166](https://github.com/microsoft/vscode-cpptools/issues/13166)
1213
* Fix handling of the `-framework` compiler argument. [#13204](https://github.com/microsoft/vscode-cpptools/issues/13204)
1314
* Fix a potential race between didChange and didOpen. [PR #13209](https://github.com/microsoft/vscode-cpptools/pull/13209)

Extension/ThirdPartyNotices.txt

Lines changed: 88 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1102,6 +1102,26 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
11021102
SOFTWARE.
11031103

11041104

1105+
---------------------------------------------------------
1106+
1107+
---------------------------------------------------------
1108+
1109+
@types/node 22.7.4 - MIT
1110+
https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node
1111+
1112+
Copyright Node.js contributors
1113+
Copyright (c) Microsoft Corporation
1114+
1115+
MIT License
1116+
1117+
Copyright (c) <year> <copyright holders>
1118+
1119+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
1120+
1121+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
1122+
1123+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1124+
11051125
---------------------------------------------------------
11061126

11071127
---------------------------------------------------------
@@ -1142,8 +1162,8 @@ SOFTWARE.
11421162
@xmldom/xmldom 0.8.10 - MIT
11431163
https://github.com/xmldom/xmldom
11441164

1145-
Copyright 2012 - 2017 jindw <[email protected]> and other contributors
11461165
Copyright 2019 - present Christopher J. Brody and other contributors
1166+
Copyright 2012 - 2017 @jindw <[email protected]> and other contributors
11471167

11481168
Copyright 2019 - present Christopher J. Brody and other contributors, as listed in: https://github.com/xmldom/xmldom/graphs/contributors
11491169
Copyright 2012 - 2017 @jindw <[email protected]> and other contributors, as listed in: https://github.com/jindw/xmldom/graphs/contributors
@@ -2423,6 +2443,28 @@ The above copyright notice and this permission notice shall be included in all c
24232443
THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24242444

24252445

2446+
---------------------------------------------------------
2447+
2448+
---------------------------------------------------------
2449+
2450+
vscode-jsonrpc 8.2.0 - MIT
2451+
https://github.com/Microsoft/vscode-languageserver-node#readme
2452+
2453+
Copyright (c) Microsoft Corporation
2454+
2455+
Copyright (c) Microsoft Corporation
2456+
2457+
All rights reserved.
2458+
2459+
MIT License
2460+
2461+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
2462+
2463+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
2464+
2465+
THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
2466+
2467+
24262468
---------------------------------------------------------
24272469

24282470
---------------------------------------------------------
@@ -2468,6 +2510,29 @@ The above copyright notice and this permission notice shall be included in all c
24682510
THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24692511

24702512

2513+
---------------------------------------------------------
2514+
2515+
---------------------------------------------------------
2516+
2517+
vscode-languageserver-protocol 3.17.5 - MIT
2518+
https://github.com/Microsoft/vscode-languageserver-node#readme
2519+
2520+
Copyright (c) Microsoft Corporation
2521+
Copyright (c) TypeFox, Microsoft and others
2522+
2523+
Copyright (c) Microsoft Corporation
2524+
2525+
All rights reserved.
2526+
2527+
MIT License
2528+
2529+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
2530+
2531+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
2532+
2533+
THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
2534+
2535+
24712536
---------------------------------------------------------
24722537

24732538
---------------------------------------------------------
@@ -2490,6 +2555,28 @@ The above copyright notice and this permission notice shall be included in all c
24902555
THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24912556

24922557

2558+
---------------------------------------------------------
2559+
2560+
---------------------------------------------------------
2561+
2562+
vscode-languageserver-types 3.17.5 - MIT
2563+
https://github.com/Microsoft/vscode-languageserver-node#readme
2564+
2565+
Copyright (c) Microsoft Corporation
2566+
2567+
Copyright (c) Microsoft Corporation
2568+
2569+
All rights reserved.
2570+
2571+
MIT License
2572+
2573+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
2574+
2575+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
2576+
2577+
THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
2578+
2579+
24932580
---------------------------------------------------------
24942581

24952582
---------------------------------------------------------

Extension/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6590,7 +6590,7 @@
65906590
"xml2js": "^0.6.2"
65916591
},
65926592
"dependencies": {
6593-
"@github/copilot-language-server": "^1.253.0",
6593+
"@github/copilot-language-server": "^1.266.0",
65946594
"@vscode/extension-telemetry": "^0.9.6",
65956595
"chokidar": "^3.6.0",
65966596
"comment-json": "^4.2.3",

Extension/src/LanguageServer/client.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1340,6 +1340,9 @@ export class DefaultClient implements Client {
13401340
this.copilotHoverProvider = new CopilotHoverProvider(this);
13411341
this.disposables.push(vscode.languages.registerHoverProvider(util.documentSelector, this.copilotHoverProvider));
13421342
}
1343+
if (settings.copilotHover !== this.currentCopilotHoverEnabled.Value) {
1344+
this.currentCopilotHoverEnabled.Value = settings.copilotHover;
1345+
}
13431346
this.disposables.push(vscode.languages.registerHoverProvider(util.documentSelector, this.hoverProvider));
13441347
this.disposables.push(vscode.languages.registerInlayHintsProvider(util.documentSelector, this.inlayHintsProvider));
13451348
this.disposables.push(vscode.languages.registerRenameProvider(util.documentSelector, new RenameProvider(this)));

Extension/src/LanguageServer/copilotCompletionContextProvider.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,8 @@ export class CopilotCompletionContextProvider implements ContextResolver<CodeSni
7272
private static readonly providerId = 'ms-vscode.cpptools';
7373
private readonly completionContextCache: Map<string, CacheEntry> = new Map();
7474
private static readonly defaultCppDocumentSelector: DocumentSelector = [{ language: 'cpp' }, { language: 'c' }, { language: 'cuda-cpp' }];
75-
private static readonly defaultTimeBudgetFactor: number = 0.5;
75+
// A percentage expressed as an integer number, i.e. 50 means 50%.
76+
private static readonly defaultTimeBudgetFactor: number = 50;
7677
private static readonly defaultMaxCaretDistance = 4096;
7778
private completionContextCancellation = new vscode.CancellationTokenSource();
7879
private contextProviderDisposable: vscode.Disposable | undefined;
@@ -177,7 +178,7 @@ export class CopilotCompletionContextProvider implements ContextResolver<CodeSni
177178
private async fetchTimeBudgetFactor(context: ResolveRequest): Promise<number> {
178179
try {
179180
const budgetFactor = context.activeExperiments.get(CopilotCompletionContextProvider.CppCodeSnippetsTimeBudgetFactor);
180-
return (budgetFactor as number) ?? CopilotCompletionContextProvider.defaultTimeBudgetFactor;
181+
return ((budgetFactor as number) ?? CopilotCompletionContextProvider.defaultTimeBudgetFactor) / 100.0;
181182
} catch (e) {
182183
console.warn(`fetchTimeBudgetFactor(): error fetching ${CopilotCompletionContextProvider.CppCodeSnippetsTimeBudgetFactor}, using default: `, e);
183184
return CopilotCompletionContextProvider.defaultTimeBudgetFactor;
@@ -186,8 +187,8 @@ export class CopilotCompletionContextProvider implements ContextResolver<CodeSni
186187

187188
private async fetchMaxDistanceToCaret(context: ResolveRequest): Promise<number> {
188189
try {
189-
const budgetFactor = context.activeExperiments.get(CopilotCompletionContextProvider.CppCodeSnippetsMaxDistanceToCaret);
190-
return (budgetFactor as number) ?? CopilotCompletionContextProvider.defaultMaxCaretDistance;
190+
const maxDistance = context.activeExperiments.get(CopilotCompletionContextProvider.CppCodeSnippetsMaxDistanceToCaret);
191+
return (maxDistance as number) ?? CopilotCompletionContextProvider.defaultMaxCaretDistance;
191192
} catch (e) {
192193
console.warn(`fetchMaxDistanceToCaret(): error fetching ${CopilotCompletionContextProvider.CppCodeSnippetsMaxDistanceToCaret}, using default: `, e);
193194
return CopilotCompletionContextProvider.defaultMaxCaretDistance;

Extension/yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,10 @@
5555
resolved "https://pkgs.dev.azure.com/azure-public/VisualCpp/_packaging/cpp_PublicPackages/npm/registry/@eslint/js/-/js-8.57.1.tgz"
5656
integrity sha1-3mM9s+wu9qPIni8ZA4Bj6KEi4sI=
5757

58-
"@github/copilot-language-server@^1.253.0":
59-
version "1.253.0"
60-
resolved "https://registry.npmjs.org/@github/copilot-language-server/-/copilot-language-server-1.253.0.tgz"
61-
integrity sha512-a7GJLhLCQMcDtFv+V7+Y/7rfUtSrY1n2XIJQtSvvRuuEgmJr8tqoCyq+G7RUURwS7teAQ6QcAgTg0a3tJ/PmsA==
58+
"@github/copilot-language-server@^1.266.0":
59+
version "1.266.0"
60+
resolved "https://pkgs.dev.azure.com/azure-public/VisualCpp/_packaging/cpp_PublicPackages/npm/registry/@github/copilot-language-server/-/copilot-language-server-1.266.0.tgz#fbdbc4843a036e9f5b7c4f88024e17fa4bb8fb1d"
61+
integrity sha1-+9vEhDoDbp9bfE+IAk4X+ku4+x0=
6262
dependencies:
6363
vscode-languageserver-protocol "^3.17.5"
6464

0 commit comments

Comments
 (0)