ci: test cache#29511
Open
tommasini wants to merge 6 commits intorn-upgrade/0.81.5-no-unit-testsfrom
Open
Conversation
Contributor
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
Contributor
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 58245c7. Configure here.
Made-with: Cursor
Hermes (RN's bytecode compiler) does not accept dynamic `import()` syntax — even inside dead code branches — and aborts the bytecode compile with "Invalid expression encountered". When that happens during the Xcode "Bundle JS Code & Upload Sentry Files" phase, the .app ends up without a main.jsbundle and crashes immediately on launch (Detox sees FBSOpenApplicationServiceErrorDomain code=3 / SBMainWorkspace denials). Two known sources currently trip this: - PerpsController.ts uses `import(/* webpackIgnore */ myxModulePath)` for extension/webpack tree-shaking. The mobile build doesn't need code splitting, but the syntax is fatal for Hermes regardless of runtime path. - lilconfig (transitive via tailwindcss/postcss-load-config) does the same in its dynamicImport loader. Add a tiny inline Babel visitor that rewrites every `import(x)` → `Promise.resolve().then(() => require(x))`, mirroring babel-plugin-dynamic-import-node. Inlined to avoid a new dependency. Runs across user code AND node_modules (Metro applies babel transforms there too), so PerpsController.ts can stay bit-identical with the extension sync, and lilconfig needs no shim. Verified end-to-end locally: Metro bundles cleanly, Hermes compile exits 0, 85 MB main.hbc produced. Made-with: Cursor
…aMask/metamask-mobile into chore/build-e2e-rn-update-81
Contributor
🔍 Smart E2E Test Selection⏭️ Smart E2E selection skipped - skip-smart-e2e-selection label found All E2E tests pre-selected. |
Contributor
|
❌ E2E Fixture Validation — Failed |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Description
Changelog
CHANGELOG entry:
Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Performance checks (if applicable)
trace()for usage andaddTokenfor an exampleFor performance guidelines and tooling, see the Performance Guide.
Pre-merge reviewer checklist
Note
Medium Risk
Adds a global Babel transform that rewrites all
import()calls, which can affect runtime module loading semantics if any code relies on native dynamic-import behavior. UI import cleanups are low risk, but the build-step change impacts the entire bundle.Overview
Prevents Hermes builds from failing on parser-fatal dynamic
import()by adding an inlined Babel visitor that rewritesimport(x)toPromise.resolve().then(() => require(x)).Cleans up UI code to import
Spinnerdirectly from@metamask/design-system-react-native(and updates the affected Perps toast test mocks accordingly), removing usage of the separate@metamask/design-system-react-native/spinnerentrypoint.Reviewed by Cursor Bugbot for commit 6307cc3. Bugbot is set up for automated code reviews on this repo. Configure here.