这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@gsoltis
Copy link
Contributor

@gsoltis gsoltis commented Mar 12, 2022

The main change in this PR switches the task graph construction to add edges only between direct dependencies, rather than the entire ancestor subtree.

As an example, say a depends on b, b depends on c. If b#build depends on c#some-task, and a#builddepends on^build`.

Currently, running a#build will do c#some-task, c#build, b#build, and a#build.
But, we don't need c#build. We just need c#some-task, since that's what b#build depends on, and a doesn't really know anything about c directly, just via b. So, we instead just draw an edge to direct dependencies, and then let them sort out their own dependencies.

For a large example, here are before and after graphs for running turbo run build in examples/kitchen-sink:

Before:
shallow

After:
deep

Also get rid of an unused field, taskDeps, on Scheduler.

@vercel
Copy link
Contributor

vercel bot commented Mar 12, 2022

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/vercel/turbo-site/CicA14peWtnnXAMwD84KmqhpEh17
✅ Preview: https://turbo-site-git-gsoltis-directdeps.vercel.sh

@gsoltis gsoltis marked this pull request as ready for review March 12, 2022 00:53
@kodiakhq kodiakhq bot merged commit eee3387 into main Mar 12, 2022
@kodiakhq kodiakhq bot deleted the gsoltis/direct_deps branch March 12, 2022 01:58
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