Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

fix: profile-sync-controller mobile compilation issues #4721

Merged
merged 2 commits into from
Sep 20, 2024

Conversation

Prithpal-Sooriya
Copy link
Contributor

@Prithpal-Sooriya Prithpal-Sooriya commented Sep 20, 2024

Explanation

Our package has exported async arrow functions, which cannot be compiled during the detox build android step on mobile.

See error logs

Screenshot 2024-09-20 at 21 16 55

It is most likely related to this hermes error: facebook/hermes#1395

This removes the exported async arrow functions in the bundle for normal async functions.

Long term we should either:

  • Add ESLint rules to prevent other devs or teams being burnt by this
  • Or have a transpilation step to avoid async arrow functions.

References

https://consensyssoftware.atlassian.net/browse/NOTIFY-1144

Changelog

@metamask/profile-sync-controller

  • CHANGED: updated exported async arrow functions to normal async functions.

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've highlighted breaking changes using the "BREAKING" category above as appropriate
  • I've prepared draft pull requests for clients and consumer packages to resolve any breaking changes

@Prithpal-Sooriya Prithpal-Sooriya added the team-notifications Notification Team changes. https://github.com/orgs/MetaMask/teams/notifications label Sep 20, 2024
@Prithpal-Sooriya
Copy link
Contributor Author

@metamaskbot publish-preview

Copy link
Contributor

Preview builds have been published. See these instructions for more information about preview builds.

Expand for full list of packages and versions.
{
  "@metamask-previews/accounts-controller": "18.2.1-preview-7ccbf59",
  "@metamask-previews/address-book-controller": "6.0.1-preview-7ccbf59",
  "@metamask-previews/announcement-controller": "7.0.1-preview-7ccbf59",
  "@metamask-previews/approval-controller": "7.0.4-preview-7ccbf59",
  "@metamask-previews/assets-controllers": "38.0.1-preview-7ccbf59",
  "@metamask-previews/base-controller": "7.0.1-preview-7ccbf59",
  "@metamask-previews/build-utils": "3.0.1-preview-7ccbf59",
  "@metamask-previews/chain-controller": "0.1.2-preview-7ccbf59",
  "@metamask-previews/composable-controller": "9.0.1-preview-7ccbf59",
  "@metamask-previews/controller-utils": "11.3.0-preview-7ccbf59",
  "@metamask-previews/ens-controller": "14.0.1-preview-7ccbf59",
  "@metamask-previews/eth-json-rpc-provider": "4.1.4-preview-7ccbf59",
  "@metamask-previews/gas-fee-controller": "20.0.1-preview-7ccbf59",
  "@metamask-previews/json-rpc-engine": "9.0.3-preview-7ccbf59",
  "@metamask-previews/json-rpc-middleware-stream": "8.0.3-preview-7ccbf59",
  "@metamask-previews/keyring-controller": "17.2.1-preview-7ccbf59",
  "@metamask-previews/logging-controller": "6.0.1-preview-7ccbf59",
  "@metamask-previews/message-manager": "10.1.1-preview-7ccbf59",
  "@metamask-previews/name-controller": "8.0.1-preview-7ccbf59",
  "@metamask-previews/network-controller": "21.0.1-preview-7ccbf59",
  "@metamask-previews/notification-controller": "6.0.1-preview-7ccbf59",
  "@metamask-previews/notification-services-controller": "0.7.0-preview-7ccbf59",
  "@metamask-previews/permission-controller": "11.0.2-preview-7ccbf59",
  "@metamask-previews/permission-log-controller": "3.0.1-preview-7ccbf59",
  "@metamask-previews/phishing-controller": "12.0.3-preview-7ccbf59",
  "@metamask-previews/polling-controller": "10.0.1-preview-7ccbf59",
  "@metamask-previews/preferences-controller": "13.0.3-preview-7ccbf59",
  "@metamask-previews/profile-sync-controller": "0.8.0-preview-7ccbf59",
  "@metamask-previews/queued-request-controller": "5.0.1-preview-7ccbf59",
  "@metamask-previews/rate-limit-controller": "6.0.1-preview-7ccbf59",
  "@metamask-previews/selected-network-controller": "18.0.1-preview-7ccbf59",
  "@metamask-previews/signature-controller": "19.1.0-preview-7ccbf59",
  "@metamask-previews/transaction-controller": "37.0.0-preview-7ccbf59",
  "@metamask-previews/user-operation-controller": "15.0.1-preview-7ccbf59"
}

@Prithpal-Sooriya Prithpal-Sooriya marked this pull request as ready for review September 20, 2024 21:29
@Prithpal-Sooriya Prithpal-Sooriya requested a review from a team as a code owner September 20, 2024 21:29
@Prithpal-Sooriya Prithpal-Sooriya changed the title fix: try fixing mobile issues fix: profile-sync-controller mobile compilation issues Sep 20, 2024
Copy link
Contributor

@Jonathansoufer Jonathansoufer left a comment

Choose a reason for hiding this comment

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

LGTM

@Prithpal-Sooriya Prithpal-Sooriya merged commit 2be0ce4 into main Sep 20, 2024
116 checks passed
@Prithpal-Sooriya Prithpal-Sooriya deleted the fix-breaking-mobile-issues branch September 20, 2024 21:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team-notifications Notification Team changes. https://github.com/orgs/MetaMask/teams/notifications
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants