Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit4254419

Browse files
committed
Merge branch 'main' into seanmcm/1_2_0_insiders3
2 parentsf9ecc9c +fb89c1c commit4254419

File tree

8 files changed

+78
-46
lines changed

8 files changed

+78
-46
lines changed

‎Extension/CHANGELOG.md‎

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

3+
##Version 1.2.0-insiders3: January 26, 2021
4+
###Bug Fixes
5+
* Fix build tasks errors in single file mode.[#4638](https://github.com/microsoft/vscode-cpptools/issues/4638),[#6764](https://github.com/microsoft/vscode-cpptools/issues/6764)
6+
* Fix IntelliSense not supporting`__float128` (and`Q` literals) on x64 Linux.[#6574](https://github.com/microsoft/vscode-cpptools/issues/6574)
7+
* Fix IntelliSense process infinitely restarting after crashing.[#6724](https://github.com/microsoft/vscode-cpptools/issues/6724)
8+
* Fix not being able to attach to cpptools-srv on Mac (to get crash call stacks).[#6736](https://github.com/microsoft/vscode-cpptools/issues/6736)
9+
* Fix compiler querying with compilers that do not output`__STD_VERSION__` by default (gcc <= 4.8.x).[#6792](https://github.com/microsoft/vscode-cpptools/issues/6792)
10+
* Fix document symbols when nested symbols have the same name as a parent.[#6830](https://github.com/microsoft/vscode-cpptools/issues/6830)
11+
* Fix automatic adding of header files to`files.associations` after`Go to Definition` on a`#include`.[#6845](https://github.com/microsoft/vscode-cpptools/issues/6845)
312

413
##Version 1.2.0-insiders2: January 20, 2021
514
###Enhancement
@@ -17,11 +26,11 @@
1726
##Version 1.2.0-insiders: January 14, 2021
1827
###New Features
1928
* Add support for cross-compilation configurations for IntelliSense. For example,`intelliSenseMode` value "linux-gcc-x64" could be used on a Mac host machine.[#1083](https://github.com/microsoft/vscode-cpptools/issues/1083)
20-
* Add`C_Cpp.addNodeAddonIncludePaths` setting to add include paths from`nan` and`node-addon-api` when they're dependencies.[#4854](https://github.com/microsoft/vscode-cpptools/issues/4854)
21-
* Bruce MacNaughton (@bmacnaughton)[PR#67331](https://github.com/microsoft/vscode-cpptools/pull/6731)
2229

2330
###Enhancements
2431
* Show configuration squiggles when configurations with the same name exist.[#3412](https://github.com/microsoft/vscode-cpptools/issues/3412)
32+
* Add`C_Cpp.addNodeAddonIncludePaths` setting to add include paths from`nan` and`node-addon-api` when they're dependencies.[#4854](https://github.com/microsoft/vscode-cpptools/issues/4854)
33+
* Bruce MacNaughton (@bmacnaughton)[PR#67331](https://github.com/microsoft/vscode-cpptools/pull/6731)
2534
* Add command`Generate EditorConfig contents from VC Format settings`.[#6018](https://github.com/microsoft/vscode-cpptools/issues/6018)
2635
* Update to clang-format 11.1.[#6326](https://github.com/microsoft/vscode-cpptools/issues/6326)
2736
* Add clang-format built for Windows ARM64.[#6494](https://github.com/microsoft/vscode-cpptools/issues/6494)
@@ -46,8 +55,9 @@
4655
* Fix`files.exclude` not applying to watched files handlers.[#5141](https://github.com/microsoft/vscode-cpptools/issues/5141)
4756
* Fix code folding incorrectly matching an inactive`}`.[#5429](https://github.com/microsoft/vscode-cpptools/issues/5429)
4857
* Fix IntelliSense Clang version for Apple Clang.[#5500](https://github.com/microsoft/vscode-cpptools/issues/5500)
58+
* Fix hover doc comments not working if there's a selection.[#5635](https://github.com/microsoft/vscode-cpptools/issues/5635),[#6583](https://github.com/microsoft/vscode-cpptools/issues/6583)
4959
* Fix`#include` completion to include results for non-standard header file extensions.[#5698](https://github.com/microsoft/vscode-cpptools/issues/5698)
50-
* Fix clang-format failing due to missing libtinfo5 on Linux ARM/ARM64.[#6774](https://github.com/microsoft/vscode-cpptools/pull/6774)
60+
* Fix clang-format failing due to missing libtinfo5 on Linux ARM/ARM64.[#5958](https://github.com/microsoft/vscode-cpptools/issues/5958)
5161
* Automatically configure to use a custom configuration provider if available and no other configuration exists.[#6150](https://github.com/microsoft/vscode-cpptools/issues/6150)
5262
* Fix not being able to attach to cpptools on Mac (to get crash call stacks).[#6151](https://github.com/microsoft/vscode-cpptools/issues/6151)
5363
* Fix IntelliSense crashing with cl.exe with C++20 and span.[#6251](https://github.com/microsoft/vscode-cpptools/issues/6251)
@@ -67,8 +77,8 @@
6777
* Use "method" instead of "member" for semantic tokens.[#6569](https://github.com/microsoft/vscode-cpptools/issues/6569)
6878
* Fix`__builtin_coro_*` methods not recognized by IntelliSense in gcc mode with`-fcoroutines`.[#6575](https://github.com/microsoft/vscode-cpptools/issues/6575)
6979
* Fix the`else` snippet interfering with entering one line`else` statements.[#6582](https://github.com/microsoft/vscode-cpptools/issues/6582)
70-
* Fix hover doc comments not working if there's a selection.[#6583](https://github.com/microsoft/vscode-cpptools/issues/6583)
7180
* Stop showing an "unknown error" message after canceling the creation of a`launch.json`.[#6608](https://github.com/microsoft/vscode-cpptools/issues/6608)
81+
* Fix potential extension activation delay.[#6630](https://github.com/microsoft/vscode-cpptools/issues/6630)
7282
* Fix the executed command not appearing with cppbuild tasks.[#6647](https://github.com/microsoft/vscode-cpptools/issues/6647)
7383
* Fix`_Debug` not being defined when`/MDd` or`/MTd` are used.[#6690](https://github.com/microsoft/vscode-cpptools/issues/6690)
7484
* Fix infinite IntelliSense processing when C++20, gcc mode, and`-fcoroutines` and used.[#6709](https://github.com/microsoft/vscode-cpptools/issues/6709)

‎Extension/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2450,7 +2450,7 @@
24502450
"mkdirp":"^0.5.1",
24512451
"plist":"^3.0.1",
24522452
"tmp":"^0.1.0",
2453-
"vscode-cpptools":"^4.0.1",
2453+
"vscode-cpptools":"^5.0.0",
24542454
"vscode-extension-telemetry":"^0.1.2",
24552455
"vscode-languageclient":"^5.2.1",
24562456
"vscode-nls":"^4.1.1",

‎Extension/src/LanguageServer/client.ts‎

Lines changed: 22 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1702,7 +1702,7 @@ export class DefaultClient implements Client {
17021702
returnthis.callTaskWithTimeout(provideConfigurationAsync,configProviderTimeout,tokenSource).then(
17031703
(configs?:SourceFileConfigurationItem[]|null)=>{
17041704
if(configs&&configs.length>0){
1705-
this.sendCustomConfigurations(configs);
1705+
this.sendCustomConfigurations(configs,provider.version);
17061706
}
17071707
onFinished();
17081708
},
@@ -2364,19 +2364,24 @@ export class DefaultClient implements Client {
23642364
this.notifyWhenReady(()=>this.languageClient.sendNotification(ChangeCompileCommandsNotification,params));
23652365
}
23662366

2367-
privateisSourceFileConfigurationItem(input:any):input isSourceFileConfigurationItem{
2367+
privateisSourceFileConfigurationItem(input:any,providerVersion:Version):input isSourceFileConfigurationItem{
2368+
// IntelliSenseMode and standard are optional for version 5+. However, they are required when compilerPath is not defined.
2369+
letareOptionalsValid:boolean=false;
2370+
if(providerVersion<Version.v5||input.configuration.compilerPath===undefined){
2371+
areOptionalsValid=util.isString(input.configuration.intelliSenseMode)&&util.isString(input.configuration.standard);
2372+
}elseif(util.isString(input.configuration.compilerPath)){
2373+
areOptionalsValid=util.isOptionalString(input.configuration.intelliSenseMode)&&util.isOptionalString(input.configuration.standard);
2374+
}
23682375
return(input&&(util.isString(input.uri)||util.isUri(input.uri))&&
23692376
input.configuration&&
2377+
areOptionalsValid&&
23702378
util.isArrayOfString(input.configuration.includePath)&&
23712379
util.isArrayOfString(input.configuration.defines)&&
2372-
util.isString(input.configuration.intelliSenseMode)&&
2373-
util.isString(input.configuration.standard)&&
2374-
util.isOptionalString(input.configuration.compilerPath)&&
23752380
util.isOptionalArrayOfString(input.configuration.compilerArgs)&&
23762381
util.isOptionalArrayOfString(input.configuration.forcedInclude));
23772382
}
23782383

2379-
privatesendCustomConfigurations(configs:any):void{
2384+
privatesendCustomConfigurations(configs:any,providerVersion:Version):void{
23802385
// configs is marked as 'any' because it is untrusted data coming from a 3rd-party. We need to sanitize it before sending it to the language server.
23812386
if(!configs||!(configsinstanceofArray)){
23822387
console.warn("discarding invalid SourceFileConfigurationItems[]: "+configs);
@@ -2390,7 +2395,7 @@ export class DefaultClient implements Client {
23902395
}
23912396
constsanitized:SourceFileConfigurationItemAdapter[]=[];
23922397
configs.forEach(item=>{
2393-
if(this.isSourceFileConfigurationItem(item)){
2398+
if(this.isSourceFileConfigurationItem(item,providerVersion)){
23942399
this.configurationLogging.set(item.uri.toString(),JSON.stringify(item.configuration,null,4));
23952400
if(settings.loggingLevel==="Debug"){
23962401
out.appendLine(` uri:${item.uri.toString()}`);
@@ -2432,6 +2437,15 @@ export class DefaultClient implements Client {
24322437
privatebrowseConfigurationLogging:string="";
24332438
privateconfigurationLogging:Map<string,string>=newMap<string,string>();
24342439

2440+
privateisWorkspaceBrowseConfiguration(input:any):boolean{
2441+
constareOptionalsValid:boolean=(input.compilerPath===undefined&&util.isString(input.standard))||
2442+
(util.isString(input.compilerPath)&&util.isOptionalString(input.standard));
2443+
returnareOptionalsValid&&
2444+
util.isArrayOfString(input.browsePath)&&
2445+
util.isOptionalString(input.compilerArgs)&&
2446+
util.isOptionalString(input.windowsSdkVersion);
2447+
}
2448+
24352449
privatesendCustomBrowseConfiguration(config:any,providerId?:string,timeoutOccured?:boolean):void{
24362450
constrootFolder:vscode.WorkspaceFolder|undefined=this.RootFolder;
24372451
if(!rootFolder){
@@ -2461,11 +2475,7 @@ export class DefaultClient implements Client {
24612475
}
24622476

24632477
sanitized={...<WorkspaceBrowseConfiguration>config};
2464-
if(!util.isArrayOfString(sanitized.browsePath)||
2465-
!util.isOptionalString(sanitized.compilerPath)||
2466-
!util.isOptionalArrayOfString(sanitized.compilerArgs)||
2467-
!util.isOptionalString(sanitized.standard)||
2468-
!util.isOptionalString(sanitized.windowsSdkVersion)){
2478+
if(!this.isWorkspaceBrowseConfiguration(sanitized)){
24692479
console.log("Received an invalid browse configuration from configuration provider.");
24702480
constconfigValue:WorkspaceBrowseConfiguration|undefined=lastCustomBrowseConfiguration.Value;
24712481
if(configValue){

‎Extension/src/LanguageServer/configurations.ts‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -481,18 +481,18 @@ export class CppProperties {
481481
privategetIntelliSenseModeForPlatform(name?:string):string{
482482
// Do the built-in configs first.
483483
if(name==="Linux"){
484-
return"gcc-x64";
484+
return"linux-gcc-x64";
485485
}elseif(name==="Mac"){
486-
return"clang-x64";
486+
return"macos-clang-x64";
487487
}elseif(name==="Win32"){
488-
return"msvc-x64";
488+
return"windows-msvc-x64";
489489
}elseif(process.platform==='win32'){
490490
// Custom configs default to the OS's preference.
491-
return"msvc-x64";
491+
return"windows-msvc-x64";
492492
}elseif(process.platform==='darwin'){
493-
return"clang-x64";
493+
return"macos-clang-x64";
494494
}else{
495-
return"gcc-x64";
495+
return"linux-gcc-x64";
496496
}
497497
}
498498

‎Extension/src/LanguageServer/cppBuildTaskProvider.ts‎

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import*aspathfrom'path';
66
import{
77
TaskDefinition,Task,TaskGroup,ShellExecution,Uri,workspace,
8-
TaskProvider,TaskScope,CustomExecution,ProcessExecution,TextEditor,Pseudoterminal,EventEmitter,Event,TerminalDimensions,window
8+
TaskProvider,TaskScope,CustomExecution,ProcessExecution,TextEditor,Pseudoterminal,EventEmitter,Event,TerminalDimensions,window,WorkspaceFolder
99
}from'vscode';
1010
import*asosfrom'os';
1111
import*asutilfrom'../common';
@@ -181,13 +181,18 @@ export class CppBuildTaskProvider implements TaskProvider {
181181
};
182182
}
183183

184-
constactiveClient:Client=ext.getActiveClient();
185-
consturi:Uri|undefined=activeClient.RootUri;
186-
if(!uri){
187-
thrownewError("No client URI found in getBuildTasks()");
188-
}
189-
if(!workspace.getWorkspaceFolder(uri)){
190-
thrownewError("No target WorkspaceFolder found in getBuildTasks()");
184+
consteditor:TextEditor|undefined=window.activeTextEditor;
185+
constfolder:WorkspaceFolder|undefined=editor ?workspace.getWorkspaceFolder(editor.document.uri) :undefined;
186+
// Check uri exists (single-mode files are ignored).
187+
if(folder){
188+
constactiveClient:Client=ext.getActiveClient();
189+
consturi:Uri|undefined=activeClient.RootUri;
190+
if(!uri){
191+
thrownewError("No client URI found in getBuildTasks()");
192+
}
193+
if(!workspace.getWorkspaceFolder(uri)){
194+
thrownewError("No target WorkspaceFolder found in getBuildTasks()");
195+
}
191196
}
192197

193198
constscope:TaskScope=TaskScope.Workspace;

‎Extension/src/LanguageServer/customProviders.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ class CustomProviderWrapper implements CustomConfigurationProvider1 {
8383
returnthis._version<Version.v2 ?Promise.resolve(false) :this.provider.canProvideBrowseConfiguration(token);
8484
}
8585

86-
publicprovideBrowseConfiguration(token?:vscode.CancellationToken):Thenable<WorkspaceBrowseConfiguration>{
86+
publicprovideBrowseConfiguration(token?:vscode.CancellationToken):Thenable<WorkspaceBrowseConfiguration|null>{
8787
console.assert(this._version>=Version.v2);
8888
returnthis._version<Version.v2 ?Promise.resolve({browsePath:[]}) :this.provider.provideBrowseConfiguration(token);
8989
}
@@ -92,7 +92,7 @@ class CustomProviderWrapper implements CustomConfigurationProvider1 {
9292
returnthis._version<Version.v3 ?Promise.resolve(false) :this.provider.canProvideBrowseConfigurationsPerFolder(token);
9393
}
9494

95-
publicprovideFolderBrowseConfiguration(uri:vscode.Uri,token?:vscode.CancellationToken):Thenable<WorkspaceBrowseConfiguration>{
95+
publicprovideFolderBrowseConfiguration(uri:vscode.Uri,token?:vscode.CancellationToken):Thenable<WorkspaceBrowseConfiguration|null>{
9696
console.assert(this._version>=Version.v3);
9797
returnthis._version<Version.v3 ?Promise.resolve({browsePath:[]}) :this.provider.provideFolderBrowseConfiguration(uri,token);
9898
}

‎Extension/src/LanguageServer/extension.ts‎

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1106,10 +1106,10 @@ function reportMacCrashes(): void {
11061106
fs.readFile(path.resolve(crashFolder,filename),'utf8',(err,data)=>{
11071107
if(err){
11081108
// Try again?
1109-
fs.readFile(path.resolve(crashFolder,filename),'utf8',handleCrashFileRead);
1109+
fs.readFile(path.resolve(crashFolder,filename),'utf8',handleMacCrashFileRead);
11101110
return;
11111111
}
1112-
handleCrashFileRead(err,data);
1112+
handleMacCrashFileRead(err,data);
11131113
});
11141114
},5000);
11151115
});
@@ -1120,15 +1120,22 @@ function reportMacCrashes(): void {
11201120
}
11211121
}
11221122

1123-
functionlogCrashTelemetry(data:string):void{
1123+
letpreviousMacCrashData:string;
1124+
letpreviousMacCrashCount:number=0;
1125+
1126+
functionlogMacCrashTelemetry(data:string):void{
11241127
constcrashObject:{[key:string]:string}={};
1128+
constcrashCountObject:{[key:string]:number}={};
11251129
crashObject["CrashingThreadCallStack"]=data;
1126-
telemetry.logLanguageServerEvent("MacCrash",crashObject,undefined);
1130+
previousMacCrashCount=data===previousMacCrashData ?previousMacCrashCount+1 :0;
1131+
previousMacCrashData=data;
1132+
crashCountObject["CrashCount"]=previousMacCrashCount;
1133+
telemetry.logLanguageServerEvent("MacCrash",crashObject,crashCountObject);
11271134
}
11281135

1129-
functionhandleCrashFileRead(err:NodeJS.ErrnoException|undefined|null,data:string):void{
1136+
functionhandleMacCrashFileRead(err:NodeJS.ErrnoException|undefined|null,data:string):void{
11301137
if(err){
1131-
returnlogCrashTelemetry("readFile: "+err.code);
1138+
returnlogMacCrashTelemetry("readFile: "+err.code);
11321139
}
11331140

11341141
// Extract the crashing process version, because the version might not match
@@ -1145,15 +1152,15 @@ function handleCrashFileRead(err: NodeJS.ErrnoException | undefined | null, data
11451152
constcrashStart:string=" Crashed:";
11461153
letstartCrash:number=data.indexOf(crashStart);
11471154
if(startCrash<0){
1148-
returnlogCrashTelemetry("No crash start");
1155+
returnlogMacCrashTelemetry("No crash start");
11491156
}
11501157
startCrash+=crashStart.length+1;// Skip past crashStart.
11511158
letendCrash:number=data.indexOf("Thread ",startCrash);
11521159
if(endCrash<0){
11531160
endCrash=data.length-1;// Not expected, but just in case.
11541161
}
11551162
if(endCrash<=startCrash){
1156-
returnlogCrashTelemetry("No crash end");
1163+
returnlogMacCrashTelemetry("No crash end");
11571164
}
11581165
data=data.substr(startCrash,endCrash-startCrash);
11591166

@@ -1191,7 +1198,7 @@ function handleCrashFileRead(err: NodeJS.ErrnoException | undefined | null, data
11911198
data=data.substr(0,8189)+"...";
11921199
}
11931200

1194-
logCrashTelemetry(data);
1201+
logMacCrashTelemetry(data);
11951202
}
11961203

11971204
exportfunctiondeactivate():Thenable<void>{

‎Extension/yarn.lock‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5631,10 +5631,10 @@ vm-browserify@^1.0.1:
56315631
resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-1.1.2.tgz#78641c488b8e6ca91a75f511e7a3b32a86e5dda0"
56325632
integrity sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ==
56335633

5634-
vscode-cpptools@^4.0.1:
5635-
version "4.0.1"
5636-
resolved "https://registry.yarnpkg.com/vscode-cpptools/-/vscode-cpptools-4.0.1.tgz#7e591572b437a6aca47b767487b52bc253e6d911"
5637-
integrity sha512-2IjtWe7rjIp20J+5m0Yjpa8TjGhdQWChwE49iYJBUUTHFqJDFq0aXNAyiDNw6BDWI1Q2Z/gmeQGsJBoxTb0J0Q==
5634+
vscode-cpptools@^5.0.0:
5635+
version "5.0.0"
5636+
resolved "https://registry.yarnpkg.com/vscode-cpptools/-/vscode-cpptools-5.0.0.tgz#f1195736af1cfa10727482be57093a3997c8f63b"
5637+
integrity sha512-TPG6/o9+DisDj2U4AiTOihtfjEzBb/4CErYaB1JIWFMZTQE7zlNTdsgCs+l4xIS2Y34us0RMBIC6On1mBuwxww==
56385638

56395639
vscode-debugadapter@^1.35.0:
56405640
version "1.38.0"

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp