Skip to content

Conversation

elbywan
Copy link
Contributor

@elbywan elbywan commented Nov 21, 2024

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: #6518

How did you fix it?

This PR adds a non-breaking option inside the .yarnrc file to disallow running yarn clean cache.

cc @arcanis

Checklist

  • I have set the packages that need to be released for my changes to be effective.
  • I will check that all automated PR checks pass before the PR gets reviewed.

@elbywan elbywan changed the title add an config to disallow the cache clean command add a config option to disallow the cache clean command Nov 22, 2024
@arcanis arcanis merged commit f0f0c68 into yarnpkg:master Dec 28, 2024
26 checks passed
@elbywan elbywan deleted the enable-cache-clean-option branch December 28, 2024 20:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants