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

cra-template: temporarily add resolution for babel to work around bug #21545

Merged
merged 2 commits into from Feb 3, 2022

Conversation

ecraig12345
Copy link
Member

@ecraig12345 ecraig12345 commented Feb 3, 2022

Current Behavior

All builds are failing on @fluentui/cra-template test (northstar CRA projects-test will have a similar error):

TypeError: /tmp/cra-template--23641-701XsZoyanlh/test-app/node_modules/@fluentui/date-time-utilities/lib/dateFormatting/dateFormatting.types.js: Cannot read property 'originalPositionFor' of undefined

This also happens when create a new app using the published version of the template+packages, meaning it's an issue with some newly-released version of a react-scripts dependency, not an issue with our code.

Based on this issue comment it seems to be some issue with the newly-released @babel/core@7.17.0.

The full stack of the error (which you can see by creating an app with the template locally and running yarn start) includes @ampproject/remapping, meaning the issue was introduced by babel/babel#14209 which switched to using that package for merging source maps.

New Behavior

Add resolution in template to use @babel/core@7.16.12. Will also try and get a smaller repro to file an issue with babel, but we need this temp fix to unblock builds, as well as any consumer usage of the template.

The same resolution is needed for northstar's CRA projects-test, it's just added to the test app after creation because that test uses the default typescript template.

Tracking work to revert this fix later in #21546.

@codesandbox-ci
Copy link

codesandbox-ci bot commented Feb 3, 2022

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 36cd910:

Sandbox Source
@fluentui/react 8 starter Configuration
@fluentui/react-components 9 starter Configuration

@fabricteam
Copy link
Collaborator

fabricteam commented Feb 3, 2022

📊 Bundle size report

🤖 This report was generated against 0a220897d7f6b3029b7c7f18b6ecc28a3131345f

@size-auditor
Copy link

size-auditor bot commented Feb 3, 2022

Asset size changes

Size Auditor did not detect a change in bundle size for any component!

Baseline commit: 0a220897d7f6b3029b7c7f18b6ecc28a3131345f (build)

@DustyTheBot
Copy link

DustyTheBot commented Feb 3, 2022

Warnings
⚠️ There are no updates provided to CHANGELOG. Ensure there are no publicly visible changes introduced by this PR.

Generated by 🚫 dangerJS against 36cd910

@fabricteam
Copy link
Collaborator

fabricteam commented Feb 3, 2022

Perf Analysis (@fluentui/react)

Scenario Render type Master Ticks PR Ticks Iterations Status
ContextualMenu mount 8492 16398 1000 Possible regression
All results

Scenario Render type Master Ticks PR Ticks Iterations Status
Avatar mount 905 897 5000
BaseButton mount 940 944 5000
Breadcrumb mount 2676 2675 1000
ButtonNext mount 525 516 5000
Checkbox mount 1557 1591 5000
CheckboxBase mount 1339 1329 5000
ChoiceGroup mount 4865 4824 5000
ComboBox mount 1017 1015 1000
CommandBar mount 10744 10321 1000
ContextualMenu mount 8492 16398 1000 Possible regression
DefaultButton mount 1140 1147 5000
DetailsRow mount 3844 3791 5000
DetailsRowFast mount 3788 3832 5000
DetailsRowNoStyles mount 3620 3636 5000
Dialog mount 2651 2659 1000
DocumentCardTitle mount 196 194 1000
Dropdown mount 3313 3279 5000
FluentProviderNext mount 1918 1940 5000
FluentProviderWithTheme mount 176 167 10
FluentProviderWithTheme virtual-rerender 119 122 10
FluentProviderWithTheme virtual-rerender-with-unmount 213 214 10
FocusTrapZone mount 1892 1880 5000
FocusZone mount 1864 1851 5000
IconButton mount 1767 1810 5000
Label mount 374 375 5000
Layer mount 3030 3007 5000
Link mount 499 512 5000
MakeStyles mount 1735 1736 50000
MenuButton mount 1495 1508 5000
MessageBar mount 2053 2079 5000
Nav mount 3306 3349 1000
OverflowSet mount 1173 1158 5000
Panel mount 2525 2539 1000
Persona mount 870 896 1000
Pivot mount 1470 1441 1000
PrimaryButton mount 1332 1358 5000
Rating mount 7683 7833 5000
SearchBox mount 1352 1377 5000
Shimmer mount 2445 2544 5000
Slider mount 1937 1942 5000
SpinButton mount 4930 4800 5000
Spinner mount 456 455 5000
SplitButton mount 3044 3171 5000
Stack mount 533 526 5000
StackWithIntrinsicChildren mount 2252 2239 5000
StackWithTextChildren mount 5101 5105 5000
SwatchColorPicker mount 11252 11133 5000
TagPicker mount 2588 2584 5000
TeachingBubble mount 12852 12900 5000
Text mount 442 438 5000
TextField mount 1387 1414 5000
ThemeProvider mount 1186 1195 5000
ThemeProvider virtual-rerender 637 626 5000
ThemeProvider virtual-rerender-with-unmount 1932 1890 5000
Toggle mount 833 823 5000
buttonNative mount 153 157 5000

Perf Analysis (@fluentui/react-northstar)

⚠️ No perf measurements available

@ecraig12345 ecraig12345 merged commit 946f57c into microsoft:master Feb 3, 2022
V-Build - @microsoft/fluentui-react-build automation moved this from In progress to Done Feb 3, 2022
@ecraig12345 ecraig12345 deleted the fix-cra-failure branch February 3, 2022 03:27
@ecraig12345
Copy link
Member Author

Merged this so the build will work again. Prague reviewers feel free to leave comments and I'll address them later.

ecraig12345 added a commit to ecraig12345/office-ui-fabric-react that referenced this pull request Feb 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

5 participants