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

[ios][android] Migrate names of module definition components #17193

Merged
merged 5 commits into from
Apr 27, 2022

Conversation

tsapeta
Copy link
Member

@tsapeta tsapeta commented Apr 25, 2022

Why

Follow up on #17098 and #17153
The packages for SDK45 used the deprecated names for compatibility reasons, but now we can migrate them to use the new names of the components.

How

Migrated the definition components on iOS and Android with the following rule:

  • function -> AsyncFunction, or Function if it had .runSynchronously()
  • capitalized all other components

Also updated the expo-module-template

Test Plan

Tests are passing
Manually checked NCL and test-suite

@expo-bot expo-bot added the bot: suggestions ExpoBot has some suggestions label Apr 25, 2022
@tsapeta tsapeta marked this pull request as ready for review April 25, 2022 12:07
@tsapeta tsapeta force-pushed the @tsapeta/migrate-module-definition-components branch from 946f438 to 57b3300 Compare April 27, 2022 15:00
@tsapeta tsapeta force-pushed the @tsapeta/migrate-module-definition-components branch from 57b3300 to 174c39e Compare April 27, 2022 15:05
@expo-bot expo-bot added bot: passed checks ExpoBot has nothing to complain about and removed bot: suggestions ExpoBot has some suggestions labels Apr 27, 2022
@tsapeta tsapeta merged commit 2c5ab57 into main Apr 27, 2022
@tsapeta tsapeta deleted the @tsapeta/migrate-module-definition-components branch April 27, 2022 20:57
@thsantac
Copy link

Hi,
Got this error during iOS build with eas :

Compiling expo-keep-awake Pods/ExpoKeepAwake » KeepAwakeModule.swift
❌ (node_modules/expo-keep-awake/ios/KeepAwakeModule.swift:9:5)
7 |
8 | public func definition() -> ModuleDefinition {

9 | Name("ExpoKeepAwake")
| ^ cannot find 'Name' in scope
10 |
11 | AsyncFunction("activate", activate)
12 | AsyncFunction("deactivate", deactivate)

Is there a workaround ? Do not use this module by the way.
Thanks.

@tsapeta
Copy link
Member Author

tsapeta commented Aug 30, 2022

@thsantac Can you check which version of expo-modules-core do you have installed in your project? It seems to be too old. You can check that with npm ls expo-modules-core or yarn why expo-modules-core.
Also, you shouldn't have this package installed directly in your package.json, so make sure it's not there.

@thsantac
Copy link

thsantac commented Aug 30, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bot: passed checks ExpoBot has nothing to complain about
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants