-
Notifications
You must be signed in to change notification settings - Fork 604
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
[rush] Add a "rush build" CLI parameter for building a project's dependencies but NOT the project #2354
Comments
How about |
I prefer the Maybe an This is probably a pretty straightforward change once we get the design right. |
I'm realizing that I would use this feature heavily. Suppose you're working on a webpack project: $ git pull
$ rush install
$ rush build --to web-app
$ heft start The An option like |
We should also consider how the commands would combine. Today you can do: # Build two different projects
$ rush build --to my-app --to my-service For the watch mode scenario, if # This isn't possible with a blanket "--exclude"
$ rush build --to-but-not my-app --to my-service Or if I'll be doing watch mode for both of them, then I'd want: # Here I need to specify "-but-not" twice, so it needs to be concise
$ rush build --to-but-not my-app --to-but-not my-service Some naming alternatives:
Maybe the short names could be
Hmm... The appeal of If we were using
Aliases increase the amount of stuff people need to learn, without adding benefits. If each person uses their preferred set of aliases, then it's more difficult for other people to understand examples or docs that they share. If we decide that a different name really is more clear, it would be preferable to actually deprecate the old name and eventually remove it, rather than introducing aliases. |
After more thought, I'd like to propose this design: Inclusive:
Non-inclusive:
Some issues with other suggestions:
|
I like |
@octogonz I agree that your naming, being slightly confusing at the beginning once you get used to is nice because of its shortness. Same, I agree on aliasing, that it's nice to keep stuff limited for the sake of consistency and less stuff to support. Having ability to run rush with 2-3 |
Can you give more detail about this? I'm not sure what you're referring to. Also have you looked at |
@octogonz if I do It says
But I never see the output of Maybe I'm doing something wrong? Also is there any shortcuts with |
This problem is unrelated to issue #2354. What does your However if your goal is more like "the watch mode for Webpack/Jest should work across multiple projects in a monorepo" there's already a specific issue #1202 proposing that. Its solution is much more focused and complex than merely "processes that never terminate." Earlier this summer we agreed on a design that will solve it, but nobody has had time to work on it yet.
You can omit the NPM scope, e.g. write |
I'm working on a prototype of this at present because I will need it to approach #1202 / #1122. What would be the expected behavior of:
If
I'm not entirely clear on if (2) or (3) makes the most sense. I'm also looking to change the behavior of:
To mean "build all projects between A (inclusive) and B (inclusive)" instead of the current "build the union of all projects that depend on A and all projects that depend on B" |
Can't wait for this feature to be merged :) |
FYI the PR raised some unexpected design questions. An entire meeting was dedicated to that topic on Thursday 🙂, which straightened everything out, so it should get merged very soon. |
We had a long design discussion about this today. Here's the final spec that we came up with:
With this design, |
@octogonz when it will be published BTW? :) |
It was released with Rush 5.38.0 |
Summary
Quote from the Zulp discussion:
Link to the discussion: https://rushstack.zulipchat.com/#narrow/stream/262513-general/topic/Build.20deps.20but.20app
Proposed solution by @octogonz was to add
--from-but-not
or--dependencies-only
flags.I prefer
--dependencies-only
and--dependents-only
flags as they just sound better and kinda easier to understand than--from
and--to
that are pretty hard to get used to TBH :)--for-dependencies-of
and--for-dependents-of
or smth similar is a bit more verbose maybe, but IMO easier to get :)Thanks! Hopefully this will be added soon :)
The text was updated successfully, but these errors were encountered: