Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TestExplorer should not be triggering builds using SwiftExecOperation #808

Closed
adam-fowler opened this issue May 17, 2024 · 0 comments · Fixed by #814
Closed

TestExplorer should not be triggering builds using SwiftExecOperation #808

adam-fowler opened this issue May 17, 2024 · 0 comments · Fixed by #814
Assignees

Comments

@adam-fowler
Copy link
Contributor

If the test list fails then a build is triggered. We can't use SwiftExecOperation for builds they can be long operations. Using SwiftExecOperation means you can't see the result of the build, it is a long process you have no control over.

Use this instead

// get buildall task and execute it
const backgroundTask = await getBuildAllTask(this.folderContext);
if (!backgroundTask) {
    return;
}
try {
    await this.folderContext.taskQueue.queueOperation(new TaskOperation(backgroundTask));
} catch {
    // can ignore if running task fails
}    
plemarquand added a commit to plemarquand/vscode-swift that referenced this issue May 21, 2024
Use the buildAllTask instead of SwiftExecOperation to make long this
behaviour the same as other builds in the extension.

Added a task cache since provideTasks can be called multiple times and
the most recently returned task is held by VSCode. If we attempted
created the build all task and hooked up the event listeners but then
provideTasks was called again before the task was executed, the executed
task would not be the one we were listening to.

Fixes swiftlang#808
plemarquand added a commit to plemarquand/vscode-swift that referenced this issue May 21, 2024
Use the buildAllTask instead of SwiftExecOperation to make long this
behaviour the same as other builds in the extension.

Added a task cache since provideTasks can be called multiple times and
the most recently returned task is held by VSCode. If we attempted
created the build all task and hooked up the event listeners but then
provideTasks was called again before the task was executed, the executed
task would not be the one we were listening to.

Fixes swiftlang#808
plemarquand added a commit that referenced this issue May 22, 2024
Use the buildAllTask instead of SwiftExecOperation to make long this
behaviour the same as other builds in the extension.

Added a task cache since provideTasks can be called multiple times and
the most recently returned task is held by VSCode. If we attempted
created the build all task and hooked up the event listeners but then
provideTasks was called again before the task was executed, the executed
task would not be the one we were listening to.

Fixes #808
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants