[rush] pnpm 11: allow supportedArchitectures setting
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 48/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- node.js, typescript
- Lĩnh vực
- build-system, tooling
Hướng nghiên cứu
Start with pnpm-config.json handling and the generation of common/temp/package.json and common/temp/pnpm-workspace.yaml. Compare the regular install path with the rush add/remove paths and review issue #5168 about plugin hooks. Done means supportedArchitectures takes effect under pnpm 11, or Rush clearly warns or fails when the setting cannot be applied.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
I have looked through the docs and related issues but didn't find anything that quite matches this issue.
Summary
Until pnpm 10 we could use the unsupportedPackageJsonSettings.pnpm.* in the pnpm-config.json to specify supportedArchitectures, but under pnpm 11, it no longer has an effect. Rush still copies it into the pnpm field of common/temp/package.json, but pnpm 11 no longer reads it. pnpm only prints a warning (see below) and rush install succeeds but the native dependencies are not installed.
Repro steps
-
rushVersion5.179.0,pnpmVersion11.26.0,useWorkspaces: true. -
In
common/config/rush/pnpm-config.json:"unsupportedPackageJsonSettings": { "pnpm": { "supportedArchitectures": { "libc": ["current", "musl"] } } } -
Add a dependency with native extensions such as
@statsig/statsig-node-core -
rush install
Expected result: pnpm applies supportedArchitectures as it did with pnpm 10. Failing that, Rush should warn or fail because the setting cannot take effect.
Actual result: rush install runs successfully, and pnpm prints:
[WARN] The "pnpm" field in package.json is no longer read by pnpm. The following keys were ignored: "pnpm.supportedArchitectures". See https://pnpm.io/settings for the new home of each setting.
Details
environmentVariables in pnpm-config.json cannot be used for this either. pnpm 11 does not parse an object setting from pnpm_config_supported_architectures or npm_config_supported_architectures, so pnpm config get supported-architectures returns undefined. It only reads the setting from pnpm-workspace.yaml.
Proposed solutions:
- Add a sibling escape hatch like
unsupportedPackageJsonSettingsbut forpnpm-workspace.yaml. - Add a first-class
supportedArchitecturesfield topnpm-config.json. - Separately, warn loudly when
unsupportedPackageJsonSettings.pnpmis non-empty under pnpm >= 11.
As a workaround, we use a local Rush plugin that appends the key to common/temp/pnpm-workspace.yaml in beforeInstall. However it does not apply to the installs that rush add/rush remove run, because those installs do not fire plugin hooks (see: #5168).
Standard questions
| Question | Answer |
|---|---|
@microsoft/rush globally installed version? |
5.179.0 |
rushVersion from rush.json? |
5.179.0 |
pnpmVersion, npmVersion, or yarnVersion from rush.json? |
pnpm@11.26.0 |
(if pnpm) useWorkspaces from pnpm-config.json? |
true |
| Operating system? | Mac and Linux |
| Would you consider contributing a PR? | Yes |
Node.js version (node -v)? |
24.20.0 |
- Ngôn ngữ chính
- TypeScript
- Star
- 6.5k
- Fork
- 708
- Merge trung bình
- 5 ngày 7 giờ
- Pull request đã merge (30 ngày)
- 44
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của microsoft/rushstack
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 62/100
Tất cả issue của microsoft/rushstack
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
copse-dev/agent-pane#2953 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
[Bug]: Matrix progress drafts fail with "Matrix runtime not initialized" during tool activity Đang mởbug clawsweeper:linked-pr-open clawsweeper:needs-live-repro clawsweeper:no-new-fix-pr impact:message-loss issue-rating: 🐚 platinum hermit P2 regression
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
Client support matrix inclusion Đang mởenhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
calcite-components needs triage refactor
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Esri/calcite-design-system#15203 ·