Skip to content

Fix RNGestureHandlerManager to use explicit imports#1160

Merged
jkadamczyk merged 3 commits intosoftware-mansion:masterfrom
PeteTheHeat:fix_RNGestureHandlerManager_imports
Sep 1, 2020
Merged

Fix RNGestureHandlerManager to use explicit imports#1160
jkadamczyk merged 3 commits intosoftware-mansion:masterfrom
PeteTheHeat:fix_RNGestureHandlerManager_imports

Conversation

@PeteTheHeat
Copy link
Copy Markdown
Contributor

Description

I work on RN Core at Facebook, and am encountering a unique problem. I'm trying to refactor RCTEventDispatcher, but cannot because of the implicit dependency on RCTEventDispatcher in RNGestureHandlerManager. We use rn-gesture-handler internally, and builds for it fail after the refactor.

The fix is to explicitly depend on RCTEventDispatcher instead of relying on the RCTUIManager -> RCTViewManager -> RCTEventDispatcher import chain.

Test plan

I unfortunately did not test this. I can't get react-native-gesture-handler building locally. I assume that there are CI builds that would fail on a simple compilation error.

Copy link
Copy Markdown
Member

@jgonet jgonet left a comment

Choose a reason for hiding this comment

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

It's interesting that the RN uses RNGH internally, is it open-sourced?

@PeteTheHeat
Copy link
Copy Markdown
Contributor Author

Sorry, I should have been more clear.

Facebook uses RNGH internally in a few apps. In order to land my refactor to RN core, those apps must build.

@jkadamczyk jkadamczyk self-requested a review September 1, 2020 11:49
@jkadamczyk
Copy link
Copy Markdown
Contributor

I think we can merge that. Builds are passing on CI.
CC @jakub-gonet

@jkadamczyk jkadamczyk merged commit e64d6fc into software-mansion:master Sep 1, 2020
@jkadamczyk
Copy link
Copy Markdown
Contributor

Thanks for your contribution @PeteTheHeat

braincore pushed a commit to braincore/react-native-gesture-handler that referenced this pull request Mar 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants