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

Commitc18592b

Browse files
authored
Merge pull requestmicrosoft#3332 from Microsoft/0_22_1_release
0 22 1 release
2 parents717de54 +fee924b commitc18592b

File tree

9 files changed

+35
-27
lines changed

9 files changed

+35
-27
lines changed

‎Extension/CHANGELOG.md‎

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

3+
##Version 0.22.1: March 21, 2019
4+
* Fix`tasks.json` with single-line comments being overwritten when`Build and Debug Active File` is used.[#3327](https://github.com/Microsoft/vscode-cpptools/issues/3327)
5+
* Fix an invalid`compilerPath` property getting added to`tasks.json` after doing`Configure Task` with a C/C++ compiler.
6+
* Add IntelliSense caching for macOS 10.13 or later (0.22.0 only supported Windows and Linux).
7+
38
##Version 0.22.0: March 19, 2019
49
###Major Changes
510
* Add warning squiggles for invalid properties and paths in`c_cpp_properties.json`.[#2799](https://github.com/Microsoft/vscode-cpptools/issues/2799),[PR#3283](https://github.com/Microsoft/vscode-cpptools/pull/3283)

‎Extension/ReleaseNotes.html‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ <h1>Microsoft C/C++ Extension for VS Code</h1>
208208
<h2class="caption">March 2019 Update</h2>
209209
<div>Thank you for installing the C/C++ extension! We're excited to announce the following features in the March update:<br/>
210210
<h3style="font-weight: 600">IntelliSense caching</h3>
211-
On Windows and Linux, theextension will now cache header information to improve IntelliSense speed for your code files. Support for macOS will be available in a future release.<br/>
211+
Theextension will now cache header information to improve IntelliSense speed for your code files.<br/>
212212
<br/>
213213
<emstyle="font-weight: 600">Please Note:</em> The extension writes the cache to disk in order to achieve this performance improvement. By default the cache files will be stored in your workspace
214214
folder's ".vscode" folder, but you can change this location by using the<code>"C_Cpp.intelliSenseCachePath"</code> setting. You can also control how much disk space can be

‎Extension/package-lock.json‎

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎Extension/package.json‎

Lines changed: 5 additions & 5 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":"0.22.0",
5+
"version":"0.22.1",
66
"publisher":"ms-vscode",
77
"preview":true,
88
"icon":"LanguageCCPP_color_128x.png",
@@ -1451,7 +1451,7 @@
14511451
"runtimeDependencies": [
14521452
{
14531453
"description":"C/C++ language components (Linux / x86_64)",
1454-
"url":"https://go.microsoft.com/fwlink/?linkid=2065016",
1454+
"url":"https://go.microsoft.com/fwlink/?linkid=2084924",
14551455
"platforms": [
14561456
"linux"
14571457
],
@@ -1465,7 +1465,7 @@
14651465
},
14661466
{
14671467
"description":"C/C++ language components (Linux / x86)",
1468-
"url":"https://go.microsoft.com/fwlink/?linkid=2065017",
1468+
"url":"https://go.microsoft.com/fwlink/?linkid=2085028",
14691469
"platforms": [
14701470
"linux"
14711471
],
@@ -1481,7 +1481,7 @@
14811481
},
14821482
{
14831483
"description":"C/C++ language components (OS X)",
1484-
"url":"https://go.microsoft.com/fwlink/?linkid=2064955",
1484+
"url":"https://go.microsoft.com/fwlink/?linkid=2084925",
14851485
"platforms": [
14861486
"darwin"
14871487
],
@@ -1492,7 +1492,7 @@
14921492
},
14931493
{
14941494
"description":"C/C++ language components (Windows)",
1495-
"url":"https://go.microsoft.com/fwlink/?linkid=2065027",
1495+
"url":"https://go.microsoft.com/fwlink/?linkid=2085027",
14961496
"platforms": [
14971497
"win32"
14981498
],

‎Extension/src/Debugger/configurationProvider.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ class CppConfigurationProvider implements vscode.DebugConfigurationProvider {
9494
* Returns a list of initial debug configurations based on contextual information, e.g. package.json or folder.
9595
*/
9696
asyncprovideDebugConfigurations(folder:vscode.WorkspaceFolder|undefined,token?:vscode.CancellationToken):Promise<vscode.DebugConfiguration[]>{
97-
letbuildTasks:vscode.Task[]=awaitgetBuildTasks();
97+
letbuildTasks:vscode.Task[]=awaitgetBuildTasks(true);
9898
if(buildTasks.length===0){
9999
returnPromise.resolve(this.provider.getInitialConfigurations(this.type));
100100
}

‎Extension/src/Debugger/extension.ts‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,12 +91,15 @@ export function initialize(context: vscode.ExtensionContext): void {
9191
awaitutil.ensureBuildTaskExists(selection.configuration.preLaunchTask);
9292
Telemetry.logDebuggerEvent("buildAndDebug",{"success":"false"});
9393
}catch(e){
94+
if(e&&e.message===util.failedToParseTasksJson){
95+
vscode.window.showErrorMessage(util.failedToParseTasksJson);
96+
}
9497
returnPromise.resolve();
9598
}
9699
}else{
97100
returnPromise.resolve();
98101
// TODO uncomment this when single file mode works correctly.
99-
// const buildTasks: vscode.Task[] = await getBuildTasks();
102+
// const buildTasks: vscode.Task[] = await getBuildTasks(true);
100103
// const task: vscode.Task = buildTasks.find(task => task.name === selection.configuration.preLaunchTask);
101104
// await vscode.tasks.executeTask(task);
102105
// delete selection.configuration.preLaunchTask;

‎Extension/src/LanguageServer/client.ts‎

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -383,13 +383,11 @@ class DefaultClient implements Client {
383383

384384
letintelliSenseCacheDisabled:boolean=false;
385385
if(os.platform()==="darwin"){
386-
intelliSenseCacheDisabled=true;
387-
// TODO: Re-enable this after the performance is improved on Mac.
388-
//const releaseParts: string[] = os.release().split(".");
389-
//if (releaseParts.length >= 1) {
390-
// // AutoPCH doesn't work for older Mac OS's.
391-
// intelliSenseCacheDisabled = parseInt(releaseParts[0]) < 17;
392-
//}
386+
constreleaseParts:string[]=os.release().split(".");
387+
if(releaseParts.length>=1){
388+
// AutoPCH doesn't work for older Mac OS's.
389+
intelliSenseCacheDisabled=parseInt(releaseParts[0])<17;
390+
}
393391
}
394392

395393
letclientOptions:LanguageClientOptions={

‎Extension/src/LanguageServer/extension.ts‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ export function activate(activationEventOccurred: boolean): void {
7171

7272
taskProvider=vscode.tasks.registerTaskProvider(taskSourceStr,{
7373
provideTasks:()=>{
74-
returngetBuildTasks();
74+
returngetBuildTasks(false);
7575
},
7676
resolveTask(task:vscode.Task):vscode.Task{
7777
// Currently cannot implement because VS Code does not call this. Can implement custom output file directory when enabled.
@@ -114,7 +114,7 @@ export interface BuildTaskDefinition extends vscode.TaskDefinition {
114114
/**
115115
* Generate tasks to build the current file based on the user's detected compilers, the user's compilerPath setting, and the current file's extension.
116116
*/
117-
exportasyncfunctiongetBuildTasks():Promise<vscode.Task[]>{
117+
exportasyncfunctiongetBuildTasks(returnComplerPath:boolean):Promise<vscode.Task[]>{
118118
consteditor:vscode.TextEditor=vscode.window.activeTextEditor;
119119
if(!editor){
120120
return[];
@@ -243,6 +243,10 @@ export async function getBuildTasks(): Promise<vscode.Task[]> {
243243
task.definition=kind;// The constructor for vscode.Task will eat the definition. Reset it by reassigning.
244244
task.group=vscode.TaskGroup.Build;
245245

246+
if(!returnComplerPath){
247+
deletetask.definition.compilerPath;
248+
}
249+
246250
returntask;
247251
});
248252
}

‎Extension/src/common.ts‎

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ export function setExtensionContext(context: vscode.ExtensionContext): void {
2323
extensionContext=context;
2424
}
2525

26+
exportconstfailedToParseTasksJson:string="Failed to parse tasks.json, possibly due to comments or trailing commas.";
27+
2628
// Use this package.json to read values
2729
exportconstpackageJson:any=vscode.extensions.getExtension("ms-vscode.cpptools").packageJSON;
2830

@@ -47,11 +49,13 @@ export function getRawTasksJson(): Promise<any> {
4749
if(!exists){
4850
returnresolve({});
4951
}
50-
constfileContents:Buffer=fs.readFileSync(path);
52+
letfileContents:string=fs.readFileSync(path).toString();
53+
fileContents=fileContents.replace(/^\s*\/\/.*$/gm,"");// Remove start of line // comments.
5154
letrawTasks:any={};
5255
try{
53-
rawTasks=JSON.parse(fileContents.toString());
56+
rawTasks=JSON.parse(fileContents);
5457
}catch(error){
58+
returnreject(newError(failedToParseTasksJson));
5559
}
5660
resolve(rawTasks);
5761
});
@@ -73,16 +77,10 @@ export async function ensureBuildTaskExists(taskName: string): Promise<void> {
7377
return;
7478
}
7579

76-
constbuildTasks:vscode.Task[]=awaitgetBuildTasks();
80+
constbuildTasks:vscode.Task[]=awaitgetBuildTasks(false);
7781
selectedTask=buildTasks.find(task=>task.name===taskName);
7882
console.assert(selectedTask);
7983

80-
letdefinition:vscode.TaskDefinition=selectedTask.definitionasvscode.TaskDefinition;
81-
if(definition&&definition.compilerPath){
82-
// TODO: add desired properties to empty object, don't delete.
83-
deletedefinition.compilerPath;
84-
}
85-
8684
rawTasksJson.version="2.0.0";
8785

8886
if(!rawTasksJson.tasks.find(task=>{returntask.label===selectedTask.definition.label;})){

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp