Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(core): skip cache cleanup when enableGlobalCache is true #4402

Merged
merged 7 commits into from
Apr 28, 2022

Conversation

stevenxu-db
Copy link
Contributor

What's the problem this PR addresses?
Skip cache cleanup when enableGlobalCache is true and global cache is used.

Discussion: https://discord.com/channels/226791405589233664/226793713722982400/964222577721610280

How did you fix it?
Read the config value for current project and short-circuit the cleanup task if set.

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.

@stevenxu-db stevenxu-db marked this pull request as ready for review April 27, 2022 03:58
@stevenxu-db stevenxu-db requested a review from arcanis as a code owner April 27, 2022 03:58
@stevenxu-db
Copy link
Contributor Author

Please double check my version bumps. First time.

@stevenxu-db stevenxu-db force-pushed the global-no-delete-cache branch from ab51564 to 9f5cf6c Compare April 27, 2022 04:03
Copy link
Member

@merceyz merceyz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please double check my version bumps. First time.

I marked @yarnpkg/cli to be released as well so that (if this PR was the only change we had) yarn set version ... can pick it up, otherwise it looks good 👍

packages/yarnpkg-core/sources/Project.ts Outdated Show resolved Hide resolved
@stevenxu-db stevenxu-db requested a review from merceyz April 27, 2022 17:30
merceyz
merceyz previously approved these changes Apr 27, 2022
Copy link
Member

@merceyz merceyz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@arcanis arcanis merged commit 8e0c4b8 into yarnpkg:master Apr 28, 2022
merceyz added a commit that referenced this pull request May 12, 2022
* skip cache cleanup when enableGlobalCache is true

* patch notes

* chore: versions

* move guard

* only move enableGlobalCache check

* missed this in cleanup

* Update Project.ts

Co-authored-by: merceyz <[email protected]>
Co-authored-by: Maël Nison <[email protected]>
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.

3 participants