Repository navigation
DevSupport classes included in release apks (~40KB size impact) due to DevLoadingModule #44682
Description
Activity
- addedNeeds: ReproThis issue could be improved with a clear list of steps to reproduce the issue.This issue could be improved with a clear list of steps to reproduce the issue.and removedNeeds: ReproThis issue could be improved with a clear list of steps to reproduce the issue.This issue could be improved with a clear list of steps to reproduce the issue.
on May 26, 2024 Updated with template reproducer with proguard enabled
- addedNeeds: AttentionIssues where the author has responded to feedback.Issues where the author has responded to feedback.and removed
on May 26, 2024 Is this happening on 0.74 also?
- added and removedNeeds: AttentionIssues where the author has responded to feedback.Issues where the author has responded to feedback.
on Jun 4, 2024 This issue is waiting for author's feedback since 24 days. Please provide the requested feedback or this will be closed in 7 days.
- addedStaleThere has been a lack of activity on this issue and it may be closed soon.There has been a lack of activity on this issue and it may be closed soon.
on Jun 29, 2024 This issue is not present in 0.73 and above. Have re-opened #44698 as a pick-request to 0.72 for the solve
- addedNeeds: AttentionIssues where the author has responded to feedback.Issues where the author has responded to feedback.and removed
on Jul 4, 2024 This issue is not present in 0.73 and above. Have re-opened #44698 as a pick-request to 0.72 for the solve
Thanks for the investigation @garvsgit
As this issue is already fixed, what is preventing you from updating to 0.73 or 0.74?
0.72 is end of life and we limit the pick requests to only extremely necessary picksI depend on a few out-of-support packages which do not work well with 0.73 so holding off on an upgrade for now.
I understand that 0.72 is end of life and this is only a nice to have pick, not a necessary one so I'll be closing this issue and the associated PR.Thanks!
Reacted by Nicola Corti- addedResolution: AnsweredWhen the issue is resolved with a simple answerWhen the issue is resolved with a simple answerand removedNeeds: AttentionIssues where the author has responded to feedback.Issues where the author has responded to feedback.
on Jul 4, 2024
Description
This is an issue with React Native 0.72.
According to the design of DevSupportManager
https://github.com/facebook/react-native/blob/d724007364c4315e2cabace0fc6eae6e6212431d/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/DefaultDevSupportManagerFactory.java#L21-L26
BridgeDevSupportManager class and its dependencies should be stripped by Proguard in release builds, however on inspecting the release APKs with proguard enabled, I found that many DevSupport classes were included. On digging deeper, I found the issue here https://github.com/facebook/react-native/blob/d724007364c4315e2cabace0fc6eae6e6212431d/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/devloading/DevLoadingModule.java#L16
On deleting the usages of DevLoading Module, I found that the unnecessary DevSupport classes were no longer included in the release APKs.
Please look into refactoring DevLoading Module so that it doesn't cause unnecessary bloat in the release APK
Steps to reproduce
React Native Version
0.72.14
Affected Platforms
Runtime - Android
Output of
npx react-native infoStacktrace or Logs
Reproducer
https://github.com/garvsgit/test072App
Screenshots and Videos