[Bug?]: Specifying supportedArchitectures..current
is incompatible with --immutable-cache
#6481
Labels
bug
Something isn't working
Self-service
Describe the bug
When
yarn install --immutable --immutable-cache
is run on a project (e.g. in a CI environment),.yarn/cache
is checked to see if there are any packages that would be marked for deletion. If the environment it's run in doesn't match the last (mutable) environment thatyarn install
was run on, then the packages that were added there will be marked for deletion, causing the--immutable-cache
checks to fail. While technically correct behavior, this is a surprising result.To reproduce
rollup
oresbuild
).yarnrc.yml
file to addsupportedArchitectures.os.current
andsupportedArchitectures.os.linux
yarn install --immutable --immutable-cache
and see that it runs cleanlyyarn install --immutable --immutable-cache
Expected result:
yarn install --immutable --immutable-cache
runs cleanlyActual result:
yarn install --immutable --immutable-cache
fails with an error because the packages for the darwin architecture become marked for deletionEnvironment
Additional context
Workaround:
Do not use
current
anywhere inside ofsupportedArchitectures
, and instead explicitly list all supported architectures.The text was updated successfully, but these errors were encountered: