expo / snack

Expo Snack lets you run Expo in the browser.
https://snack.expo.dev
MIT License
366 stars 109 forks source link

[snackager] try to fix expo-linear-gradient issue #476

Closed Kudo closed 1 year ago

Kudo commented 1 year ago

Why

expo-linear-gradient@12.1.2 on sdk 48 is broken on android: https://github.com/expo/expo/issues/24424 close ENG-10114

How

expo-linear-gradient 12.1.1 <-> 12.1.2 does not change anything from js side. i think the problem is coming from snackager. comparing the two bundles:

my hypotheses are:

the solution is passing exact @babel/runtime version to install. that could prevent the inconsistent version between @babel/plugin-transform-runtime and @babel/runtime. ~since our @babel/runtime is 7.12.5, we could also use the explicit useESModules.~ To fix the expo-modules-core breaking change, now this pr tries to fetch bundledNativeModules from api server and install recommended versions accordingly.

Test Plan

deploy staging to test the test case from https://staging-snack.expo.dev/@kudochien/linear-gradient. may wait 24 hrs for cloudfront to purge the cache.

linear[bot] commented 1 year ago
ENG-10114 [expo-linear-gradient][Android] Linear-gradient rendering incorrectly on Android 13

### This issue was automatically imported from GitHub: [https://github.com/expo/expo/issues/24424](https://github.com/expo/expo/issues/24424) #### Issue accepted by brent --- ## Summary: * The user is having an issue with gradients not working on Android in the current version of Expo. * This issue can be reproduced using the snack provided in the ExpoLinearGradient section of the Expo docs. * The gradients seem to work as expected on iOS, but not on Android as is highlighted with the screenshots the user provided. * The user created a minimal reproducible example available at a provided GitHub link. * The underlying issue is not specified, so further investigation will be required to determine the cause for this unexpected behavior.