Description
openedon Jun 15, 2023
Something I would like to be able to do but isn't currently supported is running a specific phase, in a specific project, but in a safe manner.
Summary
Currently the only choice I'm aware of is rush <phase-name> -o <project-name>
but that is an unsafe operation, if there are other phases that need to be executed to execute this phase Rush won't do it, instead the phase will fail.
But if I do something like rush <phase-name> -t <project-name>
it will do it safely, but it will execute this phase for all upstream projects as well which isn't what I want. I want only the required upstream phases to run, not including the phase itself as I only want that to run in the specific project (unless the phase depended on it's upstream phases to, like build would).
ie, we have a phase to run the build-storybook script. I want to build a specific packages storybook, but I want to ensure that all of it's upstream dependencies have been built. Currently I would have to do rush build -t <project-name>
and then rush build-storybook -o <project-name>
when I really just want to go rush build-storybook --only-but-safe <project-name>
.
That causes the build phase to run for all upstream packages, but the build-storybook phase only runs in <project-name>
instead of all upstream packages.
I already raised this on Zulip where Pete replied, so I'll copy in his reply for extra context
This makes sense, but there are lots of design possibilities. Here's a couple other ideas:
rush test --to my-project --phased-dependences
: This flag would modify the selector parameters (--from
,--impacted-by
,--to -except
) so that their granularity is phases rather than commands.rush run-phase --to my-project[_phase:build]
: This syntax would allow specifying a phase name as a target, and then--to
would automatically have granularity of phases (for that CLI parameter). If you wanted multiple phases, they could be separated by commas:rush run-phase --to my-project[_phase:build,_phase:docs] --from my-library
Metadata
Assignees
Labels
Type
Projects
Status
General Discussions