@codingame/monaco-vscode-task-service-override 26.2.2 → 27.0.0
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/package.json +2 -2
- package/vscode/src/vs/workbench/contrib/tasks/browser/abstractTaskService.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/tasks/browser/abstractTaskService.js +143 -147
- package/vscode/src/vs/workbench/contrib/tasks/browser/runAutomaticTasks.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/tasks/browser/runAutomaticTasks.js +8 -8
- package/vscode/src/vs/workbench/contrib/tasks/browser/task.contribution.js +47 -47
- package/vscode/src/vs/workbench/contrib/tasks/browser/taskQuickPick.js +17 -17
- package/vscode/src/vs/workbench/contrib/tasks/browser/taskService.js +1 -1
- package/vscode/src/vs/workbench/contrib/tasks/browser/taskTerminalStatus.js +11 -11
- package/vscode/src/vs/workbench/contrib/tasks/browser/tasksQuickAccess.js +2 -2
- package/vscode/src/vs/workbench/contrib/tasks/browser/terminalTaskSystem.js +51 -35
- package/vscode/src/vs/workbench/contrib/tasks/common/jsonSchemaCommon.js +41 -41
- package/vscode/src/vs/workbench/contrib/tasks/common/jsonSchema_v1.js +13 -9
- package/vscode/src/vs/workbench/contrib/tasks/common/jsonSchema_v2.js +94 -83
- package/vscode/src/vs/workbench/contrib/tasks/common/problemCollectors.d.ts +5 -3
- package/vscode/src/vs/workbench/contrib/tasks/common/problemCollectors.js +33 -12
- package/vscode/src/vs/workbench/contrib/tasks/common/problemMatcher.d.ts +8 -7
- package/vscode/src/vs/workbench/contrib/tasks/common/problemMatcher.js +93 -83
- package/vscode/src/vs/workbench/contrib/tasks/common/taskConfiguration.d.ts +7 -3
- package/vscode/src/vs/workbench/contrib/tasks/common/taskConfiguration.js +30 -24
- package/vscode/src/vs/workbench/contrib/tasks/common/taskSystem.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/tasks/common/taskTemplates.js +4 -4
|
@@ -22,21 +22,22 @@ var IProblemCollectorEvent;
|
|
|
22
22
|
IProblemCollectorEvent.create = create;
|
|
23
23
|
})(IProblemCollectorEvent || (IProblemCollectorEvent = {}));
|
|
24
24
|
class AbstractProblemCollector extends Disposable {
|
|
25
|
-
constructor(problemMatchers, markerService, modelService, fileService) {
|
|
25
|
+
constructor(problemMatchers, markerService, modelService, fileService, logService) {
|
|
26
26
|
super();
|
|
27
27
|
this.problemMatchers = problemMatchers;
|
|
28
28
|
this.markerService = markerService;
|
|
29
29
|
this.modelService = modelService;
|
|
30
|
+
this.logService = logService;
|
|
30
31
|
this.modelListeners = ( new DisposableStore());
|
|
31
|
-
this._onDidFindFirstMatch = ( new Emitter());
|
|
32
|
+
this._onDidFindFirstMatch = this._register(( new Emitter()));
|
|
32
33
|
this.onDidFindFirstMatch = this._onDidFindFirstMatch.event;
|
|
33
|
-
this._onDidFindErrors = ( new Emitter());
|
|
34
|
+
this._onDidFindErrors = this._register(( new Emitter()));
|
|
34
35
|
this.onDidFindErrors = this._onDidFindErrors.event;
|
|
35
|
-
this._onDidRequestInvalidateLastMarker = ( new Emitter());
|
|
36
|
+
this._onDidRequestInvalidateLastMarker = this._register(( new Emitter()));
|
|
36
37
|
this.onDidRequestInvalidateLastMarker = this._onDidRequestInvalidateLastMarker.event;
|
|
37
38
|
this.matchers = Object.create(null);
|
|
38
39
|
this.bufferLength = 1;
|
|
39
|
-
( problemMatchers.map(elem => createLineMatcher(elem, fileService))).forEach(matcher => {
|
|
40
|
+
( problemMatchers.map(elem => createLineMatcher(elem, fileService, logService))).forEach(matcher => {
|
|
40
41
|
const length = matcher.matchLength;
|
|
41
42
|
if (length > this.bufferLength) {
|
|
42
43
|
this.bufferLength = length;
|
|
@@ -72,7 +73,7 @@ class AbstractProblemCollector extends Disposable {
|
|
|
72
73
|
delete this.openModels[( model.uri.toString())];
|
|
73
74
|
}, this, this.modelListeners));
|
|
74
75
|
this.modelService.getModels().forEach(model => this.openModels[( model.uri.toString())] = true);
|
|
75
|
-
this._onDidStateChange = ( new Emitter());
|
|
76
|
+
this._onDidStateChange = this._register(( new Emitter()));
|
|
76
77
|
}
|
|
77
78
|
get onDidStateChange() {
|
|
78
79
|
return this._onDidStateChange.event;
|
|
@@ -293,9 +294,10 @@ class StartStopProblemCollector extends AbstractProblemCollector {
|
|
|
293
294
|
markerService,
|
|
294
295
|
modelService,
|
|
295
296
|
_strategy = ProblemHandlingStrategy.Clean,
|
|
296
|
-
fileService
|
|
297
|
+
fileService,
|
|
298
|
+
logService
|
|
297
299
|
) {
|
|
298
|
-
super(problemMatchers, markerService, modelService, fileService);
|
|
300
|
+
super(problemMatchers, markerService, modelService, fileService, logService);
|
|
299
301
|
this._hasStarted = false;
|
|
300
302
|
const ownerSet = Object.create(null);
|
|
301
303
|
problemMatchers.forEach(description => ownerSet[description.owner] = true);
|
|
@@ -333,8 +335,8 @@ class StartStopProblemCollector extends AbstractProblemCollector {
|
|
|
333
335
|
}
|
|
334
336
|
}
|
|
335
337
|
class WatchingProblemCollector extends AbstractProblemCollector {
|
|
336
|
-
constructor(problemMatchers, markerService, modelService, fileService) {
|
|
337
|
-
super(problemMatchers, markerService, modelService, fileService);
|
|
338
|
+
constructor(problemMatchers, markerService, modelService, fileService, logService) {
|
|
339
|
+
super(problemMatchers, markerService, modelService, fileService, logService);
|
|
338
340
|
this.lines = [];
|
|
339
341
|
this.beginPatterns = [];
|
|
340
342
|
this.resetCurrentResource();
|
|
@@ -360,7 +362,11 @@ class WatchingProblemCollector extends AbstractProblemCollector {
|
|
|
360
362
|
false,
|
|
361
363
|
true
|
|
362
364
|
)(async markerEvent => {
|
|
363
|
-
if (
|
|
365
|
+
if (markerEvent.length === 0) {
|
|
366
|
+
return;
|
|
367
|
+
}
|
|
368
|
+
const modelEventUriStr = ( modelEvent.uri.toString());
|
|
369
|
+
if ((!( markerEvent.some(uri => ( uri.toString()) === modelEventUriStr))) || (this.markerService.read({
|
|
364
370
|
resource: modelEvent.uri
|
|
365
371
|
}).length !== 0)) {
|
|
366
372
|
return;
|
|
@@ -370,7 +376,6 @@ class WatchingProblemCollector extends AbstractProblemCollector {
|
|
|
370
376
|
await this.processLineInternal(line);
|
|
371
377
|
}
|
|
372
378
|
});
|
|
373
|
-
this._register(markerChanged);
|
|
374
379
|
setTimeout(() => {
|
|
375
380
|
if (markerChanged) {
|
|
376
381
|
const _markerChanged = markerChanged;
|
|
@@ -420,7 +425,15 @@ class WatchingProblemCollector extends AbstractProblemCollector {
|
|
|
420
425
|
async tryBegin(line) {
|
|
421
426
|
let result = false;
|
|
422
427
|
for (const background of this.backgroundPatterns) {
|
|
428
|
+
const start = Date.now();
|
|
423
429
|
const matches = background.begin.regexp.exec(line);
|
|
430
|
+
const elapsed = Date.now() - start;
|
|
431
|
+
if (elapsed > 5) {
|
|
432
|
+
this.logService?.trace(
|
|
433
|
+
`ProblemMatcher: slow begin regexp took ${elapsed}ms to execute`,
|
|
434
|
+
background.begin.regexp.source
|
|
435
|
+
);
|
|
436
|
+
}
|
|
424
437
|
if (matches) {
|
|
425
438
|
if (( this._activeBackgroundMatchers.has(background.key))) {
|
|
426
439
|
continue;
|
|
@@ -450,7 +463,15 @@ class WatchingProblemCollector extends AbstractProblemCollector {
|
|
|
450
463
|
tryFinish(line) {
|
|
451
464
|
let result = false;
|
|
452
465
|
for (const background of this.backgroundPatterns) {
|
|
466
|
+
const start = Date.now();
|
|
453
467
|
const matches = background.end.regexp.exec(line);
|
|
468
|
+
const elapsed = Date.now() - start;
|
|
469
|
+
if (elapsed > 5) {
|
|
470
|
+
this.logService?.trace(
|
|
471
|
+
`ProblemMatcher: slow end regexp took ${elapsed}ms to execute`,
|
|
472
|
+
background.end.regexp.source
|
|
473
|
+
);
|
|
474
|
+
}
|
|
454
475
|
if (matches) {
|
|
455
476
|
if (this._numberOfMatches > 0) {
|
|
456
477
|
this._onDidFindErrors.fire(this.markerService.read({
|
|
@@ -7,6 +7,7 @@ import { IMarkerData } from "@codingame/monaco-vscode-api/vscode/vs/platform/mar
|
|
|
7
7
|
import { ExtensionMessageCollector } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/extensionsRegistry";
|
|
8
8
|
import { Event } from "@codingame/monaco-vscode-api/vscode/vs/base/common/event";
|
|
9
9
|
import { IFileService } from "@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service";
|
|
10
|
+
import { ILogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service";
|
|
10
11
|
export declare enum FileLocationKind {
|
|
11
12
|
Default = 0,
|
|
12
13
|
Relative = 1,
|
|
@@ -96,7 +97,7 @@ export interface ILineMatcher {
|
|
|
96
97
|
next(line: string): IProblemMatch | null;
|
|
97
98
|
handle(lines: string[], start?: number): IHandleResult;
|
|
98
99
|
}
|
|
99
|
-
export declare function createLineMatcher(matcher: ProblemMatcher, fileService?: IFileService): ILineMatcher;
|
|
100
|
+
export declare function createLineMatcher(matcher: ProblemMatcher, fileService?: IFileService, logService?: ILogService): ILineMatcher;
|
|
100
101
|
export declare namespace Config {
|
|
101
102
|
interface IProblemPattern {
|
|
102
103
|
/**
|
|
@@ -179,7 +180,7 @@ export declare namespace Config {
|
|
|
179
180
|
regexp: string;
|
|
180
181
|
}
|
|
181
182
|
namespace CheckedProblemPattern {
|
|
182
|
-
function is(value:
|
|
183
|
+
function is(value: unknown): value is ICheckedProblemPattern;
|
|
183
184
|
}
|
|
184
185
|
interface INamedProblemPattern extends IProblemPattern {
|
|
185
186
|
/**
|
|
@@ -192,7 +193,7 @@ export declare namespace Config {
|
|
|
192
193
|
label?: string;
|
|
193
194
|
}
|
|
194
195
|
namespace NamedProblemPattern {
|
|
195
|
-
function is(value:
|
|
196
|
+
function is(value: unknown): value is INamedProblemPattern;
|
|
196
197
|
}
|
|
197
198
|
interface INamedCheckedProblemPattern extends INamedProblemPattern {
|
|
198
199
|
/**
|
|
@@ -202,15 +203,15 @@ export declare namespace Config {
|
|
|
202
203
|
regexp: string;
|
|
203
204
|
}
|
|
204
205
|
namespace NamedCheckedProblemPattern {
|
|
205
|
-
function is(value:
|
|
206
|
+
function is(value: unknown): value is INamedCheckedProblemPattern;
|
|
206
207
|
}
|
|
207
208
|
type MultiLineProblemPattern = IProblemPattern[];
|
|
208
209
|
namespace MultiLineProblemPattern {
|
|
209
|
-
function is(value:
|
|
210
|
+
function is(value: unknown): value is MultiLineProblemPattern;
|
|
210
211
|
}
|
|
211
212
|
type MultiLineCheckedProblemPattern = ICheckedProblemPattern[];
|
|
212
213
|
namespace MultiLineCheckedProblemPattern {
|
|
213
|
-
function is(value:
|
|
214
|
+
function is(value: unknown): value is MultiLineCheckedProblemPattern;
|
|
214
215
|
}
|
|
215
216
|
interface INamedMultiLineCheckedProblemPattern {
|
|
216
217
|
/**
|
|
@@ -227,7 +228,7 @@ export declare namespace Config {
|
|
|
227
228
|
patterns: MultiLineCheckedProblemPattern;
|
|
228
229
|
}
|
|
229
230
|
namespace NamedMultiLineCheckedProblemPattern {
|
|
230
|
-
function is(value:
|
|
231
|
+
function is(value: unknown): value is INamedMultiLineCheckedProblemPattern;
|
|
231
232
|
}
|
|
232
233
|
type NamedProblemPatterns = (Config.INamedProblemPattern | Config.INamedMultiLineCheckedProblemPattern)[];
|
|
233
234
|
/**
|