Skip to content

Commit beec5e6

Browse files
authored
Fix hanging build status in vscode 1.92 (#998)
Is hanging build status when debugging a test. The build task ends but the status keeps churning, never hiding itself. For some reason the execution's emitter never fires. For now putting this fix in to prevent the hang.
1 parent 9548412 commit beec5e6

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

src/TestExplorer/TestRunner.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -701,7 +701,7 @@ export class TestRunner {
701701
const subscriptions: vscode.Disposable[] = [];
702702
let buildExitCode = 0;
703703
const buildTask = vscode.tasks.onDidStartTask(e => {
704-
if (e.execution.task.name === "Build All") {
704+
if (e.execution.task.name === buildAllTask.name) {
705705
const exec = e.execution.task.execution as SwiftExecution;
706706
const didCloseBuildTask = exec.onDidClose(exitCode => {
707707
buildExitCode = exitCode ?? 0;

src/ui/SwiftBuildStatus.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,12 @@ export class SwiftBuildStatus implements vscode.Disposable {
7676
done();
7777
}
7878
}),
79-
execution.onDidClose(done)
79+
execution.onDidClose(done),
80+
vscode.tasks.onDidEndTask(e => {
81+
if (e.execution.task === task) {
82+
done();
83+
}
84+
})
8085
);
8186
});
8287
if (showBuildStatus === "progress" || showBuildStatus === "notification") {

0 commit comments

Comments
 (0)