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

Conversation

@anthonyshew
Copy link
Contributor

@anthonyshew anthonyshew commented Jun 29, 2025

Description

We weren't checking fields that are root turbo.json-only aren't being used in Package Configurations - and vice versa. I did a check of this nature in #10590 and have refactored that to a function that we can now use for other fields. Additionally, I've brought that idea along to the reverse situation.

Testing Instructions

Added some tests ensuring the desired logic is what happens.

@anthonyshew anthonyshew requested a review from a team as a code owner June 29, 2025 19:30
@vercel
Copy link
Contributor

vercel bot commented Jun 29, 2025

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

Name Status Preview Comments Updated (UTC)
examples-basic-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 1, 2025 6:36pm
examples-designsystem-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 1, 2025 6:36pm
examples-gatsby-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 1, 2025 6:36pm
examples-kitchensink-blog ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 1, 2025 6:36pm
examples-native-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 1, 2025 6:36pm
examples-nonmonorepo ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 1, 2025 6:36pm
examples-svelte-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 1, 2025 6:36pm
examples-tailwind-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 1, 2025 6:36pm
examples-vite-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 1, 2025 6:36pm
turbo-site ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 1, 2025 6:36pm

@@ -1,7 +1,5 @@
{
"$schema": "https://turborepo.com/schema.json",
"globalDependencies": ["foo.txt"],
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Exactly the sort of thing we want to catch! Got caught here: https://github.com/vercel/turborepo/actions/runs/15958914313/job/45008819478

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.

Just to reduce the overhead of keeping the disallow list up to date as we add fields, I think we should move to an allow list. This will probably mean splitting the TurboJson schema to be a root and package one where the package one is only extends and tasks.

@anthonyshew anthonyshew changed the title refactor: util for checking root turbo.json only fields fix: validation for root turbo.json vs. Package Configurations Jul 1, 2025
@anthonyshew
Copy link
Contributor Author

anthonyshew commented Jul 1, 2025

Great point. Re-approaching it that way.

}

#[test]
fn test_allowlist_forces_explicit_categorization() {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure if I want this test or not.

@anthonyshew
Copy link
Contributor Author

This really turned out to not be much fun at all. 😂

@anthonyshew
Copy link
Contributor Author

anthonyshew commented Jul 3, 2025

This has turned into needing pre-factors. Putting this in draft while I work on those.

@anthonyshew anthonyshew marked this pull request as draft July 3, 2025 00:22
anthonyshew added a commit that referenced this pull request Jul 3, 2025
### Description

Pre-work for #10610. Not all of
our fields have spans, so we need to add them to get better at doing
error reporting in some situations.

---------

Co-authored-by: Chris Olszewski <chris.olszewski@vercel.com>
@anthonyshew
Copy link
Contributor Author

We did some other pre-work which invalidates this one!

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