question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

@mui/material upgrade from 5.10.1 to 5.10.9 breaks our app

See original GitHub issue

Duplicates

  • I have searched the existing issues

Latest version

  • I have tested the latest version

Steps to reproduce 🕹

We are using ~5.10.1 in our package.json

The latest patch version was deployed which was 5.10.9 and something in between those two patch versions is not a patch.

Looking further into release log, at least one patch version (5.10.9) has breaking changes in it. Should we not assume semver conventions for MUI releases?

Current behavior 😯

Patch upgrade has breaking changes.

Expected behavior 🤔

Patch upgrade should not have breaking changes.

Context 🔦

No response

Your environment 🌎

npx @mui/envinfo
  Don't forget to mention which browser you used.
  Output from `npx @mui/envinfo` goes here.

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:1
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
siriwatknpcommented, Nov 1, 2022

Solution 1: If the @mui/ packages themselves are relying on unsafe_ functions that would not be the same as an external package, and changes that causes breaking behavior in between packages are at least a minor version. This would be by far the most preferred solution.

Solution 1 seems to be the way that we can start doing this in the future without changing too much. I will keep this in mind for sure.

1reaction
ccromnowcommented, Oct 27, 2022

I understand the relation to unsafe_ breaking changes not being reflected by minor or major versions for external users, however when you do that in internal packages it causes problems for shared environments.

Short example of environment: Shared dependencies using Webpack Federated Modules. Theming is done in a central module that loads parts of the application as federated modules. In order to make the theming work for the loaded parts, the @mui/styled-engine package needs to be a shared dependency. This means that the central module will decide what version of @mui/styled-engine is shared to all loaded modules. In the environment all packages of @mui are dependencies in a shared design component library that, when installed, loads the latest patch version of every package.

The problem arises when there exists breaking changes between packages inside @mui/ as some of those packages are shared and others are not. As the core module and the federated modules are built separately and at any time a new breaking change inbetween the packages causes the application to crash when the “shared part of the @mui/” has breaking changes to the parts that are dragged in in the built packages.

The way forward for us would be one of the following: Solution 1: If the @mui/ packages themselves are relying on unsafe_ functions that would not be the same as an external package, and changes that causes breaking behavior in between packages are at least a minor version. This would be by far the most preferred solution.

Solution 2: All @mui packages needs to be shared dependencies, this is not optimal as it slows down run time quite a bit and will break as soon as a new package is introduced and functionality is moved to that package in the same manner as current breaking changes.

Solution 3: All @mui packages needs to be locked at top level and patch versions have to be treated the same as minor and major versions, also not optimal as bugs and everything needs to be synced. And also when deployed all depending modules needs to be deployed in synchronization with the core package, losing a lot of the benefits from the shared enviroment.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Releases · mui/material-ui - GitHub
MUI Core: Ready-to-use foundational React components, free forever. It includes Material UI, which implements Google's Material Design.
Read more >
MUI Versions
Major releases contain significant new features, some developer assistance is expected during the update. These releases include breaking changes. When updating ...
Read more >
Error when installing material ui in react - Stack Overflow
I am trying to use material ui core but I am getting an error when installing it with npm in a react and...
Read more >
@mui/material | Yarn - Package Manager
MUI Base is our library of "unstyled" components and low-level hooks. With Base, you gain complete control over your app's CSS and accessibility...
Read more >
@mui/material - npm
Start using @mui/material in your project by running `npm i @mui/material`. There are 2999 other projects in the npm registry using ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found