From e6cf603406d9d7fc852d17f692d41c1f127b1048 Mon Sep 17 00:00:00 2001 From: Samuel Susla Date: Fri, 10 Jan 2025 09:07:43 -0800 Subject: [PATCH] isolate use of folly to interpolateViewProps on Android (#48556) Summary: changelog: [react-native] the only place in view module that uses folly is `ViewPropsInterpolation.h` and that is only on Android. This diff makes that dependency explicit and make it android only. Differential Revision: D67942951 --- .../react/renderer/components/view/ViewPropsInterpolation.h | 4 ++++ .../ReactCommon/react/renderer/components/view/conversions.h | 2 -- .../react-native/ReactCommon/react/renderer/core/Props.cpp | 1 - packages/react-native/ReactCommon/react/renderer/core/Props.h | 3 +-- .../ReactCommon/react/renderer/core/RawPropsPrimitives.h | 1 + 5 files changed, 6 insertions(+), 5 deletions(-) diff --git a/packages/react-native/ReactCommon/react/renderer/components/view/ViewPropsInterpolation.h b/packages/react-native/ReactCommon/react/renderer/components/view/ViewPropsInterpolation.h index 1aec3ac18ac975..c9ad50ca5b8b5a 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/view/ViewPropsInterpolation.h +++ b/packages/react-native/ReactCommon/react/renderer/components/view/ViewPropsInterpolation.h @@ -10,6 +10,10 @@ #include #include +#ifdef ANDROID +#include +#endif + namespace facebook::react { /** diff --git a/packages/react-native/ReactCommon/react/renderer/components/view/conversions.h b/packages/react-native/ReactCommon/react/renderer/components/view/conversions.h index c782e566ca2200..0346768907beb5 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/view/conversions.h +++ b/packages/react-native/ReactCommon/react/renderer/components/view/conversions.h @@ -7,8 +7,6 @@ #pragma once -#include -#include #include #include #include diff --git a/packages/react-native/ReactCommon/react/renderer/core/Props.cpp b/packages/react-native/ReactCommon/react/renderer/core/Props.cpp index d88ecf3cea04e8..a8bd7079d47289 100644 --- a/packages/react-native/ReactCommon/react/renderer/core/Props.cpp +++ b/packages/react-native/ReactCommon/react/renderer/core/Props.cpp @@ -7,7 +7,6 @@ #include "Props.h" -#include #include #include diff --git a/packages/react-native/ReactCommon/react/renderer/core/Props.h b/packages/react-native/ReactCommon/react/renderer/core/Props.h index 0270121a953e11..0905361fbc4cf7 100644 --- a/packages/react-native/ReactCommon/react/renderer/core/Props.h +++ b/packages/react-native/ReactCommon/react/renderer/core/Props.h @@ -7,8 +7,6 @@ #pragma once -#include - #include #include #include @@ -17,6 +15,7 @@ #include #ifdef ANDROID +#include #include #endif diff --git a/packages/react-native/ReactCommon/react/renderer/core/RawPropsPrimitives.h b/packages/react-native/ReactCommon/react/renderer/core/RawPropsPrimitives.h index cc781682b1b850..e2a9f6714cbf9a 100644 --- a/packages/react-native/ReactCommon/react/renderer/core/RawPropsPrimitives.h +++ b/packages/react-native/ReactCommon/react/renderer/core/RawPropsPrimitives.h @@ -7,6 +7,7 @@ #pragma once +#include #include namespace facebook::react {