Repository navigation
Match Metro's Android release assets in Re.Pack - #102766
roryabraham merged 8 commits into
Conversation
Re.Pack puts Android fonts in res/font, where Skia's useFont never looks, so Home charts never loaded in HybridApp release builds (Expensify#102619). It also writes no raw/keep.xml, so shrinkResources can strip bundled assets. Patch both to match Metro: fonts go to raw/, and keep.xml lists every bundled resource.
|
|
|
Hi, will there be any update ? @rojiphil |
|
@elirangoshen Sorry for the delayed response here. Will share review update in few hours. |
Sure thanks |
|
Does this require C+ review? looks like the original PR did not have a c+ review |
|
Ok. Nevertheless, sharing one observation related to importing tags. @elirangoshen The production release version was able to import the tags but the apk built via this pr was not able to. Whereas it was possible to import categories, per-diem and members expensify-pr.mp4expensify-production.mp4 |
Thanks for the update I will look into it and update. |
this issue #102623 is related but closed due to the revert. I will check when they wan to reopen this one. this pr suppose to fix it So the bug you find belong to to other issue, i will try to re-open the other one. |
|
As mention earlier, there's already upstream fix in their repo. so it might of matter of days until it will be published. Should we patch it anyway until it will be merged so we wont delay until (or just point our repack repo at the commit) ? @mountiny @rojiphil |
|
I think we can patch and then remove it once the version is released its easy |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / Safari |
mountiny
left a comment
There was a problem hiding this comment.
@MelvinBot can you create Weekly Task issue and assign @mountiny @elirangoshen that will be tracking to remove the patch and update the library version?
|
I created [DX] Remove Re.Pack Android assets patches and update @callstack/repack. It has the The issue tracks two steps for when Re.Pack publishes the upstream fix (callstack/repack#1472, closed on 2026-10-02 but not released yet):
It also includes the steps to verify the change. |
|
Let's use an AdHoc build to test a "canary" as requested in the upstream issue: callstack/repack#1472 (comment) |
|
🚧 roryabraham has triggered a test Expensify/App build. You can view the workflow run here. |
This comment has been minimized.
This comment has been minimized.
|
The Re.pack v5.4.1 is out 🎉 The PR was updated to accommodate for that. Could I ask you to please re-run the test 7 job? I think it should be fine after merging latest main 🙏 Apart from above, we should be good to go 🚀 |
…le, the age gate does not fire
|
Hmm, weird that the tests are failing on this type of changes. @mountiny could we re-run the 4th suite, please 🙏 |
|
re-ran |
|
Looks like it's OK now. The PR is ready to be merged |
|
🚧 mountiny has triggered a test Expensify/App build. You can view the workflow run here. |
This comment has been minimized.
This comment has been minimized.
Reviewer Checklist
Screenshots/VideosWhatsApp.Video.2026-10-13.at.21.52.54.mp4 |
|
thanks @shubham1206agra I hope it will be merged today as there's other pr's that depends on this one :) |
|
@mountiny is OOO today. So, not sure it will be merged today. |
|
🚧 roryabraham has triggered a test Expensify/App build. You can view the workflow run here. |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/roryabraham in version: 9.5.10-0 🚀
|
|
🚀 Deployed to staging by https://github.com/roryabraham in version: 9.5.12-0 🚀
|
|
🚀 Deployed to production by https://github.com/cristipaval in version: 9.5.12-1 🚀
Bundle Size Analysis (Sentry): |
Explanation of Change
Re.Pack's Android release asset output differs from Metro's in two ways. Both break HybridApp Android release builds bundled with Re.Pack:
res/font/instead ofres/raw/(@callstack+repack+5.3.0+003+android-fonts-raw.patch). Skia'suseFontresolvesrequire()d fonts withgetIdentifier(name, "drawable")and then"raw", and never looks infont. The Home "Spend over time" chart fonts never loaded, so the chart spun forever. The patch sends.ttf/.otf/.ttcfiles toraw, as Metro does. XML font-family resources still go tofont/.res/raw/keep.xml(@callstack+repack+5.3.0+004+android-keep-xml.patch). Metro writes atools:keeplist of every bundled resource, because JS loads them by name and the resource shrinker can't see that. Without it, builds withshrinkResources(standalone Android release) can strip images and fonts that are still used. The patch writes the same file from Re.Pack's assets copy step.With both patches, an Android release bundle from Re.Pack matches Metro's: the same 13 font files in
raw/, and the same 787keep.xmlentries (Metro also lists 5 LogBox images that only exist in dev).Fixed Issues
$ #100202
Tests
npm ciand confirm patch-package applies all four@callstack/repackpatches (001to004) with no errors.npx rock bundle --platform android --dev false --entry-file index.js --bundle-output /tmp/repack/index.android.bundle --assets-dest /tmp/repack/res/tmp/repack/res/font/folder, and that the.otffont files (e.g.assets_fonts_native_expensifyneueregular.otf) are in/tmp/repack/res/raw/./tmp/repack/res/raw/keep.xmlexists and lists@drawable/...and@raw/...entries.BUNDLER=metrointo/tmp/metro.diff -rq /tmp/metro/res /tmp/repack/resshould only show the 5 LogBox drawables plus a differentkeep.xml, and the twokeep.xmlfiles should differ only by those 5 entries.Mobile-Expensify/Android/build.gradle, setcliFile = file("$newDotNodeModules/rock/dist/src/bin.js")andbundleCommand = "bundle"in thereact { }block, then run./gradlew assembleReleasefromMobile-Expensify/Androidand install the APK.Offline tests
N/A. This only changes where bundled assets are written at build time.
QA Steps
Android only. Use a workspace you own, and turn on Tags and Per diem in More features.
State,Region,Team), turn on "These are independent tags", tap Next, then Import. Verify "Import successful" appears and the tag lists show up.Destination,Subrate,Amount,Currencycolumns and tap Import. Verify "Import successful" appears and the rates are listed.Emailcolumn and tap Import. Verify "Import successful" appears and the members are listed.PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari