-
Notifications
You must be signed in to change notification settings - Fork 614
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] preferredVersions doesn't work when subspace is enabled. #5118
Comments
After debugging rush-lib, I found that First time: rushstack/libraries/rush-lib/src/logic/pnpm/PnpmfileConfiguration.ts Lines 80 to 83 in 438525c
Second time: rushstack/libraries/rush-lib/src/logic/pnpm/SubspacePnpmfileConfiguration.ts Lines 50 to 56 in 438525c
The second write operation will overwrite the first write content. And Maybe we should distinguish the file names written twice, one is named |
Summary
I am trying to enable subspace in my repo by flowing the doc. Then discovered a problem: After enabling the subspace feature, the preferredVersions in common-version will not take effect.
Details
when subspace is disable, rush will create a file named as
pnpmfileSettings.json
including preferredVersions.rushstack/libraries/rush-lib/src/logic/pnpm/IPnpmfile.ts
Lines 13 to 22 in e64a1e5
Then, pnpmfile.cjs read preferredVersions from
pnpmfileSettings.json
and it can set the preferred versions on the dependency maprushstack/libraries/rush-lib/src/logic/pnpm/PnpmfileShim.ts
Lines 82 to 103 in e64a1e5
However, when subspace is enable,
pnpmfileSettings.json
no longer contains preferredVersion informationrushstack/libraries/rush-lib/src/logic/pnpm/IPnpmfile.ts
Lines 34 to 39 in e64a1e5
rush create a file named as
global-pnpmfile.cjs
and it doesn't seem to implement any logic related to preferredVersions.rushstack/libraries/rush-lib/src/logic/pnpm/SubspaceGlobalPnpmfileShim.ts
Lines 34 to 64 in e64a1e5
Subspace does not support preferredVersions, does it?
Standard 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: