Skip to content

Commit 31dbbd2

Browse files
committed
Better handle status updates for build tasks
For tasks in the "build" group like those provided by the extension, we can ignore parsing the build output for completion and instead wait for the fallback of waiting for the task to end. Issue: #1477
1 parent 17883e5 commit 31dbbd2

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/ui/SwiftBuildStatus.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ export class SwiftBuildStatus implements vscode.Disposable {
6464
}
6565

6666
const execution = task.execution as SwiftExecution;
67+
const isBuildTask = task.group === vscode.TaskGroup.Build;
6768
const disposables: vscode.Disposable[] = [];
6869
const handleTaskOutput = (update: (message: string) => void) =>
6970
new Promise<void>(res => {
@@ -75,6 +76,7 @@ export class SwiftBuildStatus implements vscode.Disposable {
7576
this.outputParser(
7677
new RunningTask(task).name,
7778
execution,
79+
isBuildTask,
7880
showBuildStatus,
7981
update,
8082
done
@@ -107,6 +109,7 @@ export class SwiftBuildStatus implements vscode.Disposable {
107109
private outputParser(
108110
name: string,
109111
execution: SwiftExecution,
112+
isBuildTask: boolean,
110113
showBuildStatus: ShowBuildStatusOptions,
111114
update: (message: string) => void,
112115
done: () => void
@@ -121,7 +124,8 @@ export class SwiftBuildStatus implements vscode.Disposable {
121124
const lines = sanitizedData.split(/\r\n|\n|\r/gm).reverse();
122125
for (const line of lines) {
123126
if (checkIfBuildComplete(line)) {
124-
return true;
127+
update(name);
128+
return !isBuildTask && true;
125129
}
126130
const progress = this.findBuildProgress(line);
127131
if (progress) {

0 commit comments

Comments
 (0)