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
This feature is important to have in this repository; a contrib plugin wouldn't do
Describe the user story
I'm using yarn3.2.0 in my NAPI-RS projects, and in the CI test steps I want to install dependencies on host platform and testing the native addons on the qemu Docker images.
Installing dependencies on the host platform has many advantages:
It's easy to use actions/cache to cache yarn dependencies.
It's faster because the host platform is running on the native CPU arch.
Imagine testing linux-aarch64-musl native addons on ubuntu-latest x64 host, I want to install dependencies in these steps:
yarn config set supportedArchitectures.cpu 'arm64'
yarn config set supportedArchitectures.libc 'musl'
yarn install --immutable --mode=skip-build
With the current version, yarn will throw error in linking step: Error: While persisting /canvas/.yarn/cache/@swc-core-linux-x64-gnu-npm-1.2.163-e0dc2d703e-8.zip/node_modules/@swc/core-linux-x64-gnu/ -> /canvas/node_modules/@swc/core-linux-x64-gnu ENOENT: no such file or directory, scandir '/canvas/.yarn/cache/@swc-core-linux-x64-gnu-npm-1.2.163-e0dc2d703e-8.zip/node_modules/@swc/core-linux-x64-gnu'
If set CPU and libc with current:
yarn config set supportedArchitectures.cpu --json '["arm64", "current"]'
yarn config set supportedArchitectures.libc --json '["musl", "current"]'
yarn install --immutable --mode=skip-build
Only packages satisfied with the current platform will be preserved, ls -la @swc:
root@6d7dbe3dd415:/canvas# ls node_modules/@swc
core core-linux-x64-gnu
Describe the solution you'd like
I think in linking steps should only preserve the packages satisfied with supportedArchitectures but not the current platform.
Describe the drawbacks of your solution
Only preserve the packages satisfied with supportedArchitectures.
Describe alternatives you've considered
Add a flag to specify this behavior?
The text was updated successfully, but these errors were encountered:
merceyz
changed the title
Add an option to preserve optionalDependencies which are different cpu os and libc from current platform
[Bug] Not all linkers respect supportedArchitecturesApr 11, 2022
Describe the user story
I'm using
yarn3.2.0
in my NAPI-RS projects, and in the CI test steps I want to install dependencies on host platform and testing the native addons on theqemu
Docker images.Installing dependencies on the host platform has many advantages:
actions/cache
to cache yarn dependencies.Imagine testing
linux-aarch64-musl
native addons onubuntu-latest
x64 host, I want to install dependencies in these steps:With the current version, yarn will throw error in linking step:
Error: While persisting /canvas/.yarn/cache/@swc-core-linux-x64-gnu-npm-1.2.163-e0dc2d703e-8.zip/node_modules/@swc/core-linux-x64-gnu/ -> /canvas/node_modules/@swc/core-linux-x64-gnu ENOENT: no such file or directory, scandir '/canvas/.yarn/cache/@swc-core-linux-x64-gnu-npm-1.2.163-e0dc2d703e-8.zip/node_modules/@swc/core-linux-x64-gnu'
If set CPU and libc with
current
:Only packages satisfied with the current platform will be preserved,
ls -la @swc
:Describe the solution you'd like
I think in linking steps should only preserve the packages satisfied with
supportedArchitectures
but not the current platform.Describe the drawbacks of your solution
Only preserve the packages satisfied with
supportedArchitectures
.Describe alternatives you've considered
Add a flag to specify this behavior?
The text was updated successfully, but these errors were encountered: