Skip to content

Commit

Permalink
TM iOS: move jscallinvoker under ReactCommon podspec
Browse files Browse the repository at this point in the history
Summary:
This essentially changes the header namespace to `<ReactCommon/`
Relevant efforts:
facebook#25619
facebook#25393

Reviewed By: PeteTheHeat

Differential Revision: D16233125

fbshipit-source-id: 83eda4cc50ebb01efd1ce3eb18f47c97a049cffa
  • Loading branch information
fkgozali authored and facebook-github-bot committed Jul 13, 2019
1 parent 394c9a5 commit c1b0f39
Show file tree
Hide file tree
Showing 19 changed files with 42 additions and 79 deletions.
19 changes: 9 additions & 10 deletions RNTester/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,6 @@ PODS:
- React-DevSupport (1000.0.0):
- React-Core (= 1000.0.0)
- React-RCTWebSocket (= 1000.0.0)
- React-jscallinvoker (1000.0.0):
- Folly (= 2018.10.22.00)
- React-cxxreact (= 1000.0.0)
- React-jsi (1000.0.0):
- boost-for-react-native (= 1.63.0)
- DoubleConversion
Expand Down Expand Up @@ -122,22 +119,27 @@ PODS:
- React-Core (= 1000.0.0)
- React-RCTWebSocket (1000.0.0):
- React-Core (= 1000.0.0)
- ReactCommon/jscallinvoker (1000.0.0):
- DoubleConversion
- Folly (= 2018.10.22.00)
- glog
- React-cxxreact (= 1000.0.0)
- ReactCommon/turbomodule/core (1000.0.0):
- DoubleConversion
- Folly (= 2018.10.22.00)
- glog
- React-Core/CxxBridge (= 1000.0.0)
- React-cxxreact (= 1000.0.0)
- React-jscallinvoker (= 1000.0.0)
- React-jsi (= 1000.0.0)
- ReactCommon/jscallinvoker (= 1000.0.0)
- ReactCommon/turbomodule/samples (1000.0.0):
- DoubleConversion
- Folly (= 2018.10.22.00)
- glog
- React-Core/CxxBridge (= 1000.0.0)
- React-cxxreact (= 1000.0.0)
- React-jscallinvoker (= 1000.0.0)
- React-jsi (= 1000.0.0)
- ReactCommon/jscallinvoker (= 1000.0.0)
- ReactCommon/turbomodule/core (= 1000.0.0)
- yoga (1000.0.0.React)

Expand All @@ -155,7 +157,6 @@ DEPENDENCIES:
- React-CoreModules (from `../React/CoreModules`)
- React-cxxreact (from `../ReactCommon/cxxreact`)
- React-DevSupport (from `../React`)
- React-jscallinvoker (from `../ReactCommon/jscallinvoker`)
- React-jsi (from `../ReactCommon/jsi`)
- React-jsiexecutor (from `../ReactCommon/jsiexecutor`)
- React-jsinspector (from `../ReactCommon/jsinspector`)
Expand All @@ -171,6 +172,7 @@ DEPENDENCIES:
- React-RCTText (from `../Libraries/Text`)
- React-RCTVibration (from `../Libraries/Vibration`)
- React-RCTWebSocket (from `../Libraries/WebSocket`)
- ReactCommon/jscallinvoker (from `../ReactCommon`)
- ReactCommon/turbomodule/core (from `../ReactCommon`)
- ReactCommon/turbomodule/samples (from `../ReactCommon`)
- yoga (from `../ReactCommon/yoga`)
Expand Down Expand Up @@ -206,8 +208,6 @@ EXTERNAL SOURCES:
:path: "../ReactCommon/cxxreact"
React-DevSupport:
:path: "../React"
React-jscallinvoker:
:path: "../ReactCommon/jscallinvoker"
React-jsi:
:path: "../ReactCommon/jsi"
React-jsiexecutor:
Expand Down Expand Up @@ -258,7 +258,6 @@ SPEC CHECKSUMS:
React-CoreModules: b4d2aa51d008ec9edf74f3a03075bbf0359c325f
React-cxxreact: 7c4242192149ce0205b53efaa03e3bf86ba4337c
React-DevSupport: f34768e3aad3e59ee9800c752a78bc6cb24d0f75
React-jscallinvoker: e730f2eca4cb27830af459c0a9af00ac6691bf4c
React-jsi: 98d1f9d8a79d2720ba6a44c2d928a77f315b7e4f
React-jsiexecutor: c0ab8c80a6e88380d63f583690a50d4a723b47b5
React-jsinspector: ea0a218071a11c3687cef2480580180caa6a64c0
Expand All @@ -274,7 +273,7 @@ SPEC CHECKSUMS:
React-RCTText: 469ec754592c92fc639825e558908c2f0e783e2c
React-RCTVibration: ade3c169b54f3bc16c9a9918e17e48ef66aee6ba
React-RCTWebSocket: cb5317e9a4adc37191660f819fb21d63433584ef
ReactCommon: 85e9a652d56873ab4e91820ecd759ca006dc1b56
ReactCommon: 040ed4788f8cae2ffa23b2d5fb0d4afa58c6d646
yoga: b72aa5b3708cc93c5897f8297122d6eba1331e07

PODFILE CHECKSUM: f866eab42001b1d59349bce6b20d00912cdc700c
Expand Down
4 changes: 0 additions & 4 deletions RNTester/RNTesterPods.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,6 @@
E7DB20FA22B2BD53005AC45F /* libReact-Core.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = "libReact-Core.a"; sourceTree = BUILT_PRODUCTS_DIR; };
E7DB20FC22B2BD53005AC45F /* libReact-cxxreact.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = "libReact-cxxreact.a"; sourceTree = BUILT_PRODUCTS_DIR; };
E7DB20FE22B2BD53005AC45F /* libReact-DevSupport.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = "libReact-DevSupport.a"; sourceTree = BUILT_PRODUCTS_DIR; };
E7DB210022B2BD53005AC45F /* libReact-jscallinvoker.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = "libReact-jscallinvoker.a"; sourceTree = BUILT_PRODUCTS_DIR; };
E7DB210222B2BD53005AC45F /* libReact-jsi.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = "libReact-jsi.a"; sourceTree = BUILT_PRODUCTS_DIR; };
E7DB210422B2BD53005AC45F /* libReact-jsiexecutor.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = "libReact-jsiexecutor.a"; sourceTree = BUILT_PRODUCTS_DIR; };
E7DB210622B2BD53005AC45F /* libReact-jsinspector.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = "libReact-jsinspector.a"; sourceTree = BUILT_PRODUCTS_DIR; };
Expand Down Expand Up @@ -255,7 +254,6 @@
E7DB20FA22B2BD53005AC45F /* libReact-Core.a */,
E7DB20FC22B2BD53005AC45F /* libReact-cxxreact.a */,
E7DB20FE22B2BD53005AC45F /* libReact-DevSupport.a */,
E7DB210022B2BD53005AC45F /* libReact-jscallinvoker.a */,
E7DB210222B2BD53005AC45F /* libReact-jsi.a */,
E7DB210422B2BD53005AC45F /* libReact-jsiexecutor.a */,
E7DB210622B2BD53005AC45F /* libReact-jsinspector.a */,
Expand Down Expand Up @@ -760,7 +758,6 @@
"-l\"React-RCTVibration\"",
"-l\"React-RCTWebSocket\"",
"-l\"React-cxxreact\"",
"-l\"React-jscallinvoker\"",
"-l\"React-jsi\"",
"-l\"React-jsiexecutor\"",
"-l\"React-jsinspector\"",
Expand Down Expand Up @@ -838,7 +835,6 @@
"-l\"React-RCTVibration\"",
"-l\"React-RCTWebSocket\"",
"-l\"React-cxxreact\"",
"-l\"React-jscallinvoker\"",
"-l\"React-jsi\"",
"-l\"React-jsiexecutor\"",
"-l\"React-jsinspector\"",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#pragma once

#include <fb/fbjni.h>
#include <jsireact/JSCallInvoker.h>
#include <ReactCommon/JSCallInvoker.h>
#include <memory>

namespace facebook {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

#include <fb/fbjni.h>
#include <ReactCommon/JavaTurboModule.h>
#include <jsireact/JSCallInvoker.h>
#include <ReactCommon/JSCallInvoker.h>
#include <string>
#include <memory>

Expand Down
2 changes: 1 addition & 1 deletion ReactAndroid/src/main/jni/react/jni/CatalystInstanceImpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include <fb/fbjni.h>
#include <folly/Memory.h>
#include <ReactCommon/JSCallInvokerHolder.h>
#include <jsireact/BridgeJSCallInvoker.h>
#include <ReactCommon/BridgeJSCallInvoker.h>

#include "CxxModuleWrapper.h"
#include "JavaModuleWrapper.h"
Expand Down
11 changes: 10 additions & 1 deletion ReactCommon/ReactCommon.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,23 @@ Pod::Spec.new do |s|
"USE_HEADERMAP" => "YES",
"CLANG_CXX_LANGUAGE_STANDARD" => "c++14" }

s.subspec "jscallinvoker" do |ss|
ss.source_files = "jscallinvoker/**/*.{cpp,h}"

ss.dependency "React-cxxreact", version
ss.dependency "DoubleConversion"
ss.dependency "Folly", folly_version
ss.dependency "glog"
end

s.subspec "turbomodule" do |ss|
ss.dependency "ReactCommon/jscallinvoker", version
ss.dependency "React-Core/CxxBridge", version
ss.dependency "React-cxxreact", version
ss.dependency "React-jsi", version
ss.dependency "Folly", folly_version
ss.dependency "DoubleConversion"
ss.dependency "glog"
ss.dependency "React-jscallinvoker", version

ss.subspec "core" do |sss|
sss.source_files = "turbomodule/core/*.{cpp,h}",
Expand Down
6 changes: 3 additions & 3 deletions ReactCommon/jscallinvoker/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)

# Header search path for all source files in this module.
LOCAL_C_INCLUDES := $(LOCAL_PATH)/jsireact
LOCAL_C_INCLUDES := $(LOCAL_PATH)/ReactCommon

# Header search path for modules that depend on this module
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)
Expand All @@ -20,8 +20,8 @@ LOCAL_STATIC_LIBRARIES = libreactnative
# Name of this module.
LOCAL_MODULE := jscallinvoker

# Compile all local c++ files under ./jsireact
LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/jsireact/*.cpp)
# Compile all local c++ files under ./ReactCommon
LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/ReactCommon/*.cpp)

# Build the files in this directory as a shared library
include $(BUILD_STATIC_LIBRARY)
16 changes: 8 additions & 8 deletions ReactCommon/jscallinvoker/BUCK
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
load("//tools/build_defs/oss:rn_defs.bzl", "ANDROID", "APPLE", "react_native_xplat_target", "rn_xplat_cxx_library")
load("//tools/build_defs/oss:rn_defs.bzl", "ANDROID", "APPLE", "react_native_xplat_target", "rn_xplat_cxx_library", "subdir_glob")

rn_xplat_cxx_library(
name = "jscallinvoker",
srcs = [
"jsireact/BridgeJSCallInvoker.cpp",
],
srcs = glob(["**/*.cpp"]),
header_namespace = "",
exported_headers = {
"jsireact/BridgeJSCallInvoker.h": "jsireact/BridgeJSCallInvoker.h",
"jsireact/JSCallInvoker.h": "jsireact/JSCallInvoker.h",
},
exported_headers = subdir_glob(
[
("ReactCommon", "*.h"),
],
prefix = "ReactCommon",
),
compiler_flags = [
"-fexceptions",
"-frtti",
Expand Down
41 changes: 0 additions & 41 deletions ReactCommon/jscallinvoker/React-jscallinvoker.podspec

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* LICENSE file in the root directory of this source tree.
*/

#include <jsireact/BridgeJSCallInvoker.h>
#include <ReactCommon/BridgeJSCallInvoker.h>
#include <cxxreact/Instance.h>

namespace facebook {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include <functional>
#include <memory>

#include <jsireact/JSCallInvoker.h>
#include <ReactCommon/JSCallInvoker.h>

namespace facebook {
namespace react {
Expand Down
2 changes: 1 addition & 1 deletion ReactCommon/turbomodule/core/TurboModule.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

#include <jsi/jsi.h>

#include <jsireact/JSCallInvoker.h>
#include <ReactCommon/JSCallInvoker.h>

namespace facebook {
namespace react {
Expand Down
2 changes: 1 addition & 1 deletion ReactCommon/turbomodule/core/TurboModuleUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

#include <jsi/jsi.h>

#include <jsireact/JSCallInvoker.h>
#include <ReactCommon/JSCallInvoker.h>

using namespace facebook;

Expand Down
2 changes: 1 addition & 1 deletion ReactCommon/turbomodule/core/platform/ios/RCTTurboModule.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
#import <React/RCTBridge.h>
#import <React/RCTBridgeModule.h>
#import <React/RCTModuleMethod.h>
#import <ReactCommon/JSCallInvoker.h>
#import <ReactCommon/TurboModule.h>
#import <cxxreact/MessageQueueThread.h>
#import <jsireact/JSCallInvoker.h>
#import <string>
#import <unordered_map>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
#import <React/RCTManagedPointer.h>
#import <React/RCTModuleMethod.h>
#import <React/RCTUtils.h>
#import <ReactCommon/JSCallInvoker.h>
#import <ReactCommon/LongLivedObject.h>
#import <ReactCommon/TurboModule.h>
#import <ReactCommon/TurboModuleUtils.h>
#import <jsireact/JSCallInvoker.h>

using namespace facebook;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
#import <React/RCTCxxModule.h>
#import <React/RCTLog.h>
#import <React/RCTPerformanceLogger.h>
#import <ReactCommon/BridgeJSCallInvoker.h>
#import <ReactCommon/TurboCxxModule.h>
#import <ReactCommon/TurboModuleBinding.h>
#import <jsireact/BridgeJSCallInvoker.h>

using namespace facebook;

Expand Down
2 changes: 1 addition & 1 deletion scripts/autolink-ios.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ def use_react_native! (options={})
end

pod 'React-cxxreact', :path => "#{prefix}/ReactCommon/cxxreact"
pod 'React-jscallinvoker', :path => "#{prefix}/ReactCommon/jscallinvoker"
pod 'React-jsi', :path => "#{prefix}/ReactCommon/jsi"
pod 'React-jsiexecutor', :path => "#{prefix}/ReactCommon/jsiexecutor"
pod 'React-jsinspector', :path => "#{prefix}/ReactCommon/jsinspector"
pod 'ReactCommon/jscallinvoker', :path => "#{prefix}/ReactCommon"
pod 'ReactCommon/turbomodule/core', :path => "#{prefix}/ReactCommon"
pod 'yoga', :path => "#{prefix}/ReactCommon/yoga"

Expand Down
2 changes: 1 addition & 1 deletion template/ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ target 'HelloWorld' do
pod 'React-RCTWebSocket', :path => '../node_modules/react-native/Libraries/WebSocket'

pod 'React-cxxreact', :path => '../node_modules/react-native/ReactCommon/cxxreact'
pod 'React-jscallinvoker', :path => "../node_modules/react-native/ReactCommon/jscallinvoker"
pod 'React-jsi', :path => '../node_modules/react-native/ReactCommon/jsi'
pod 'React-jsiexecutor', :path => '../node_modules/react-native/ReactCommon/jsiexecutor'
pod 'React-jsinspector', :path => '../node_modules/react-native/ReactCommon/jsinspector'
pod 'ReactCommon/jscallinvoker', :path => "../node_modules/react-native/ReactCommon"
pod 'ReactCommon/turbomodule/core', :path => "../node_modules/react-native/ReactCommon"
pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga'

Expand Down

0 comments on commit c1b0f39

Please sign in to comment.