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

feat: add support for --parallel #6339

Merged
merged 7 commits into from
Nov 2, 2023

Conversation

chris-olszewski
Copy link
Contributor

@chris-olszewski chris-olszewski commented Nov 1, 2023

Description

This PR hooks up the correct behavior of --parallel

Some code shuffling happens in the first few commits to get the Rust run function in a closer shape the Go code.

Testing Instructions

  • Create a new repo with npx create-turbo
  • Remove installed version of turbo npm rm turbo
  • Add a build script to packages/ui/package.json: "build": "echo 'building'; sleep 5; echo 'done'",
  • turbo_dev build --parallel --experimental-rust-codepath should show that docs#build and web#build start beforeui#build is finished even though they depend on the ui workspace

Closes TURBO-1566

Copy link

vercel bot commented Nov 1, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
examples-vite-web 🔄 Building (Inspect) Visit Preview 💬 Add feedback Nov 2, 2023 4:16pm
10 Ignored Deployments
Name Status Preview Comments Updated (UTC)
examples-basic-web ⬜️ Ignored (Inspect) Visit Preview Nov 2, 2023 4:16pm
examples-cra-web ⬜️ Ignored (Inspect) Visit Preview Nov 2, 2023 4:16pm
examples-designsystem-docs ⬜️ Ignored (Inspect) Visit Preview Nov 2, 2023 4:16pm
examples-gatsby-web ⬜️ Ignored (Inspect) Visit Preview Nov 2, 2023 4:16pm
examples-kitchensink-blog ⬜️ Ignored (Inspect) Visit Preview Nov 2, 2023 4:16pm
examples-native-web ⬜️ Ignored (Inspect) Visit Preview Nov 2, 2023 4:16pm
examples-nonmonorepo ⬜️ Ignored (Inspect) Visit Preview Nov 2, 2023 4:16pm
examples-svelte-web ⬜️ Ignored (Inspect) Visit Preview Nov 2, 2023 4:16pm
examples-tailwind-web ⬜️ Ignored (Inspect) Visit Preview Nov 2, 2023 4:16pm
turbo-site ⬜️ Ignored (Inspect) Visit Preview Nov 2, 2023 4:16pm

Copy link
Contributor

github-actions bot commented Nov 1, 2023

🟢 Turbopack Benchmark CI successful 🟢

Thanks

Copy link
Contributor

github-actions bot commented Nov 1, 2023

🟢 CI successful 🟢

Thanks

@chris-olszewski chris-olszewski marked this pull request as ready for review November 1, 2023 22:44
@chris-olszewski chris-olszewski requested a review from a team as a code owner November 1, 2023 22:44
@@ -120,6 +120,32 @@ impl PackageGraph {
Ok(graph::validate_graph(&self.workspace_graph)?)
}

pub fn no_workspace_dependencies(self) -> Self {
Copy link
Contributor

Choose a reason for hiding this comment

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

Is remove_workspace_dependencies a better name?


if let Some(graph_opts) = opts.run_opts.graph {
match graph_opts {
GraphOpts::File(graph_file) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

just making sure i understand this arm... it's not actually writing the graph to a file yet right? I don't see the engine or pkg_dep_graph used in here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Correct, one of the features left is support for non-DOT --graph support. The todo macro call in this branch will panic when hit.


if !opts.run_opts.parallel {
engine
.validate(pkg_dep_graph, opts.run_opts.concurrency)
Copy link
Contributor

Choose a reason for hiding this comment

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

Just a note that we should fix #4291 with this in the future. I think it's fine to only fix in Rust if we're close

@chris-olszewski chris-olszewski merged commit 22585c9 into main Nov 2, 2023
61 of 62 checks passed
@chris-olszewski chris-olszewski deleted the olszewski/add_parallel_support branch November 2, 2023 17:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants