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

Defines module for React-jsinspector #44252

Closed
wants to merge 1 commit into from

Conversation

Kudo
Copy link
Contributor

@Kudo Kudo commented Apr 25, 2024

Summary:

Defines module for React-jsinspector that for swift modules to integrate with.

to fix expo/expo#28209, any podspec depends on HermesExecutorFactory should use add_dependency(s, "React-jsinspector", :framework_name => 'jsinspector_modern') to add dependency. otherwise it will encounter the header not found issue because use_frameworks will change "jsinspector-modern" to "jsinspector_modern".

to depend on React-jsinspector from expo-modules-core, we need it to define as a module.
otherwise, it will have the error

The Swift pod `ExpoModulesCore` depends upon `React-jsinspector`, which does not define modules. To opt into those targets generating module maps (which is necessary to import them from Swift when building as static libraries), you may set `use_modular_headers!` globally in your Podfile, or specify `:modular_headers => true` for particular dependencies.

Changelog:

[IOS] [CHANGED] - Add DEFINES_MODULE for React-jsinspector.podspec

Test Plan:

ci passed

@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Contributor A React Native contributor. p: Expo Partner: Expo Partner Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. labels Apr 25, 2024
@Kudo
Copy link
Contributor Author

Kudo commented Apr 25, 2024

@cipolleschi could you help to take a look for this change when you get a chance?

@facebook-github-bot
Copy link
Contributor

@cipolleschi has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label Apr 25, 2024
@facebook-github-bot
Copy link
Contributor

@cipolleschi merged this pull request in 4e61865.

Copy link

This pull request was successfully merged by @Kudo in 4e61865.

When will my fix make it into a release? | How to file a pick request?

@Kudo Kudo deleted the @kudo/defines-module-jsinspector branch April 25, 2024 15:28
cipolleschi pushed a commit that referenced this pull request May 1, 2024
Summary:
Defines module for `React-jsinspector` that for swift modules to integrate with.

to fix expo/expo#28209, any podspec depends on HermesExecutorFactory should use ` add_dependency(s, "React-jsinspector", :framework_name => 'jsinspector_modern')` to add dependency. otherwise it will encounter the header not found issue because use_frameworks will change "jsinspector-modern" to "jsinspector_modern".

to depend on React-jsinspector from expo-modules-core, we need it to define as a module.
otherwise, it will have the error
```
The Swift pod `ExpoModulesCore` depends upon `React-jsinspector`, which does not define modules. To opt into those targets generating module maps (which is necessary to import them from Swift when building as static libraries), you may set `use_modular_headers!` globally in your Podfile, or specify `:modular_headers => true` for particular dependencies.
```

## Changelog:

[IOS] [CHANGED] - Add `DEFINES_MODULE` for React-jsinspector.podspec

Pull Request resolved: #44252

Test Plan: ci passed

Reviewed By: cortinico

Differential Revision: D56575102

Pulled By: cipolleschi

fbshipit-source-id: 9b7b4568a3e499f0a741a79a846263118ff2d112
Kudo added a commit to expo/expo that referenced this pull request May 3, 2024
# Why

fix header not found issue when using frameworks on new architecture
fixes #28209

# How

the header search path is from `EXJavaScriptRuntime.mm ->
HermesExecutorFactory.h -> <jsinspector-modern/InspectorInterfaces.h>`.
the correct import should be underlined "jsinspector_modern" in the
import. the code is inside react-native core that we cannot touch.
this pr tries to use the `add_dependency()` from react-native core that
we specify extra ":framework_name".

also cleanup some unused search paths that are added through
`install_modules_dependencies()`.
we also have to wait 0.74.1 for
facebook/react-native#44252
kosmydel pushed a commit to kosmydel/react-native that referenced this pull request May 6, 2024
Summary:
Defines module for `React-jsinspector` that for swift modules to integrate with.

to fix expo/expo#28209, any podspec depends on HermesExecutorFactory should use ` add_dependency(s, "React-jsinspector", :framework_name => 'jsinspector_modern')` to add dependency. otherwise it will encounter the header not found issue because use_frameworks will change "jsinspector-modern" to "jsinspector_modern".

to depend on React-jsinspector from expo-modules-core, we need it to define as a module.
otherwise, it will have the error
```
The Swift pod `ExpoModulesCore` depends upon `React-jsinspector`, which does not define modules. To opt into those targets generating module maps (which is necessary to import them from Swift when building as static libraries), you may set `use_modular_headers!` globally in your Podfile, or specify `:modular_headers => true` for particular dependencies.
```

## Changelog:

[IOS] [CHANGED] - Add `DEFINES_MODULE` for React-jsinspector.podspec

Pull Request resolved: facebook#44252

Test Plan: ci passed

Reviewed By: cortinico

Differential Revision: D56575102

Pulled By: cipolleschi

fbshipit-source-id: 9b7b4568a3e499f0a741a79a846263118ff2d112
kosmydel pushed a commit to kosmydel/react-native that referenced this pull request Jun 11, 2024
Summary:
Defines module for `React-jsinspector` that for swift modules to integrate with.

to fix expo/expo#28209, any podspec depends on HermesExecutorFactory should use ` add_dependency(s, "React-jsinspector", :framework_name => 'jsinspector_modern')` to add dependency. otherwise it will encounter the header not found issue because use_frameworks will change "jsinspector-modern" to "jsinspector_modern".

to depend on React-jsinspector from expo-modules-core, we need it to define as a module.
otherwise, it will have the error
```
The Swift pod `ExpoModulesCore` depends upon `React-jsinspector`, which does not define modules. To opt into those targets generating module maps (which is necessary to import them from Swift when building as static libraries), you may set `use_modular_headers!` globally in your Podfile, or specify `:modular_headers => true` for particular dependencies.
```

## Changelog:

[IOS] [CHANGED] - Add `DEFINES_MODULE` for React-jsinspector.podspec

Pull Request resolved: facebook#44252

Test Plan: ci passed

Reviewed By: cortinico

Differential Revision: D56575102

Pulled By: cipolleschi

fbshipit-source-id: 9b7b4568a3e499f0a741a79a846263118ff2d112
This was referenced Jun 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Contributor A React Native contributor. Merged This PR has been merged. p: Expo Partner: Expo Partner Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[expo-modules][expo-dev-client][SDK51] build error with useFrameworks: 'static'
2 participants