From abb4590285bd92bf4e6367a3ccef12137b4a75b6 Mon Sep 17 00:00:00 2001 From: Marc Horowitz Date: Mon, 11 Nov 2019 18:29:51 -0800 Subject: [PATCH] Address folly and flipper version skew Summary: There's some incompatibilities which need to be fixed for real, but this is a temporary fix to make the build work again. Changelog: [Internal] Reviewed By: willholen Differential Revision: D18364011 fbshipit-source-id: c168e6496a504f9b00da0b9d758c50e2c6f314a4 --- ReactCommon/hermes/inspector/Android.mk | 2 +- ReactCommon/hermes/inspector/Inspector.cpp | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/ReactCommon/hermes/inspector/Android.mk b/ReactCommon/hermes/inspector/Android.mk index a4e66a5076..63180c279f 100644 --- a/ReactCommon/hermes/inspector/Android.mk +++ b/ReactCommon/hermes/inspector/Android.mk @@ -15,7 +15,7 @@ LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/*.cpp $(LOCAL_PATH)/detail/*.cpp $(L LOCAL_C_ROOT := $(LOCAL_PATH)/../.. -LOCAL_CFLAGS := -DHERMES_ENABLE_DEBUGGER=1 +LOCAL_CFLAGS := -DHERMES_ENABLE_DEBUGGER=1 -DHERMES_INSPECTOR_FOLLY_KLUDGE=1 LOCAL_C_INCLUDES := $(LOCAL_C_ROOT) $(REACT_NATIVE)/ReactCommon/jsi $(call find-node-module,$(LOCAL_PATH),hermes-engine)/android/include LOCAL_EXPORT_C_INCLUDES := $(LOCAL_C_ROOT) diff --git a/ReactCommon/hermes/inspector/Inspector.cpp b/ReactCommon/hermes/inspector/Inspector.cpp index 17edcce04e..d61b8a6d04 100644 --- a/ReactCommon/hermes/inspector/Inspector.cpp +++ b/ReactCommon/hermes/inspector/Inspector.cpp @@ -16,12 +16,13 @@ #include #include +#ifdef HERMES_INSPECTOR_FOLLY_KLUDGE // This is here, instead of linking against // folly/futures/Future.cpp, to avoid pulling in another pile of // dependencies, including the separate dependency libevent. This is // likely specific to the version of folly RN uses, so may need to be // changed. Even better, perhaps folly can be refactored to simplify -// this. +// this. Providing a RN-specific Timekeeper impl may also help. template class folly::Future; template class folly::Future; @@ -29,7 +30,7 @@ template class folly::Future; namespace folly { namespace futures { -Future sleep(Duration dur, Timekeeper *tk) { +Future sleep(Duration, Timekeeper *) { LOG(FATAL) << "folly::futures::sleep() not implemented"; } @@ -45,6 +46,7 @@ std::shared_ptr getTimekeeperSingleton() { } // namespace folly // +#endif namespace facebook { namespace hermes {