-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
feat: sibling tasks #9504
feat: sibling tasks #9504
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
8 Skipped Deployments
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one question around extends
|
||
/// Adds a sibling relationship from task to sibling | ||
pub fn with_sibling(&mut self, task: TaskName<'static>, sibling: &TaskName) { | ||
if self.extends.is_empty() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the reason for this? Do we only add siblings to workspace configs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At this moment, yes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we document this then?
Co-authored-by: Nicholas Yang <[email protected]>
Description
This PR does 2 things:
sibling
attribute for task definitions that has the ability to bring another task into the graph without depending on it. This is currently only an attribute that can be set by us inside Rust, but I hope this use case proves useful enough to eventually make this a public API.siblings
where each dev task gets a"siblings": ["mfe-pkg#proxy"]
to ensure the proxy gets run.A sibling relationship acts similar to
dependsOn
except that it will not wait for the task to exit before starting and the sibling's task hash will not affect the current task's hash.Currently it's very hard to get
web#proxy
to run if the user runs a command liketurbo dev --filter=docs
as just addingweb
to the filter will meanweb#dev
gets picked up which isn't what we desire. As you can see inrun/builder.rs
this also removes the need of microfrontend knowledge from building the task graph.Testing Instructions
Added unit tests for sibling behavior as well as unit tests for MFE task injection.
Manual testing for the MFE behavior to make sure proxy still gets picked up.