yarnpkg / berry

📦🐈 Active development trunk for Yarn ⚒
https://yarnpkg.com
BSD 2-Clause "Simplified" License
7.42k stars 1.11k forks source link

[Feature] List circular dependencies that make the build order unsatisfiable #5185

Open simPod opened 1 year ago

simPod commented 1 year ago

Describe the user story

Yarn gave me and error that

Some packages have circular dependencies that make their build order unsatisfiable - as a result they won't be built (affected packages are: styled-components@npm:5.3.5 [1b023])

but I'd like to see what dependencies are circular.

(I started seeing this since v4.0.0-rc.35, v4.0.0-rc.34 does not give me the error)

Describe the solution you'd like

It would be great to specify a list of those circular dependencies per each dependency that cannot be build.

Describe the drawbacks of your solution

Maybe the list of displayed dependencies might be longer to display.

Describe alternatives you've considered

I tried to investigate each dependency manually but that's tedious and I did not succeed.

merceyz commented 1 year ago

but I'd like to see what dependencies are circular.

It's a bug that will be fixed by https://github.com/yarnpkg/berry/pull/5177, styled-components has a circular dependency on itself.

I tried to investigate each dependency manually but that's tedious and I did not succeed.

styled-components depends on babel-plugin-styled-components which has a peer dependency on styled-components.