Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
refactor(turborepo): Package Detection #7549
refactor(turborepo): Package Detection #7549
Changes from 11 commits
0c030cf
e2edc50
045df53
276a632
d1a40c4
8bf8215
4233065
c22d2ec
3386cd3
c3f48bb
1b9de4d
fdbbae6
b191cb3
c4ca9e2
fb4f85b
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
I'm having trouble tracing this code. Does the
global_deps_matcher
always get the default global deps ofpackage.json
/turbo.json
added to it? Otherwise we'll incorrectly map apackage.json
change just be a root package change instead of a all change.Or I'm misunderstanding these changes completely and this codepath isn't hit in that scenario.
Edit: I was misunderstanding, default global deps are checked at
ChangeMapper
which uses a package detector if a default global change isn't detectedThere 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.
Can we return
None
here? This implementation implies that we're talking aboutglobalDependencies
in turbo.json. Is there a scenario in which it's valuable to know that the root package changed or would it just get ignored by the caller?Higher level: I'm concerned about inventing a semantic meaning of
WorkspacePackage::root()
. So far, "root package changed" has roughly implied that "all packages changed". But in this PR, we're separating the concepts of "all" and "root package", so we can no longer ignore paper over what a "root package" is.Our definition of package is roughly equivalent to the package managers definition, and there are no package managers that consider the root of a "workspace" a package itself.
What do you think?
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.
So I think there's a few misunderstandings (not helped by the multiple iterations of this PR):
//#build
entry in pipeline. We can't remove this root package return because that would be a breaking change for people with root package tasks.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.
Nit: can we just the value here instead of depending on the default value of
TurboJson
?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.
Sorry, I'm confused. In what part are we depending on the default value?