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

[test] Transpile more similar to prod bundle #25406

Merged
merged 2 commits into from
Mar 18, 2021

Conversation

eps1lon
Copy link
Member

@eps1lon eps1lon commented Mar 18, 2021

Generally we want to test as similar as possible to production environments to make debugging easier. I moved some babel plugins into the default plugins to make testing more similar to prod. I don't think we've ever had a problem but let's be safe.

date-mui-test will ultimately be removed as well. Though it's used fairly often in pickers so I want to take a gradual approach or rather do it while refactoring the pickers.

@mui-pr-bot
Copy link

mui-pr-bot commented Mar 18, 2021

Details of bundle changes

Generated by 🚫 dangerJS against b99da0e

Copy link
Member

@oliviertassinari oliviertassinari left a comment

Choose a reason for hiding this comment

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

I don't think we've ever had a problem but let's be safe.

We had one problem in material-ui-x related to this mui/mui-x#666.

Having 3-4 years of almost no issues might suggest that change if it yields a value, is marginal. Did you look into the cost of the change? How much slower will the dev env will be?

@eps1lon
Copy link
Member Author

eps1lon commented Mar 18, 2021

Did you look into the cost of the change? How much slower will the dev env will be?

That's a non-goal of this change. We shouldn't ever dissect the plugins based on performance. If this is/was/will be a problem we need to set up test infra for dev and prod.

@oliviertassinari
Copy link
Member

oliviertassinari commented Mar 18, 2021

I have tried to rerun the test but it keeps failing, it doesn't seem to be a flaky one.

@eps1lon
Copy link
Member Author

eps1lon commented Mar 18, 2021

I have tried to rerun the test but it keeps failing, it doesn't seem to be a flaky one.

Yeah, already investigating.

@eps1lon
Copy link
Member Author

eps1lon commented Mar 18, 2021

I have tried to rerun the test but it keeps failing, it doesn't seem to be a flaky one.

Test failure was expected but not anticipated. Fixed with b99da0e (#25406)

React.useEffect(() => {});
React.useEffect(() => {});

return <Child />;
return <Child rerender={state} />;
Copy link
Member Author

Choose a reason for hiding this comment

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

previous transpilation

This meant that React bailed out of re-rendering <Child /> when calling setState(1) because <Child /> was hoisted.

@eps1lon eps1lon merged commit 1f510d4 into mui:next Mar 18, 2021
@eps1lon eps1lon deleted the core/test-prod-closeness branch March 18, 2021 15:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants