You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 14, 2026. It is now read-only.
Follow-up to #434 (umbrella, closed) and #439 (slice 1, merged). Pacquet now skips installability-incompatible optional dependencies, but the only SupportedArchitectures value it ever sees is None — so every install behaves as if the user opted into "every variant for the host triple only". This blocks two real workflows pnpm supports:
Cross-architecture install — pnpm install --cpu=arm64 --os=darwin on an x64 Linux host materializes the macOS arm64 variants in node_modules. Useful for prebuilt binary packages (esbuild, swc, native add-ons) when running CI for a host arch you don't have.
Multi-arch dev artifacts — pnpm-workspace.yaml carries supportedArchitectures: { os: ['darwin', 'linux'], cpu: ['arm64', 'x64'] }, materializing every variant the team's devs use so a single pnpm install covers everyone.
Slice 1 stubbed host_libc() to always return "unknown" so libc checks no-op on every host (matches non-Linux behavior). This slice replaces it with a real probe — detect-libc Rust crate, or an open-coded ldd --version parse with a /lib*/libc.so* fallback — so musl / glibc constraints actually filter on Linux. "unknown" fallback remains for hosts where detection genuinely fails.
Tests to port
optionalDependencies.ts:594 — install optional dependency for the supported architecture set by the user (nodeLinker=%s); covers config + frozen-reinstall.
optionalDependencies.ts:618 / :633 / :648 — remove optional dependencies that are not used and variants. Depend on the current-lockfile path; partial ports as known_failures until slice 6 lands.
Out of scope
The removeOptionalDependenciesThatAreNotUsed behavior end-to-end depends on the current lockfile (slice 6 of the umbrella); this slice only sets up the config + check input.
.modules.yaml.skipped write/read is umbrella slice 3.
Follow-up to #434 (umbrella, closed) and #439 (slice 1, merged). Pacquet now skips installability-incompatible optional dependencies, but the only
SupportedArchitecturesvalue it ever sees isNone— so every install behaves as if the user opted into "every variant for the host triple only". This blocks two real workflows pnpm supports:Cross-architecture install —
pnpm install --cpu=arm64 --os=darwinon an x64 Linux host materializes the macOS arm64 variants innode_modules. Useful for prebuilt binary packages (esbuild,swc, native add-ons) when running CI for a host arch you don't have.Multi-arch dev artifacts —
pnpm-workspace.yamlcarriessupportedArchitectures: { os: ['darwin', 'linux'], cpu: ['arm64', 'x64'] }, materializing every variant the team's devs use so a singlepnpm installcovers everyone.Scope
Mirror upstream's three wiring points pinned at pnpm/pnpm@94240bc046:
Config.supported_architectures: Option<SupportedArchitectures>deserialized frompnpm-workspace.yaml(getOptionsFromRootManifest.ts:23).--cpu,--libc,--osflags oninstall/add/update, multi-valued (types.ts:146-148). CLI values override config wholesale per axis (overrideSupportedArchitecturesWithCLI.ts).dedupe_currentsubstitution and'any'/!foonegation already land in feat(package-is-installable): platform + engine check, skip optional incompatibles (#434 slice 1) #439'scheck_platform; this slice only wires the input.Real libc detection
Slice 1 stubbed
host_libc()to always return"unknown"so libc checks no-op on every host (matches non-Linux behavior). This slice replaces it with a real probe —detect-libcRust crate, or an open-codedldd --versionparse with a/lib*/libc.so*fallback — so musl / glibc constraints actually filter on Linux."unknown"fallback remains for hosts where detection genuinely fails.Tests to port
optionalDependencies.ts:594—install optional dependency for the supported architecture set by the user (nodeLinker=%s); covers config + frozen-reinstall.optionalDependencies.ts:618/:633/:648—remove optional dependencies that are not usedand variants. Depend on the current-lockfile path; partial ports asknown_failuresuntil slice 6 lands.Out of scope
removeOptionalDependenciesThatAreNotUsedbehavior end-to-end depends on the current lockfile (slice 6 of the umbrella); this slice only sets up the config + check input..modules.yaml.skippedwrite/read is umbrella slice 3.--no-optionalplumbing is umbrella slice 5.Upstream
pnpm/pnpm@94240bc046. Pacquet slice 1 landed in #439; this is umbrella slice 2.
Written by an agent (Claude Code, claude-opus-4-7).