-
-
Notifications
You must be signed in to change notification settings - Fork 637
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
BSP: Streaming compilation and test results asynchronously to IDEs #14885
Labels
Comments
At a high level, what I think this will look like is:
So, AFAICT, this should be unblocked, and the bulk of the work will involve figuring out where to add |
stuhood
changed the title
BSP design: streaming compilation and test results asynchronously to IDEs
BSP: Streaming compilation and test results asynchronously to IDEs
Apr 7, 2022
This was referenced May 9, 2022
stuhood
added a commit
that referenced
this issue
May 13, 2022
Adds BSP [task notifications](https://build-server-protocol.github.io/docs/specification.html#task-notifications) for compile tasks, to render individual Pants (coarsened) targets as progress within the compile for a particular BSP `BuildTarget`. #14885 discusses unifying the `StreamingWorkunitHandler` infrastructure with task notifications (which is expanded on in #15426). While that might still be a good idea in the medium term, deciding how to filter workunits to make them fully useful to BSP is challenging, and so was broken out into #15426. Fixes #14885. [ci skip-rust] [ci skip-build-wheels]
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Background
The BSP protocol provides a mechanism for BSP servers to send streaming results of compilation tasks and test tasks to BSP
clients (i.e., IDEs) via async notifications over the BSP connection. Task start and finish notifications are mandatory; progress notifications are recommended.
Pants currently streams compilation results during
./pants check
as a side effect of the fact that the various backend-specific types used for compilation implementEngineAwareReturnType
. If an error occurs, the type implementingEngineAwareReturnType
will change its level toERROR
, thus causing the dynamic UI to render the error.This approach may not work for BSP because for BSP Pants should send asynchronous notifications of not only build results and but also logs from build actions as they occur. It would also be good if the BSP rules were decoupled from the language backends so there was no direct knowledge of BSP in the language compilation rules.
BSP supports the following types of task-related notifications. A "task ID" in BSP is a unique ID that can also specify the task IDs for its parents. Thus, there is a parent-child relationship between tasks.
The types of task-related notifications include:
Task notifications can carry data related to the specific kind of task they represent. BSP predefines data for compilation and tests:
Design Needed
For this issue, we should design how streaming notifications of engine actions should occur in a way that is decoupled from the ultimate destination of those streaming notifications. The two initial users of this design would be the Pants dynamic UI and BSP rules.
The text was updated successfully, but these errors were encountered: