[ ] I am removing an existing difference between facebook/react-native and microsoft/react-native-macos :thumbsup:
[ ] I am cherry-picking a change from Facebook's react-native into microsoft/react-native-macos :thumbsup:
[x] I am making a fix / change for the macOS implementation of react-native
[ ] I am making a change required for Microsoft usage of react-native
Summary:
Intermittently, I will get the following error in various React Native macOS projects:
.../Pods/Headers/Public/ReactCommon/react/bridging/Base.h:13:10 'butter/function.h' file not found
This doesn't happen in RNTester, and doesn't seem to reproduce in CI pipelines building the same projects. My theory is because our 0.72-stable has a lot of cherry-picked fabric related changes from 0.73 that might cause the issue, and/or RN-Tester sets some compiler flag that downstream projects don't. Regardless, it's enough of an annoyance that I want to fix it.
Please select one of the following
Summary:
Intermittently, I will get the following error in various React Native macOS projects:
This doesn't happen in RNTester, and doesn't seem to reproduce in CI pipelines building the same projects. My theory is because our
0.72-stable
has a lot of cherry-picked fabric related changes from0.73
that might cause the issue, and/or RN-Tester sets some compiler flag that downstream projects don't. Regardless, it's enough of an annoyance that I want to fix it.Butter is a cpp "shim" layer that lets you replace uses of
Function
in libraries like Folly with your own (example,Mso::Functor
). See the commit that introducesbutter/function
: https://github.com/facebook/react-native/commit/6c315de2260318134ebfbe84aac65ae08085c198However, it seems over time two things have happened:
butter
shim layer with the c++ standard library.To both of those points, see https://github.com/facebook/react-native/commit/4d85e112a33518f64f7d76c904884ba5abc2587b. This change was introduced in
0.73
+, and I am cherry-picking it down to0.72
for our fork.Changelog:
[GENERAL] [FIXED] - Remove uses of
butter/function.h
Test Plan:
CI should pass.