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

Do not block initialization of the build server when build server is unresponsive in returning the list of test files #1999

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

ahoppen
Copy link
Member

@ahoppen ahoppen commented Feb 25, 2025

Depends on #1996


We were blocking the initialization response on self.buildSystemManager.testFiles, which requires the list of test files to be determined. Make that operation asynchronous so that a slow build server can’t take down all of SourceKit-LSP.

…ead of `BuiltInBuildSystem`

This gives the injected build system more flexibility by being able to respond to all BSP messages instead of only those methods defined in `BuiltInBuildSystem`.
…element in a collection

This is simpler to reason about than creating a `TaskGroup`.
…unresponsive in returning the list of test files

We were blocking the initialization response on `self.buildSystemManager.testFiles`, which requires the list of test files to be determined. Make that operation asynchronous so that a slow build server can’t take down all of SourceKit-LSP.
await body(element)
}
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Doesn't this need either a wait on each of the tasks or a taskGroup.waitForAll()?

Copy link
Member Author

Choose a reason for hiding this comment

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

No, from the documentation of withTaskGroup. I only learned this now, which is why I had waitForAll in older implementations.

A group waits for all of its child tasks to complete or be canceled before it returns.

@ahoppen
Copy link
Member Author

ahoppen commented Feb 26, 2025

@swift-ci Please test

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.

3 participants