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

[code-infra] Break package dependency cycles #40398

Merged
merged 5 commits into from
Jan 2, 2024

Conversation

michaldudak
Copy link
Member

This PR removes dependency cycles (as reported by Lerna and pnpm on another branch) between workspace packages.

I moved tests that verify integration between packages into test/integration.

This change allows us to unlock Lerna version (pinned in #40029) and solves an issue with Lerna on the pnpm branch (the version command was failing because of the cycles).

@michaldudak michaldudak added the scope: code-infra Specific to the core-infra product label Jan 2, 2024
@michaldudak michaldudak requested a review from a team January 2, 2024 11:38
@@ -40,6 +40,7 @@
"dependencies": {
"@babel/runtime": "^7.23.6",
"@emotion/hash": "^0.9.1",
"@mui/material": "^5.15.2",
Copy link
Member Author

Choose a reason for hiding this comment

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

This change isn't strictly related to this PR, but I noticed this package imports @mui/material in production code, but doesn't declare it as a production dependency.

Copy link
Member

Choose a reason for hiding this comment

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

This surprises me a bit. Intuitively I'd expect it to be the other way around. @mui/material depending on @mui/system.

@mui-bot
Copy link

mui-bot commented Jan 2, 2024

Netlify deploy preview

https://deploy-preview-40398--material-ui.netlify.app/

Bundle size report

Details of bundle changes (Toolpad)
Details of bundle changes

Generated by 🚫 dangerJS against 5b3f1be

Copy link
Member

@Janpot Janpot left a comment

Choose a reason for hiding this comment

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

Nice

@@ -40,6 +40,7 @@
"dependencies": {
"@babel/runtime": "^7.23.6",
"@emotion/hash": "^0.9.1",
"@mui/material": "^5.15.2",
Copy link
Member

Choose a reason for hiding this comment

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

This surprises me a bit. Intuitively I'd expect it to be the other way around. @mui/material depending on @mui/system.

@michaldudak michaldudak force-pushed the break-dependency-cycles branch from 27d7bef to 5b3f1be Compare January 2, 2024 11:52
@michaldudak
Copy link
Member Author

michaldudak commented Jan 2, 2024

This surprises me a bit. Intuitively I'd expect it to be the other way around. @mui/material depending on @mui/system.

That's styles, not system. Anyway, it turns out neither depends in production on the other (styles is a legacy package), so I'm moving it from back to devDependencies.

@Janpot
Copy link
Member

Janpot commented Jan 2, 2024

That's styles, not system.

oops, right, that's what I meant 🙂

@michaldudak michaldudak merged commit 1d4af61 into mui:master Jan 2, 2024
19 checks passed
@michaldudak michaldudak deleted the break-dependency-cycles branch January 2, 2024 12:13
mnajdova pushed a commit to mnajdova/material-ui that referenced this pull request Jan 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope: code-infra Specific to the core-infra product
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants