-
Notifications
You must be signed in to change notification settings - Fork 79
Don't add to graph scripts missing from package.json #593
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
base: master
Are you sure you want to change the base?
Don't add to graph scripts missing from package.json #593
Conversation
✅ Deploy Preview for peppy-praline-1c3272 canceled.
|
|
So, we really can't assume knowledge of whether to add something to the graph or not here in this package. We may need to factor the workspace target graph builder OUT of this package so it can know about "runners". The runners themselves tell you whether the target "shouldRun()" something. Based on that flag, then we can determine if the graph should be trimmed or not. |
kenotron
left a comment
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.
Please check my message. If you're up for it, we can chat more offline about the approach.
|
Here's what to do next:
|
|
|
One thing to consider here is that sometimes phantom/virtual tasks are desirable to use as a sort of generic node in a dependency graph. For example, I have a pipeline Also, it would be nice to be able to have a script that does exist in package.json but you don't want to run it - for example I have a script in package.json I can run manally that runs |
|
Which is to say I'd rather this not be merged unless there's some option to control whether a given task gets handled this way or the old way - otherwise I'll have to add dummy no-op scripts for all the places I'm making use of the current behavior. |
|
One way to support different logic for pipelines would be to add more options for the
|
|
Hmm actually looking at the code I see you can set a pipeline item to |

Avoid adding packages to build graph when not specified. This will be highly impactful for our build times of our PR Deployment environment as we'd be able to just bundle packages, we deploy to this environment instead of the full repo. In our build pipelines where we need to build everything, we can add
buildto the Lage tasks.Manual Validation
Within our team's repo, I was able to confirm that running
lage testran all test tasks our team has, and avoided building packages without tests and that were not in any dependency path. We went from having to build 117 packages to 108.I can share the results with you privately to avoid sharing any private package names here :)
Fixes #592