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] rush install --only .
installs all dependencies in the monorepo instead of only the dependencies in current folder/project
#4597
Comments
This seems like a recent regression. @dmichon-msft - can you take a look at this, since you refactored the project selection logic? This may have been broken by recent changes to the installation algorithm. @g-chao, @william2958 - Would you two mind taking a look at this as well, as you guys changed this logic most recently? |
Do we know which Rush version introduced this regression? |
Notice that @elenasch cited Rush 5.112.2 which is from December. Is this really a regression? Maybe it is just an edge case. I'm actually unclear what |
It might make sense to forbid the unsafe selectors ( @dmichon-msft what do you think? |
Similar issue happens with |
If you run with |
It looks like it is there. Are there any other settings that look out of place ?
|
@dmichon-msft I ran just the raw |
I encountered a similar problem. After we upgraded pnpm7 to pnpm8, rush install --to projectName no longer installs the dependencies of the project specified by --to. After execution, all dependencies of the entire monorepo are installed. I would like to ask if anyone has the same problem. rush version: 5.115.0 If I revert back to pnpm7, everything will be normal. |
Summary
The RushJS documentation for rush install states that I can run with
--only
flag which will select only the one specified project and install only the dependencies for that project. However that doesn't seem the case and all monorepo's projects' dependencies are still getting installed.Repro steps
To reproduce, run
rush purge
first, thenrush install --only .
in any folder, and see what gets installed. You will see that rush installs all monorepo dependencies, and not only the specified project.It takes a significant amount of time to install and I can see a line line this in logs
Scope: 8 of 219 workspace projects
andProgress: resolved 3620, reused 3550, downloaded 0, added 3076
in logs.I tested with
rush install --to .
as well, and I see this log lineScope: 8 of 219 workspace projects
. 8 is the correct number of selected projects as oppose toScope: all 219 workspace projects
generated forrush install
However, watching the installation progress, it always results in
Progress: resolved 3620, reused 0, downloaded 3550, added 3076 done
--> same amount of packages downloaded and added for any of the flags (or no flags) specifiedStandard questions
Please answer these questions to help us investigate your issue more quickly:
@microsoft/rush
globally installed version?rushVersion
from rush.json?useWorkspaces
from rush.json?node -v
)?The text was updated successfully, but these errors were encountered: