Skip to content

Do not load Flipper via reflection#34383

Closed
cortinico wants to merge 1 commit into
mainfrom
nc/template-do-not-use-reflection-for-flipper
Closed

Do not load Flipper via reflection#34383
cortinico wants to merge 1 commit into
mainfrom
nc/template-do-not-use-reflection-for-flipper

Conversation

@cortinico
Copy link
Copy Markdown
Contributor

Summary

Followup to #34379 by @danilobuerger

Loading Flipper via reflection is type unsafe and requires extra code + exception handling that we can get rid of. The recommended way to use Flipper on Android is either via a no-op artifact or by using build flavors.

As we already had a setup for Flipper for debug, I'm creating the release equivalent which is just a stub. This allows us to get rid of some code inside MainApplication.java

Changelog

[Android] [Changed] - Do not load Flipper via reflection

Test Plan

Will wait for a CI result on this.

@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. p: Facebook Partner: Facebook Partner labels Aug 11, 2022
@react-native-bot react-native-bot added the Platform: Android Android applications. label Aug 11, 2022
@danilobuerger
Copy link
Copy Markdown
Contributor

Ah yes, thats way better! Thanks!

@analysis-bot
Copy link
Copy Markdown

Platform Engine Arch Size (bytes) Diff
ios - universal n/a --

Base commit: a379879
Branch: main

@facebook-github-bot
Copy link
Copy Markdown
Contributor

@cortinico has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@react-native-bot
Copy link
Copy Markdown
Collaborator

This pull request was successfully merged by @cortinico in 9214da1.

When will my fix make it into a release? | Upcoming Releases

@react-native-bot react-native-bot added the Merged This PR has been merged. label Aug 11, 2022
@yungsters yungsters deleted the nc/template-do-not-use-reflection-for-flipper branch August 12, 2022 17:30
roryabraham pushed a commit to Expensify/react-native that referenced this pull request Aug 17, 2022
Summary:
Followup to facebook#34379 by danilobuerger

Loading Flipper via reflection is type unsafe and requires extra code + exception handling that we can get rid of. The recommended way to use Flipper on Android is either via a `no-op` artifact or by using build flavors.

As we already had a setup for Flipper for `debug`, I'm creating the `release` equivalent which is just a stub. This allows us to get rid of some code inside `MainApplication.java`

## Changelog

[Android] [Changed] - Do not load Flipper via reflection

Pull Request resolved: facebook#34383

Test Plan: Will wait for a CI result on this.

Reviewed By: cipolleschi

Differential Revision: D38615257

Pulled By: cortinico

fbshipit-source-id: 66bb2c46c5df36a15c1b27512209a849f55d64c9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged This PR has been merged. p: Facebook Partner: Facebook Partner Platform: Android Android applications.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants