Skip to content

Commit

Permalink
move inspector out of jschelpers
Browse files Browse the repository at this point in the history
Differential Revision: D6385924

fbshipit-source-id: 1913d903077494cc0d86d5a8c8839620f1ecab0c
  • Loading branch information
bnham authored and facebook-github-bot committed Nov 27, 2017
1 parent 850efa8 commit 70c3590
Show file tree
Hide file tree
Showing 13 changed files with 294 additions and 23 deletions.
18 changes: 16 additions & 2 deletions React.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -94,14 +94,21 @@ Pod::Spec.new do |s|
end

s.subspec "jschelpers_legacy" do |ss|
ss.source_files = "ReactCommon/jschelpers/{JavaScriptCore,JSCWrapper,InspectorInterfaces}.{cpp,h}", "ReactCommon/jschelpers/systemJSCWrapper.cpp"
ss.private_header_files = "ReactCommon/jschelpers/{JavaScriptCore,JSCWrapper,InspectorInterfaces}.h"
ss.source_files = "ReactCommon/jschelpers/{JavaScriptCore,JSCWrapper}.{cpp,h}", "ReactCommon/jschelpers/systemJSCWrapper.cpp"
ss.private_header_files = "ReactCommon/jschelpers/{JavaScriptCore,JSCWrapper}.h"
ss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\"" }
ss.framework = "JavaScriptCore"
end

s.subspec "jsinspector_legacy" do |ss|
ss.source_files = "ReactCommon/jsinspector/{InspectorInterfaces}.{cpp,h}"
ss.private_header_files = "ReactCommon/jsinspector/{InspectorInterfaces}.h"
ss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\"" }
end

s.subspec "cxxreact_legacy" do |ss|
ss.dependency "React/jschelpers_legacy"
ss.dependency "React/jsinspector_legacy"
ss.source_files = "ReactCommon/cxxreact/{JSBundleType,oss-compat-util}.{cpp,h}"
ss.private_header_files = "ReactCommon/cxxreact/{JSBundleType,oss-compat-util}.h"
ss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\"" }
Expand All @@ -117,6 +124,12 @@ Pod::Spec.new do |s|
ss.framework = "JavaScriptCore"
end

s.subspec "jsinspector" do |ss|
ss.source_files = "ReactCommon/jsinspector/*.{cpp,h}"
ss.private_header_files = "ReactCommon/jsinspector/*.h"
ss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\"" }
end

s.subspec "PrivateDatabase" do |ss|
ss.source_files = "ReactCommon/privatedata/*.{cpp,h}"
ss.private_header_files = "ReactCommon/privatedata/*.h"
Expand All @@ -125,6 +138,7 @@ Pod::Spec.new do |s|

s.subspec "cxxreact" do |ss|
ss.dependency "React/jschelpers"
ss.dependency "React/jsinspector"
ss.dependency "boost"
ss.dependency "Folly", "2016.09.26.00"
ss.compiler_flags = folly_compiler_flags
Expand Down
2 changes: 1 addition & 1 deletion React/Inspector/RCTInspector.mm
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

#if RCT_DEV

#include <jschelpers/InspectorInterfaces.h>
#include <jschelpers/JavaScriptCore.h>
#include <jsinspector/InspectorInterfaces.h>

#import "RCTDefines.h"
#import "RCTInspectorPackagerConnection.h"
Expand Down
243 changes: 227 additions & 16 deletions React/React.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions ReactAndroid/src/main/jni/packagerconnection/BUCK
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,6 @@ cxx_library(
FBJNI_TARGET,
"xplat//folly:molly",
react_native_xplat_target("jschelpers:jschelpers"),
react_native_xplat_target("jsinspector:jsinspector"),
] + JSC_DEPS) if not IS_OSS_BUILD else [],
)
2 changes: 1 addition & 1 deletion ReactAndroid/src/main/jni/react/jni/JInspector.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

#ifdef WITH_INSPECTOR

#include <jschelpers/InspectorInterfaces.h>
#include <jsinspector/InspectorInterfaces.h>

#include <fb/fbjni.h>
#include <folly/Memory.h>
Expand Down
1 change: 1 addition & 0 deletions ReactCommon/cxxreact/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,5 @@ $(call import-module,folly)
$(call import-module,jsc)
$(call import-module,glog)
$(call import-module,jschelpers)
$(call import-module,jsinspector)
$(call import-module,privatedata)
1 change: 1 addition & 0 deletions ReactCommon/cxxreact/BUCK
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ rn_xplat_cxx_library(
"xplat//fbsystrace:fbsystrace",
"xplat//folly:molly",
react_native_xplat_target("jschelpers:jschelpers"),
react_native_xplat_target("jsinspector:jsinspector"),
react_native_xplat_target("microprofiler:microprofiler"),
] + JSC_DEPS,
)
2 changes: 1 addition & 1 deletion ReactCommon/cxxreact/JSCExecutor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
#include <folly/Memory.h>
#include <folly/String.h>
#include <glog/logging.h>
#include <jschelpers/InspectorInterfaces.h>
#include <jschelpers/JSCHelpers.h>
#include <jschelpers/Value.h>
#include <jsinspector/InspectorInterfaces.h>

#include "JSBigString.h"
#include "JSBundleType.h"
Expand Down
1 change: 0 additions & 1 deletion ReactCommon/jschelpers/BUCK
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
include_defs("//ReactCommon/DEFS")

EXPORTED_HEADERS = [
"InspectorInterfaces.h",
"JavaScriptCore.h",
"JSCHelpers.h",
"JSCWrapper.h",
Expand Down
18 changes: 18 additions & 0 deletions ReactCommon/jsinspector/Android.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)

LOCAL_MODULE := jsinspector

LOCAL_SRC_FILES := \
InspectorInterfaces.cpp

LOCAL_C_INCLUDES := $(LOCAL_PATH)/..
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_C_INCLUDES)

LOCAL_CFLAGS += -Wall -Werror -fexceptions
CXX11_FLAGS := -std=c++11
LOCAL_CFLAGS += $(CXX11_FLAGS)
LOCAL_EXPORT_CPPFLAGS := $(CXX11_FLAGS)

include $(BUILD_SHARED_LIBRARY)
26 changes: 26 additions & 0 deletions ReactCommon/jsinspector/BUCK
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
include_defs("//ReactCommon/DEFS")

EXPORTED_HEADERS = [
"InspectorInterfaces.h",
]

rn_xplat_cxx_library(
name = "jsinspector",
srcs = glob(
["*.cpp"],
),
headers = glob(
["*.h"],
excludes = EXPORTED_HEADERS,
),
header_namespace = "jsinspector",
exported_headers = EXPORTED_HEADERS,
compiler_flags = [
"-Wall",
"-fexceptions",
"-std=c++1y",
],
visibility = [
"PUBLIC",
],
)
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ struct InspectorPage {

class IRemoteConnection : public IDestructible {
public:
__attribute__((visibility("default"))) virtual ~IRemoteConnection() = 0;
virtual ~IRemoteConnection() = 0;
virtual void onMessage(std::string message) = 0;
virtual void onDisconnect() = 0;
};
Expand Down

0 comments on commit 70c3590

Please sign in to comment.