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

Conversation

@mehulkar
Copy link
Contributor

No description provided.

@vercel
Copy link
Contributor

vercel bot commented Jan 16, 2024

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

Name Status Preview Comments Updated (UTC)
examples-designsystem-docs 🔄 Building (Inspect) Visit Preview 💬 Add feedback Jan 23, 2024 9:22pm
examples-vite-web 🔄 Building (Inspect) Visit Preview 💬 Add feedback Jan 23, 2024 9:22pm
turbo-site ✅ Ready (Inspect) Visit Preview Jan 23, 2024 9:22pm
8 Ignored Deployments
Name Status Preview Comments Updated (UTC)
examples-basic-web ⬜️ Ignored (Inspect) Visit Preview Jan 23, 2024 9:22pm
examples-gatsby-web ⬜️ Ignored (Inspect) Visit Preview Jan 23, 2024 9:22pm
examples-kitchensink-blog ⬜️ Ignored (Inspect) Visit Preview Jan 23, 2024 9:22pm
examples-native-web ⬜️ Ignored (Inspect) Visit Preview Jan 23, 2024 9:22pm
examples-nonmonorepo ⬜️ Ignored (Inspect) Visit Preview Jan 23, 2024 9:22pm
examples-svelte-web ⬜️ Ignored (Inspect) Visit Preview Jan 23, 2024 9:22pm
examples-tailwind-web ⬜️ Ignored (Inspect) Visit Preview Jan 23, 2024 9:22pm
rust-docs ⬜️ Ignored (Inspect) Visit Preview Jan 23, 2024 9:22pm

@github-actions
Copy link
Contributor

github-actions bot commented Jan 16, 2024

🟢 Turbopack Benchmark CI successful 🟢

Thanks

@github-actions
Copy link
Contributor

github-actions bot commented Jan 16, 2024

🟢 CI successful 🟢

Thanks

.cloned()
.map(SinglePackageTaskSummary::from)
.collect::<Vec<_>>();
tasks.sort_by(|t1, t2| t1.task_id.cmp(&t2.task_id));
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removing extra sort() because tasks are sorted during normalization: https://github.com/vercel/turbo/blob/1dd2e93e84e08872f67943804a6600f0e91a124a/crates/turborepo-lib/src/run/summary/mod.rs#L770

Since this sort only applies to SinglePackageRunSummary, it made more sense to do it when we care about sorting. If the implementation is the same as in Go, it should apply to dry runs as well as run summary!

I can also revert this part if we aren't confident about that.

Copy link
Contributor

Choose a reason for hiding this comment

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

I would say we remove the second sort in normalize over this one as other callers might depend on the list being sorted.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

But then I'd also need another sort somewhere else for monorepos (this one that is removed is only for when converting from monorepo to single package summary).

but point made, I'll keep this one and the duplicate since it's not related to this fix anyway

dependencies: dependencies
.into_iter()
.map(|task_id| task_id.task().to_string())
.sorted()
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This from implementation is used by the into() call here: https://github.com/vercel/turbo/blob/1dd2e93e84e08872f67943804a6600f0e91a124a/crates/turborepo-lib/src/run/summary/task.rs#L211

it only runs for SinglePackageTaskSummary. Since we have moved the sorting to the normalize() step, we shouldn't need it here.

Copy link
Contributor Author

@mehulkar mehulkar left a comment

Choose a reason for hiding this comment

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

self review

Copy link
Contributor

@chris-olszewski chris-olszewski left a comment

Choose a reason for hiding this comment

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

Stamping, but I would love either a unit or integration test. Or just a manual test that shows before/after behavior of this change.

.cloned()
.map(SinglePackageTaskSummary::from)
.collect::<Vec<_>>();
tasks.sort_by(|t1, t2| t1.task_id.cmp(&t2.task_id));
Copy link
Contributor

Choose a reason for hiding this comment

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

I would say we remove the second sort in normalize over this one as other callers might depend on the list being sorted.

@chris-olszewski chris-olszewski added the pr: fixship A PR which is approved with notes and does not require re-review. label Jan 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr: fixship A PR which is approved with notes and does not require re-review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants