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

Update Gutenberg to master #962

Merged
merged 10 commits into from
May 10, 2019
Merged

Update Gutenberg to master #962

merged 10 commits into from
May 10, 2019

Conversation

koke
Copy link
Member

@koke koke commented May 7, 2019

There seems to be a breaking change in WordPress/gutenberg#15120

error: bundling failed: Error: transform-react-jsx: pragma has been set but pragmafrag has not been set
    at PluginPass.exit (/Users/koke/a8c/gutenberg-mobile/node_modules/@babel/plugin-transform-react-jsx/lib/index.js:117:15)
    at newFn (/Users/koke/a8c/gutenberg-mobile/node_modules/@babel/traverse/lib/visitors.js:193:21)
    at NodePath._call (/Users/koke/a8c/gutenberg-mobile/node_modules/@babel/traverse/lib/path/context.js:53:20)
    at NodePath.call (/Users/koke/a8c/gutenberg-mobile/node_modules/@babel/traverse/lib/path/context.js:40:17)
    at NodePath.visit (/Users/koke/a8c/gutenberg-mobile/node_modules/@babel/traverse/lib/path/context.js:97:8)
    at TraversalContext.visitQueue (/Users/koke/a8c/gutenberg-mobile/node_modules/@babel/traverse/lib/context.js:118:16)
    at TraversalContext.visitSingle (/Users/koke/a8c/gutenberg-mobile/node_modules/@babel/traverse/lib/context.js:90:19)
    at TraversalContext.visit (/Users/koke/a8c/gutenberg-mobile/node_modules/@babel/traverse/lib/context.js:146:19)
    at Function.traverse.node (/Users/koke/a8c/gutenberg-mobile/node_modules/@babel/traverse/lib/index.js:94:17)

@koke koke added this to the v1.5 milestone May 7, 2019
@koke koke added [Type] Technical Debt [Type] Bug Something isn't working and removed [Type] Technical Debt labels May 7, 2019
@koke
Copy link
Member Author

koke commented May 7, 2019

In 16c1a79 I tried adding the recommended configuration, but I'm still getting an error:

ReferenceError: Can't find variable: Fragment

This error is located at:
    in SlotComponent (at slot.js:95)
    in Slot (at slot-fill/index.js:16)
    in BlockControlsSlot (at block-toolbar.js:86)
    in RCTScrollContentView (at ScrollView.js:953)
    in RCTScrollView (at ScrollView.js:1092)
    in ScrollView (at block-toolbar.js:57)
    in RCTView (at View.js:45)
    in View (at block-toolbar.js:56)
    in BlockToolbar (at with-dispatch/index.js:122)
    in ComponentWithDispatch (at with-dispatch/index.js:129)
    in WithDispatch(BlockToolbar) (at with-select/index.js:187)
    in ComponentWithSelect (at with-select/index.js:196)
    in WithSelect(WithDispatch(BlockToolbar)) (at block-manager.js:278)
    in RCTView (at View.js:45)
    in View (at KeyboardAvoidingView.js:207)
    in KeyboardAvoidingView (at keyboard-avoiding-view.ios.js:23)
    in KeyboardAvoidingView (at block-manager.js:274)
    in RCTView (at View.js:45)
    in View (at block-manager.js:251)
    in RCTSafeAreaView (at SafeAreaView.js:45)
    in SafeAreaView (at block-manager.js:291)
    in BlockManager (at with-dispatch/index.js:122)
    in ComponentWithDispatch (at with-dispatch/index.js:129)
    in WithDispatch(BlockManager) (at with-select/index.js:187)
    in ComponentWithSelect (at with-select/index.js:196)
    in WithSelect(WithDispatch(BlockManager)) (at AppContainer.js:180)
    in SlotFillProvider (at provider/index.native.js:130)
    in BlockEditorProvider (at provider/index.native.js:21)
    in WithRegistry(BlockEditorProvider) (at with-dispatch/index.js:122)
    in ComponentWithDispatch (at with-dispatch/index.js:129)
    in WithDispatch(WithRegistry(BlockEditorProvider)) (at AppContainer.js:174)
    in AppContainer (at with-dispatch/index.js:122)
    in ComponentWithDispatch (at with-dispatch/index.js:129)
    in WithDispatch(AppContainer) (at with-select/index.js:187)
    in ComponentWithSelect (at with-select/index.js:196)
    in WithSelect(WithDispatch(AppContainer)) (at App.js:33)
    in AppProvider (at src/index.js:69)
    in RootComponent (at renderApplication.js:35)
    in RCTView (at View.js:45)
    in View (at AppContainer.js:98)
    in RCTView (at View.js:45)
    in View (at AppContainer.js:115)
    in AppContainer (at renderApplication.js:34)

render
    slot.js:85:3
finishClassComponent
    ReactNativeRenderer-dev.js:11581:21
updateClassComponent
    ReactNativeRenderer-dev.js:11509:4
performUnitOfWork
    ReactNativeRenderer-dev.js:17276:21
workLoop
    ReactNativeRenderer-dev.js:17316:41
renderRoot
    ReactNativeRenderer-dev.js:17417:15
performWorkOnRoot
    ReactNativeRenderer-dev.js:18423:17
performWork
    ReactNativeRenderer-dev.js:18324:24
performSyncWork
    ReactNativeRenderer-dev.js:18285:14
requestWork
    ReactNativeRenderer-dev.js:18169:19
scheduleWork
    ReactNativeRenderer-dev.js:17969:16
scheduleRootUpdate
    ReactNativeRenderer-dev.js:18642:15
render
    ReactNativeRenderer-dev.js:19512:20
renderApplication
    renderApplication.js:61:34
run
    AppRegistry.js:104:10
runApplication
    AppRegistry.js:198:26
__callFunction
    MessageQueue.js:366:47
<unknown>
    MessageQueue.js:106:26
__guard
    MessageQueue.js:314:10
callFunctionReturnFlushedQueue
    MessageQueue.js:105:17

@sirreal is there any required change that I'm missing?

@koke
Copy link
Member Author

koke commented May 7, 2019

Importing the plugins directly in f8c10a7 seems to work for running the app, but the tests are failing, and I'm not sure why. It looks like the main issue is that the @wordpress/babel-plugin-import-jsx-pragma with the changes hasn't been published yet.

@sirreal
Copy link
Member

sirreal commented May 7, 2019

We've been chatting via other channels, but for the record:

  • WordPress/gutenberg@39f568f introduces a change that requires an unpublished version of the @wordpress/babel-plugin-import-jsx-pragma package.
  • That change is fine within the Gutenberg monorepo, because the local package is used and doesn't need to be published.
  • That's causing breakage here because the required (unpublished) version of the package can't be used.
  • Attempting to use the local (git submodule) version of that package leads to other problems, like its dependencies not being installed or found (@babel/plugin-proposal-async-generator-functions)

If possible, I'd encourage waiting for the packages to be published. I don't have any say, but I've been told they should be published soon.

@sirreal
Copy link
Member

sirreal commented May 7, 2019

Updating to WordPress/gutenberg@d8f1875 works fine in my testing. That's from yesterday and is pretty close to the current master HEAD.

@koke koke changed the title [WIP] Update Gutenberg to master Update Gutenberg to master May 10, 2019
@koke koke marked this pull request as ready for review May 10, 2019 08:12
@koke koke requested review from etoledom and mkevins May 10, 2019 08:15
Copy link
Contributor

@etoledom etoledom left a comment

Choose a reason for hiding this comment

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

Working great on my end!
yarn clean:install
yarn start:reset
yarn ios
And everything is running quite well.

I also tested with the latest master from gutenberg and it seems to work well too.

Thank you @koke and @sirreal for taking care of this! 🙏

@koke koke merged commit 9637fa9 into develop May 10, 2019
@koke koke deleted the update-master-20190507 branch May 10, 2019 09:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants