@opensumi/ide-task 2.12.1-next-079c1930 → 2.13.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/browser/parser.d.ts +129 -129
- package/lib/browser/parser.d.ts.map +1 -1
- package/lib/browser/parser.js +22 -12
- package/lib/browser/parser.js.map +1 -1
- package/lib/browser/problem-collector.d.ts +1 -1
- package/lib/browser/problem-collector.d.ts.map +1 -1
- package/lib/browser/problem-collector.js +4 -4
- package/lib/browser/problem-collector.js.map +1 -1
- package/lib/browser/problem-line-matcher.d.ts +1 -1
- package/lib/browser/problem-line-matcher.d.ts.map +1 -1
- package/lib/browser/problem-line-matcher.js +25 -14
- package/lib/browser/problem-line-matcher.js.map +1 -1
- package/lib/browser/task-config.d.ts +20 -21
- package/lib/browser/task-config.d.ts.map +1 -1
- package/lib/browser/task-config.js +118 -48
- package/lib/browser/task-config.js.map +1 -1
- package/lib/browser/task-preferences.js +1 -1
- package/lib/browser/task-preferences.js.map +1 -1
- package/lib/browser/task-preferences.provider.d.ts.map +1 -1
- package/lib/browser/task-preferences.provider.js.map +1 -1
- package/lib/browser/task.contribution.d.ts.map +1 -1
- package/lib/browser/task.contribution.js.map +1 -1
- package/lib/browser/task.schema.d.ts.map +1 -1
- package/lib/browser/task.schema.js +7 -7
- package/lib/browser/task.schema.js.map +1 -1
- package/lib/browser/task.service.d.ts.map +1 -1
- package/lib/browser/task.service.js +32 -10
- package/lib/browser/task.service.js.map +1 -1
- package/lib/browser/terminal-task-system.d.ts.map +1 -1
- package/lib/browser/terminal-task-system.js +5 -2
- package/lib/browser/terminal-task-system.js.map +1 -1
- package/lib/common/index.d.ts +1 -2
- package/lib/common/index.d.ts.map +1 -1
- package/lib/common/index.js.map +1 -1
- package/lib/common/task.d.ts +15 -11
- package/lib/common/task.d.ts.map +1 -1
- package/lib/common/task.js +34 -9
- package/lib/common/task.js.map +1 -1
- package/package.json +11 -11
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
2
|
+
/* ---------------------------------------------------------------------------------------------
|
|
3
3
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4
4
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
5
5
|
*--------------------------------------------------------------------------------------------*/
|
|
@@ -197,7 +197,11 @@ class ParseContext {
|
|
|
197
197
|
}
|
|
198
198
|
var ShellConfiguration;
|
|
199
199
|
(function (ShellConfiguration) {
|
|
200
|
-
const properties = [
|
|
200
|
+
const properties = [
|
|
201
|
+
{ property: 'executable' },
|
|
202
|
+
{ property: 'args' },
|
|
203
|
+
{ property: 'quoting' },
|
|
204
|
+
];
|
|
201
205
|
function is(value) {
|
|
202
206
|
const candidate = value;
|
|
203
207
|
return candidate && ((0, ide_core_common_1.isString)(candidate.executable) || (0, ide_core_common_1.isStringArray)(candidate.args));
|
|
@@ -246,7 +250,11 @@ var ShellConfiguration;
|
|
|
246
250
|
})(ShellConfiguration || (ShellConfiguration = {}));
|
|
247
251
|
var CommandOptions;
|
|
248
252
|
(function (CommandOptions) {
|
|
249
|
-
const properties = [
|
|
253
|
+
const properties = [
|
|
254
|
+
{ property: 'cwd' },
|
|
255
|
+
{ property: 'env' },
|
|
256
|
+
{ property: 'shell', type: ShellConfiguration },
|
|
257
|
+
];
|
|
250
258
|
const defaults = { cwd: '${workspaceFolder}' };
|
|
251
259
|
function from(options, context) {
|
|
252
260
|
const result = {};
|
|
@@ -270,10 +278,10 @@ var CommandOptions;
|
|
|
270
278
|
}
|
|
271
279
|
CommandOptions.isEmpty = isEmpty;
|
|
272
280
|
function assignProperties(target, source) {
|
|
273
|
-
if (
|
|
281
|
+
if (source === undefined || isEmpty(source)) {
|
|
274
282
|
return target;
|
|
275
283
|
}
|
|
276
|
-
if (
|
|
284
|
+
if (target === undefined || isEmpty(target)) {
|
|
277
285
|
return source;
|
|
278
286
|
}
|
|
279
287
|
assignProperty(target, source, 'cwd');
|
|
@@ -283,10 +291,10 @@ var CommandOptions;
|
|
|
283
291
|
else if (source.env !== undefined) {
|
|
284
292
|
const env = Object.create(null);
|
|
285
293
|
if (target.env !== undefined) {
|
|
286
|
-
Object.keys(target.env).forEach((key) => env[key] = target.env[key]);
|
|
294
|
+
Object.keys(target.env).forEach((key) => (env[key] = target.env[key]));
|
|
287
295
|
}
|
|
288
296
|
if (source.env !== undefined) {
|
|
289
|
-
Object.keys(source.env).forEach((key) => env[key] = source.env[key]);
|
|
297
|
+
Object.keys(source.env).forEach((key) => (env[key] = source.env[key]));
|
|
290
298
|
}
|
|
291
299
|
target.env = env;
|
|
292
300
|
}
|
|
@@ -311,7 +319,16 @@ var CommandConfiguration;
|
|
|
311
319
|
(function (CommandConfiguration) {
|
|
312
320
|
let PresentationOptions;
|
|
313
321
|
(function (PresentationOptions) {
|
|
314
|
-
const properties = [
|
|
322
|
+
const properties = [
|
|
323
|
+
{ property: 'echo' },
|
|
324
|
+
{ property: 'reveal' },
|
|
325
|
+
{ property: 'revealProblems' },
|
|
326
|
+
{ property: 'focus' },
|
|
327
|
+
{ property: 'panel' },
|
|
328
|
+
{ property: 'showReuseMessage' },
|
|
329
|
+
{ property: 'clear' },
|
|
330
|
+
{ property: 'group' },
|
|
331
|
+
];
|
|
315
332
|
function from(config, context) {
|
|
316
333
|
let echo;
|
|
317
334
|
let reveal;
|
|
@@ -361,7 +378,16 @@ var CommandConfiguration;
|
|
|
361
378
|
if (!hasProps) {
|
|
362
379
|
return undefined;
|
|
363
380
|
}
|
|
364
|
-
return {
|
|
381
|
+
return {
|
|
382
|
+
echo: echo,
|
|
383
|
+
reveal: reveal,
|
|
384
|
+
revealProblems: revealProblems,
|
|
385
|
+
focus: focus,
|
|
386
|
+
panel: panel,
|
|
387
|
+
showReuseMessage: showReuseMessage,
|
|
388
|
+
clear: clear,
|
|
389
|
+
group,
|
|
390
|
+
};
|
|
365
391
|
}
|
|
366
392
|
PresentationOptions.from = from;
|
|
367
393
|
function assignProperties(target, source) {
|
|
@@ -374,7 +400,15 @@ var CommandConfiguration;
|
|
|
374
400
|
PresentationOptions.fillProperties = fillProperties;
|
|
375
401
|
function fillDefaults(value, context) {
|
|
376
402
|
const defaultEcho = context.engine === TaskTypes.ExecutionEngine.Terminal ? true : false;
|
|
377
|
-
return _fillDefaults(value, {
|
|
403
|
+
return _fillDefaults(value, {
|
|
404
|
+
echo: defaultEcho,
|
|
405
|
+
reveal: TaskTypes.RevealKind.Always,
|
|
406
|
+
revealProblems: TaskTypes.RevealProblemKind.Never,
|
|
407
|
+
focus: false,
|
|
408
|
+
panel: TaskTypes.PanelKind.Shared,
|
|
409
|
+
showReuseMessage: true,
|
|
410
|
+
clear: false,
|
|
411
|
+
}, properties, context);
|
|
378
412
|
}
|
|
379
413
|
PresentationOptions.fillDefaults = fillDefaults;
|
|
380
414
|
function freeze(value) {
|
|
@@ -400,7 +434,11 @@ var CommandConfiguration;
|
|
|
400
434
|
}
|
|
401
435
|
else {
|
|
402
436
|
const quoting = TaskTypes.ShellQuoting.from(value.quoting);
|
|
403
|
-
const result = (0, ide_core_common_1.isString)(value.value)
|
|
437
|
+
const result = (0, ide_core_common_1.isString)(value.value)
|
|
438
|
+
? value.value
|
|
439
|
+
: (0, ide_core_common_1.isStringArray)(value.value)
|
|
440
|
+
? value.value.join(' ')
|
|
441
|
+
: undefined;
|
|
404
442
|
if (result) {
|
|
405
443
|
return {
|
|
406
444
|
value: result,
|
|
@@ -415,8 +453,12 @@ var CommandConfiguration;
|
|
|
415
453
|
ShellString.from = from;
|
|
416
454
|
})(ShellString || (ShellString = {}));
|
|
417
455
|
const properties = [
|
|
418
|
-
{ property: 'runtime' },
|
|
419
|
-
{ property: '
|
|
456
|
+
{ property: 'runtime' },
|
|
457
|
+
{ property: 'name' },
|
|
458
|
+
{ property: 'options', type: CommandOptions },
|
|
459
|
+
{ property: 'args' },
|
|
460
|
+
{ property: 'taskSelector' },
|
|
461
|
+
{ property: 'suppressTaskName' },
|
|
420
462
|
{ property: 'presentation', type: PresentationOptions },
|
|
421
463
|
];
|
|
422
464
|
function from(config, context) {
|
|
@@ -450,7 +492,7 @@ var CommandConfiguration;
|
|
|
450
492
|
runtime = TaskTypes.RuntimeType.Shell;
|
|
451
493
|
}
|
|
452
494
|
else if (config.isShellCommand !== undefined) {
|
|
453
|
-
runtime =
|
|
495
|
+
runtime = config.isShellCommand ? TaskTypes.RuntimeType.Shell : TaskTypes.RuntimeType.Process;
|
|
454
496
|
}
|
|
455
497
|
const result = {
|
|
456
498
|
name,
|
|
@@ -523,7 +565,7 @@ var CommandConfiguration;
|
|
|
523
565
|
}
|
|
524
566
|
CommandConfiguration.fillProperties = fillProperties;
|
|
525
567
|
function fillGlobals(target, source, taskName) {
|
|
526
|
-
if (
|
|
568
|
+
if (source === undefined || isEmpty(source)) {
|
|
527
569
|
return target;
|
|
528
570
|
}
|
|
529
571
|
target = target || {
|
|
@@ -570,7 +612,7 @@ var CommandConfiguration;
|
|
|
570
612
|
value.args = EMPTY_ARRAY;
|
|
571
613
|
}
|
|
572
614
|
if (value.suppressTaskName === undefined) {
|
|
573
|
-
value.suppressTaskName =
|
|
615
|
+
value.suppressTaskName = context.schemaVersion === 2 /* V2_0_0 */;
|
|
574
616
|
}
|
|
575
617
|
}
|
|
576
618
|
CommandConfiguration.fillDefaults = fillDefaults;
|
|
@@ -587,7 +629,7 @@ var ProblemMatcherConverter;
|
|
|
587
629
|
return result;
|
|
588
630
|
}
|
|
589
631
|
declares.forEach((value) => {
|
|
590
|
-
const namedProblemMatcher =
|
|
632
|
+
const namedProblemMatcher = new parser_1.ProblemMatcherParser(context.problemReporter).parse(value, context.getProblemPattern, context.getProblemMatcher);
|
|
591
633
|
// @ts-ignore
|
|
592
634
|
if (parser_1.Config.isNamedProblemMatcher(namedProblemMatcher)) {
|
|
593
635
|
result[namedProblemMatcher.name] = namedProblemMatcher;
|
|
@@ -703,7 +745,10 @@ var TaskDependency;
|
|
|
703
745
|
return { workspaceFolder: context.workspaceFolder, task: external };
|
|
704
746
|
}
|
|
705
747
|
else if (TaskIdentifier.is(external)) {
|
|
706
|
-
return {
|
|
748
|
+
return {
|
|
749
|
+
workspaceFolder: context.workspaceFolder,
|
|
750
|
+
task: context.createTaskIdentifier(external, context.problemReporter),
|
|
751
|
+
};
|
|
707
752
|
}
|
|
708
753
|
else {
|
|
709
754
|
return undefined;
|
|
@@ -792,10 +837,11 @@ var ConfigurationProperties;
|
|
|
792
837
|
}
|
|
793
838
|
}
|
|
794
839
|
result.dependsOrder = DependsOrder.from(external.dependsOrder);
|
|
795
|
-
if (includeCommandOptions &&
|
|
840
|
+
if (includeCommandOptions &&
|
|
841
|
+
(external.presentation !== undefined || external.terminal !== undefined)) {
|
|
796
842
|
result.presentation = CommandConfiguration.PresentationOptions.from(external, context);
|
|
797
843
|
}
|
|
798
|
-
if (includeCommandOptions &&
|
|
844
|
+
if (includeCommandOptions && external.options !== undefined) {
|
|
799
845
|
result.options = CommandOptions.from(external.options, context);
|
|
800
846
|
}
|
|
801
847
|
if (external.problemMatcher) {
|
|
@@ -828,7 +874,7 @@ var ConfiguringTask;
|
|
|
828
874
|
}
|
|
829
875
|
const typeDeclaration = type ? taskDefinitionRegister.get(type) : undefined;
|
|
830
876
|
if (!typeDeclaration) {
|
|
831
|
-
const message = (0, ide_core_common_1.formatLocalize)('ConfigurationParser.noTypeDefinition',
|
|
877
|
+
const message = (0, ide_core_common_1.formatLocalize)('ConfigurationParser.noTypeDefinition', "Error: there is no registered task type '{0}'. Did you miss to install an extension that provides a corresponding task provider?", type);
|
|
832
878
|
context.problemReporter.error(message);
|
|
833
879
|
return undefined;
|
|
834
880
|
}
|
|
@@ -856,12 +902,12 @@ var ConfiguringTask;
|
|
|
856
902
|
}
|
|
857
903
|
}
|
|
858
904
|
if (identifier === undefined) {
|
|
859
|
-
context.problemReporter.error((0, ide_core_common_1.formatLocalize)('ConfigurationParsTaskTypes.er.missingType',
|
|
905
|
+
context.problemReporter.error((0, ide_core_common_1.formatLocalize)('ConfigurationParsTaskTypes.er.missingType', "Error: the task configuration '{0}' is missing the required property 'type'. The task configuration will be ignored.", JSON.stringify(external, undefined, 0)));
|
|
860
906
|
return undefined;
|
|
861
907
|
}
|
|
862
908
|
const taskIdentifier = context.createTaskIdentifier(identifier, context.problemReporter);
|
|
863
909
|
if (taskIdentifier === undefined) {
|
|
864
|
-
context.problemReporter.error((0, ide_core_common_1.formatLocalize)('ConfigurationParTaskTypes.ser.incorrectType',
|
|
910
|
+
context.problemReporter.error((0, ide_core_common_1.formatLocalize)('ConfigurationParTaskTypes.ser.incorrectType', "Error: the task configuration '{0}' is using an unknown type. The task configuration will be ignored.", JSON.stringify(external, undefined, 0)));
|
|
865
911
|
return undefined;
|
|
866
912
|
}
|
|
867
913
|
const configElement = {
|
|
@@ -920,7 +966,9 @@ var CustomTask;
|
|
|
920
966
|
context.problemReporter.error((0, ide_core_common_1.formatLocalize)('ConfigurationParser.noTaskName', 'Error: a task must provide a label property. The task will be ignored.\n{0}\n', JSON.stringify(external, null, 4)));
|
|
921
967
|
return undefined;
|
|
922
968
|
}
|
|
923
|
-
const result = new TaskTypes.CustomTask(context.uuidMap.getUUID(taskName), Object.assign({}, source, {
|
|
969
|
+
const result = new TaskTypes.CustomTask(context.uuidMap.getUUID(taskName), Object.assign({}, source, {
|
|
970
|
+
config: { index, element: external, file: '.vscode/json', workspaceFolder: context.workspaceFolder },
|
|
971
|
+
}), taskName, TaskTypes.CUSTOMIZED_TASK_TYPE, undefined, false, RunOptions.fromConfiguration(external.runOptions), {
|
|
924
972
|
name: taskName,
|
|
925
973
|
identifier: taskName,
|
|
926
974
|
});
|
|
@@ -936,10 +984,10 @@ var CustomTask;
|
|
|
936
984
|
}
|
|
937
985
|
if (result.configurationProperties.group === undefined) {
|
|
938
986
|
if (legacy.isBuildCommand === true) {
|
|
939
|
-
result.configurationProperties.group = TaskTypes.TaskGroup.Build;
|
|
987
|
+
result.configurationProperties.group = TaskTypes.TaskGroup.Build._id;
|
|
940
988
|
}
|
|
941
989
|
else if (legacy.isTestCommand === true) {
|
|
942
|
-
result.configurationProperties.group = TaskTypes.TaskGroup.Test;
|
|
990
|
+
result.configurationProperties.group = TaskTypes.TaskGroup.Test._id;
|
|
943
991
|
}
|
|
944
992
|
}
|
|
945
993
|
}
|
|
@@ -966,7 +1014,9 @@ var CustomTask;
|
|
|
966
1014
|
task.hasDefinedMatchers = true;
|
|
967
1015
|
}
|
|
968
1016
|
// promptOnClose is inferred from isBackground if available
|
|
969
|
-
if (task.configurationProperties.promptOnClose === undefined &&
|
|
1017
|
+
if (task.configurationProperties.promptOnClose === undefined &&
|
|
1018
|
+
task.configurationProperties.isBackground === undefined &&
|
|
1019
|
+
globals.promptOnClose !== undefined) {
|
|
970
1020
|
task.configurationProperties.promptOnClose = globals.promptOnClose;
|
|
971
1021
|
}
|
|
972
1022
|
}
|
|
@@ -974,7 +1024,8 @@ var CustomTask;
|
|
|
974
1024
|
function fillDefaults(task, context) {
|
|
975
1025
|
CommandConfiguration.fillDefaults(task.command, context);
|
|
976
1026
|
if (task.configurationProperties.promptOnClose === undefined) {
|
|
977
|
-
task.configurationProperties.promptOnClose =
|
|
1027
|
+
task.configurationProperties.promptOnClose =
|
|
1028
|
+
task.configurationProperties.isBackground !== undefined ? !task.configurationProperties.isBackground : true;
|
|
978
1029
|
}
|
|
979
1030
|
if (task.configurationProperties.isBackground === undefined) {
|
|
980
1031
|
task.configurationProperties.isBackground = false;
|
|
@@ -1023,7 +1074,12 @@ var TaskParser;
|
|
|
1023
1074
|
function isCustomTask(value) {
|
|
1024
1075
|
const type = value.type;
|
|
1025
1076
|
const customize = value.customize;
|
|
1026
|
-
return customize === undefined &&
|
|
1077
|
+
return (customize === undefined &&
|
|
1078
|
+
(type === undefined ||
|
|
1079
|
+
type === null ||
|
|
1080
|
+
type === TaskTypes.CUSTOMIZED_TASK_TYPE ||
|
|
1081
|
+
type === 'shell' ||
|
|
1082
|
+
type === 'process'));
|
|
1027
1083
|
}
|
|
1028
1084
|
function from(externals, globals, context, taskDefinitionRegister) {
|
|
1029
1085
|
const result = { custom: [], configured: [] };
|
|
@@ -1043,22 +1099,25 @@ var TaskParser;
|
|
|
1043
1099
|
CustomTask.fillGlobals(customTask, globals);
|
|
1044
1100
|
CustomTask.fillDefaults(customTask, context);
|
|
1045
1101
|
if (schema2_0_0) {
|
|
1046
|
-
if ((customTask.command === undefined || customTask.command.name === undefined) &&
|
|
1047
|
-
|
|
1102
|
+
if ((customTask.command === undefined || customTask.command.name === undefined) &&
|
|
1103
|
+
(customTask.configurationProperties.dependsOn === undefined ||
|
|
1104
|
+
customTask.configurationProperties.dependsOn.length === 0)) {
|
|
1105
|
+
context.problemReporter.error((0, ide_core_common_1.formatLocalize)('taskConfiguration.noCommandOrDependsOn', "Error: the task '{0}' neither specifies a command nor a dependsOn property. The task will be ignored. Its definition is:\n{1}", customTask.configurationProperties.name, JSON.stringify(external, undefined, 4)));
|
|
1048
1106
|
continue;
|
|
1049
1107
|
}
|
|
1050
1108
|
}
|
|
1051
1109
|
else {
|
|
1052
1110
|
if (customTask.command === undefined || customTask.command.name === undefined) {
|
|
1053
|
-
context.problemReporter.warn((0, ide_core_common_1.formatLocalize)('taskConfiguration.noCommand',
|
|
1111
|
+
context.problemReporter.warn((0, ide_core_common_1.formatLocalize)('taskConfiguration.noCommand', "Error: the task '{0}' doesn't define a command. The task will be ignored. Its definition is:\n{1}", customTask.configurationProperties.name, JSON.stringify(external, undefined, 4)));
|
|
1054
1112
|
continue;
|
|
1055
1113
|
}
|
|
1056
1114
|
}
|
|
1057
|
-
if (customTask.configurationProperties.group === TaskTypes.TaskGroup.Build && defaultBuildTask.rank < 2) {
|
|
1115
|
+
if (customTask.configurationProperties.group === TaskTypes.TaskGroup.Build._id && defaultBuildTask.rank < 2) {
|
|
1058
1116
|
defaultBuildTask.task = customTask;
|
|
1059
1117
|
defaultBuildTask.rank = 2;
|
|
1060
1118
|
}
|
|
1061
|
-
else if (customTask.configurationProperties.group === TaskTypes.TaskGroup.Test &&
|
|
1119
|
+
else if (customTask.configurationProperties.group === TaskTypes.TaskGroup.Test._id &&
|
|
1120
|
+
defaultTestTask.rank < 2) {
|
|
1062
1121
|
defaultTestTask.task = customTask;
|
|
1063
1122
|
defaultTestTask.rank = 2;
|
|
1064
1123
|
}
|
|
@@ -1083,12 +1142,12 @@ var TaskParser;
|
|
|
1083
1142
|
}
|
|
1084
1143
|
context.taskLoadIssues = (0, ide_core_common_1.deepClone)(baseLoadIssues);
|
|
1085
1144
|
}
|
|
1086
|
-
if (
|
|
1087
|
-
defaultBuildTask.task.configurationProperties.group = TaskTypes.TaskGroup.Build;
|
|
1145
|
+
if (defaultBuildTask.rank > -1 && defaultBuildTask.rank < 2 && defaultBuildTask.task) {
|
|
1146
|
+
defaultBuildTask.task.configurationProperties.group = TaskTypes.TaskGroup.Build._id;
|
|
1088
1147
|
defaultBuildTask.task.configurationProperties.groupType = "user" /* user */;
|
|
1089
1148
|
}
|
|
1090
|
-
else if (
|
|
1091
|
-
defaultTestTask.task.configurationProperties.group = TaskTypes.TaskGroup.Test;
|
|
1149
|
+
else if (defaultTestTask.rank > -1 && defaultTestTask.rank < 2 && defaultTestTask.task) {
|
|
1150
|
+
defaultTestTask.task.configurationProperties.group = TaskTypes.TaskGroup.Test._id;
|
|
1092
1151
|
defaultTestTask.task.configurationProperties.groupType = "user" /* user */;
|
|
1093
1152
|
}
|
|
1094
1153
|
return result;
|
|
@@ -1163,7 +1222,8 @@ var Globals;
|
|
|
1163
1222
|
}
|
|
1164
1223
|
Globals.fromBase = fromBase;
|
|
1165
1224
|
function isEmpty(value) {
|
|
1166
|
-
return !value ||
|
|
1225
|
+
return (!value ||
|
|
1226
|
+
(value.command === undefined && value.promptOnClose === undefined && value.suppressTaskName === undefined));
|
|
1167
1227
|
}
|
|
1168
1228
|
Globals.isEmpty = isEmpty;
|
|
1169
1229
|
function assignProperties(target, source) {
|
|
@@ -1184,7 +1244,7 @@ var Globals;
|
|
|
1184
1244
|
}
|
|
1185
1245
|
CommandConfiguration.fillDefaults(value.command, context);
|
|
1186
1246
|
if (value.suppressTaskName === undefined) {
|
|
1187
|
-
value.suppressTaskName =
|
|
1247
|
+
value.suppressTaskName = context.schemaVersion === 2 /* V2_0_0 */;
|
|
1188
1248
|
}
|
|
1189
1249
|
if (value.promptOnClose === undefined) {
|
|
1190
1250
|
value.promptOnClose = true;
|
|
@@ -1222,7 +1282,7 @@ var ExecutionEngine;
|
|
|
1222
1282
|
return TaskTypes.ExecutionEngine.Terminal;
|
|
1223
1283
|
}
|
|
1224
1284
|
else {
|
|
1225
|
-
throw new Error(
|
|
1285
|
+
throw new Error("Shouldn't happen.");
|
|
1226
1286
|
}
|
|
1227
1287
|
}
|
|
1228
1288
|
ExecutionEngine.from = from;
|
|
@@ -1357,12 +1417,16 @@ class ConfigurationParser {
|
|
|
1357
1417
|
globalTasks = TaskParser.from(fileConfig.linux.tasks, globals, context, taskDefinitionRegister).custom;
|
|
1358
1418
|
externalGlobalTasks = fileConfig.linux.tasks;
|
|
1359
1419
|
}
|
|
1360
|
-
if (context.schemaVersion === 2 /* V2_0_0 */ &&
|
|
1420
|
+
if (context.schemaVersion === 2 /* V2_0_0 */ &&
|
|
1421
|
+
globalTasks &&
|
|
1422
|
+
globalTasks.length > 0 &&
|
|
1423
|
+
externalGlobalTasks &&
|
|
1424
|
+
externalGlobalTasks.length > 0) {
|
|
1361
1425
|
const taskContent = [];
|
|
1362
1426
|
for (const task of externalGlobalTasks) {
|
|
1363
1427
|
taskContent.push(JSON.stringify(task, null, 4));
|
|
1364
1428
|
}
|
|
1365
|
-
context.problemReporter.error((0, ide_core_common_1.formatLocalize)('TaskParse.noOsSpecificGlobalTasks',
|
|
1429
|
+
context.problemReporter.error((0, ide_core_common_1.formatLocalize)('TaskParse.noOsSpecificGlobalTasks', "Task version 2.0.0 doesn't support global OS specific Convert them to a task with a OS specific command. Affected tasks are:\n{0}", taskContent.join('\n')));
|
|
1366
1430
|
}
|
|
1367
1431
|
let result = { custom: [], configured: [] };
|
|
1368
1432
|
if (fileConfig.tasks) {
|
|
@@ -1371,11 +1435,17 @@ class ConfigurationParser {
|
|
|
1371
1435
|
if (globalTasks) {
|
|
1372
1436
|
result.custom = TaskParser.assignTasks(result.custom, globalTasks);
|
|
1373
1437
|
}
|
|
1374
|
-
if ((!result.custom || result.custom.length === 0) &&
|
|
1438
|
+
if ((!result.custom || result.custom.length === 0) && globals.command && globals.command.name) {
|
|
1375
1439
|
const matchers = ProblemMatcherConverter.from(fileConfig.problemMatcher, context);
|
|
1376
|
-
const isBackground = fileConfig.isBackground
|
|
1440
|
+
const isBackground = fileConfig.isBackground
|
|
1441
|
+
? !!fileConfig.isBackground
|
|
1442
|
+
: fileConfig.isWatching
|
|
1443
|
+
? !!fileConfig.isWatching
|
|
1444
|
+
: undefined;
|
|
1377
1445
|
const name = TaskTypes.CommandString.value(globals.command.name);
|
|
1378
|
-
const task = new TaskTypes.CustomTask(context.uuidMap.getUUID(name), Object.assign({}, source, {
|
|
1446
|
+
const task = new TaskTypes.CustomTask(context.uuidMap.getUUID(name), Object.assign({}, source, {
|
|
1447
|
+
config: { index: -1, element: fileConfig, workspaceFolder: context.workspaceFolder },
|
|
1448
|
+
}), name, TaskTypes.CUSTOMIZED_TASK_TYPE, {
|
|
1379
1449
|
name: undefined,
|
|
1380
1450
|
runtime: undefined,
|
|
1381
1451
|
presentation: undefined,
|
|
@@ -1383,7 +1453,7 @@ class ConfigurationParser {
|
|
|
1383
1453
|
}, false, { reevaluateOnRerun: true }, {
|
|
1384
1454
|
name,
|
|
1385
1455
|
identifier: name,
|
|
1386
|
-
group: TaskTypes.TaskGroup.Build,
|
|
1456
|
+
group: TaskTypes.TaskGroup.Build._id,
|
|
1387
1457
|
isBackground,
|
|
1388
1458
|
problemMatchers: matchers,
|
|
1389
1459
|
});
|
|
@@ -1413,7 +1483,7 @@ function parse(workspaceFolder, platform, configuration, logger, taskDefinitionR
|
|
|
1413
1483
|
}
|
|
1414
1484
|
try {
|
|
1415
1485
|
uuidMap.start();
|
|
1416
|
-
return
|
|
1486
|
+
return new ConfigurationParser(workspaceFolder, platform, logger, uuidMap, taskDefinitionRegister.createTaskIdentifier, problemMatcherRegister.get, problemPatternRegister.get).run(configuration, taskDefinitionRegister);
|
|
1417
1487
|
}
|
|
1418
1488
|
finally {
|
|
1419
1489
|
uuidMap.finish();
|