yarnpkg / yarn

The 1.x line is frozen - features and bugfixes now happen on https://github.com/yarnpkg/berry
https://classic.yarnpkg.com
Other
41.37k stars 2.72k forks source link

Fix infinite loop when hoisting cyclic dependencies #8979

Open yungsters opened 10 months ago

yungsters commented 10 months ago

Fixes a bug that causes yarn to infinite loop (and subsequently fail by running out of memory).

This makes yarn add @bluejay/collection@4.2.9 succeed, a cyclic dependency that currently breaks yarn and was originally reported in https://github.com/yarnpkg/yarn/issues/6279.

Test Plan

$ yarn
$ yarn test
$ yarn build

Verified this now succeeds:

$ yarn add @bluejay/collection@4.2.9