Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[expo-updates] Asset exclusion on Android part 1 #25277

Conversation

douglowder
Copy link
Contributor

Why

Allow Android to make use of updates created with only some assets included (using the CLI changes in #25065 ).

How

  • Make Android work with updates that don't include all assets
  • Limitations:
    • Android still needs to copy embedded assets to the updates folder
    • Fonts (which are packaged as resources in Android) still need to be part of updates

Limitations will be addressed in future PRs.

Test Plan

  • Manual testing with a custom test app
    • The app has Expo config with extra.updates.assetPatternsToBeBundled = "assetsInUpdates/*"
    • Start with some assets (images and fonts) in a different folder (e.g. embeddedAssets)
    • App starts up, embedded bundle works and shows all images and fonts
    • Add a new image in embeddedAssets, run eas update and download and launch update
    • App works, but image will not show in UI
    • Now move that image to the assetsInUpdates folder, and change App.tsx accordingly
    • Run eas update again, download and run update
    • The new image will now show up correctly in the UI
  • Updates E2E should continue to pass (confirming that this does not break existing behavior)

Checklist

@douglowder douglowder requested a review from wschurman as a code owner November 8, 2023 19:37
Copy link

linear bot commented Nov 8, 2023

@expo-bot expo-bot added the bot: suggestions ExpoBot has some suggestions label Nov 8, 2023
@douglowder douglowder force-pushed the doug/eng-9910-remove-expo-updates-requirement-that-all-assets-be-present branch from 788189d to bdeaa81 Compare November 8, 2023 20:20
Copy link
Member

@wschurman wschurman left a comment

Choose a reason for hiding this comment

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

A few inline comments

Co-authored-by: Will Schurman <wschurman@expo.io>
@expo-bot expo-bot added bot: passed checks ExpoBot has nothing to complain about and removed bot: suggestions ExpoBot has some suggestions labels Nov 10, 2023
@douglowder douglowder merged commit c11b450 into main Nov 10, 2023
@douglowder douglowder deleted the doug/eng-9910-remove-expo-updates-requirement-that-all-assets-be-present branch November 10, 2023 02:29
onizam95 pushed a commit to onizam95/expo-av-drm that referenced this pull request Jan 15, 2024
# Why

Allow Android to make use of updates created with only some assets
included (using the CLI changes in expo#25065 ).

# How

- Make Android work with updates that don't include all assets
- Limitations:
  - Android still needs to copy embedded assets to the updates folder
- Fonts (which are packaged as resources in Android) still need to be
part of updates

Limitations will be addressed in future PRs.

# Test Plan

- Manual testing with a custom test app
- The app has Expo config with `extra.updates.assetPatternsToBeBundled =
"assetsInUpdates/*"`
- Start with some assets (images and fonts) in a different folder (e.g.
`embeddedAssets`)
  - App starts up, embedded bundle works and shows all images and fonts
- Add a new image in `embeddedAssets`, run `eas update` and download and
launch update
  - App works, but image will not show in UI
- Now move that image to the `assetsInUpdates` folder, and change
`App.tsx` accordingly
  - Run `eas update` again, download and run update
  - The new image will now show up correctly in the UI
- Updates E2E should continue to pass (confirming that this does not
break existing behavior)

# Checklist

- [x] Documentation is up to date to reflect these changes (eg:
https://docs.expo.dev and README.md).
- [x] Conforms with the [Documentation Writing Style
Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
- [x] This diff will work correctly for `npx expo prebuild` & EAS Build
(eg: updated a module plugin).

---------

Co-authored-by: Will Schurman <wschurman@expo.io>
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bot: fingerprint changed bot: passed checks ExpoBot has nothing to complain about
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants