At Datadog we are using yarn inside a huge monorepository using the PnP linker and Zero-Installs with all the dependencies versioned through git.
The issue we have is that people frequently have the tendency to think that this kind of environment works like others, and that cleaning the cache is the way to go whenever they encounter an install issue (like deleting node_modules).
This is obviously not the case and we have to tell them to restore their packages from the git remote when that happens, which is a bit cumbersome.
What's the problem this PR addresses?
At Datadog we are using
yarn
inside a huge monorepository using the PnP linker and Zero-Installs with all the dependencies versioned through git.The issue we have is that people frequently have the tendency to think that this kind of environment works like others, and that cleaning the cache is the way to go whenever they encounter an install issue (like deleting
node_modules
).This is obviously not the case and we have to tell them to restore their packages from the git remote when that happens, which is a bit cumbersome.
see also: https://github.com/yarnpkg/berry/discussions/6518
How did you fix it?
This PR adds a non-breaking option inside the
.yarnrc
file to disallow runningyarn clean cache
.cc @arcanis
Checklist