You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was helping out @shwanton in supporting use_frameworks! in react-native-macos.
I managed to have them working with :linkage => :static and the Old Architecture in this PR.
I then started looking into :linkage => :dynamic in the Old Architecture and I hit a wall. MacOS has some circular dependencies that needs to be fixed as dynamic frameworks need to be able to build in isolation and circular dependencies prevent that, unfortunately.
NO_FLIPPER=1 USE_FRAMEWORKS=dynamic bundle exec pod install
open RNTestProject.xcworkspace
Select the RNTester-MacOS target
cmd + B
Additional context
On mobile, use_frameworks! is a requirement for Firebase, for example. Perhaps Firebase is not compatible with MacOS?
Or aren't there libraries which requires that to be turned on?
Enabling and supporting Swift, requires a folder structure which is exactly the one enforced by frameworks (Clang modules) so it make sense to make sure we support it.
Dynamic frameworks will also catch those circular dependencies automatically!
The text was updated successfully, but these errors were encountered:
Environment
Steps to reproduce the bug
I was helping out @shwanton in supporting use_frameworks! in react-native-macos.
I managed to have them working with
:linkage => :static
and the Old Architecture in this PR.I then started looking into
:linkage => :dynamic
in the Old Architecture and I hit a wall. MacOS has some circular dependencies that needs to be fixed as dynamic frameworks need to be able to build in isolation and circular dependencies prevent that, unfortunately.The two dependencies I found are:
First
RCTView
depends onRCTText
becauese of thisRCTText
depends onReact-Core
because of thisReact-Core
ownsRCTView
, thus, the circular dependencySecond
RCTTouchHandler
depends onRCTText
because of thisRCTText
depends onReact-Core
because of thisReact-Core
ownsRCTView
, thus, the circular dependency.There are various way that we can use to break those:
React-Core
, make theRCTText
classes conform to them and use them to decide what to do.RCTText
classes exposes some specific selector that are custom to them, we can use that instead of the class nameRCTText
classes has some values we can leverage at runtime to make the decision, we can use them.Expected Behavior
Being able to build with
use_frameworks!, :linkage => :dynamic
Actual Behavior
Fails to build
Reproducible Demo
git clone https://github.com/microsoft/react-native-macos
cd react-native-macos
yarn
cd packages/rn-tester
bundle install
NO_FLIPPER=1 USE_FRAMEWORKS=dynamic bundle exec pod install
open RNTestProject.xcworkspace
Additional context
On mobile, use_frameworks! is a requirement for Firebase, for example. Perhaps Firebase is not compatible with MacOS?
Or aren't there libraries which requires that to be turned on?
Enabling and supporting Swift, requires a folder structure which is exactly the one enforced by frameworks (Clang modules) so it make sense to make sure we support it.
Dynamic frameworks will also catch those circular dependencies automatically!
The text was updated successfully, but these errors were encountered: