Skip to content

Conversation

award999
Copy link
Contributor

@award999 award999 commented Sep 25, 2025

Description

This is not related to background indexing, but instead the optional background compilation feature that runs a build task on save. Essentially when swift.backgroundCompilation.useDefaultTask is enabled, any swift task marked as the default "build" group task will be used instead of the Build All task. This way the whole world is not built for large projects.

Issue: #1320

Tasks

  • Required tests have been written
  • Documentation has been updated
  • Added an entry to CHANGELOG.md if applicable

This is not related to background indexing, but instead the optional
background compilation feature that runs a build task on save. Essentially
when `swift.backgroundCompilation.useDefaultTask` is enabled, any `swift`
task marked as the default "build" group task will be used instead of
the Build All task. This way the whole world is not built for large projects.

Issue: swiftlang#1320
let swiftTask: vscode.Task;
let nonSwiftTask: vscode.Task;
let backgroundConfiguration: BackgroundCompilation;
const useDefaultTaskConfig = mockGlobalValue(configuration, "useDefaultTask");
Copy link
Member

@matthewbastien matthewbastien Sep 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question: Should we just use the actual VS Code APIs here since it's an integration test? I don't think it would add much runtime to the test itself. Can even use the updateSettings() utility method that Paul added a while back which comes with the ability to restore settings after the test finishes.

Might even be able to update the tasks.json too instead of mocking, but I'm not sure how easy that would be.

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 this pull request may close these issues.

2 participants