Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
/*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

#pragma once

// =============================================================================
// Umbrella header for the `rawValue` module - public entry point.
//
// #include <React/RawValue.h>
//
// `rawValue` is the slice of `react/renderer/core` that `react/renderer/graphics`
// depends on. It is built as its own target so the two modules do not form a
// dependency cycle; <React/RendererCore.h> re-exports it, so consumers that want
// the whole renderer core still only need that one umbrella.
//
// Re-exports the module's public interface headers. React Native's own code
// should keep using the fine-grained `<react/renderer/core/...>` includes,
// except in headers it exports to consumers: those are preprocessed in the
// consumer's translation unit, where the fine-grained include hits this
// module's <react/cxxstableapi/UmbrellaGuard.h>. `RN_ALLOW_FRAMEWORKS` does not
// suppress that guard, so a "for frameworks" header must reach this module
// through the umbrella.
// =============================================================================

// Marks that the following headers are pulled in through the umbrella, so their
// shared guard (<react/cxxstableapi/UmbrellaGuard.h>) accepts them. The marker
// is saved and restored rather than defined and undefined: the scope ends at
// this block, so a later *direct* include of a guarded header the umbrella did
// not already pull in is still caught, and it nests inside an enclosing
// umbrella rather than disarming it. The headers below are `#pragma once`, so
// re-including one of them directly is a silent no-op, not a guard hit.
#pragma push_macro("RN_UMBRELLA_CONTEXT")
#undef RN_UMBRELLA_CONTEXT
#define RN_UMBRELLA_CONTEXT 1

#include <react/renderer/core/RawPropsPrimitives.h>
#include <react/renderer/core/RawValue.h>

#undef RN_UMBRELLA_CONTEXT
#pragma pop_macro("RN_UMBRELLA_CONTEXT")
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
//
// #include <React/RendererCore.h>
//
// Re-exports the module's public interface headers. React Native's own code
// Re-exports the module's public interface headers, including those of the
// `rawValue` target via <React/RawValue.h>. React Native's own code
// should keep using the fine-grained `<react/renderer/core/...>` includes,
// except in headers it exports to consumers: those are preprocessed in the
// consumer's translation unit, where the fine-grained include hits this
Expand All @@ -24,12 +25,15 @@
// Marks that the following headers are pulled in through the umbrella, so their
// shared guard (<react/cxxstableapi/UmbrellaGuard.h>) accepts them. The marker
// is saved and restored rather than defined and undefined: the scope ends at
// this block, so later *direct* includes in the same TU are still caught, and
// it nests inside an enclosing umbrella rather than disarming it.
// this block, so a later *direct* include of a guarded header the umbrella did
// not already pull in is still caught, and it nests inside an enclosing
// umbrella rather than disarming it. The headers below are `#pragma once`, so
// re-including one of them directly is a silent no-op, not a guard hit.
#pragma push_macro("RN_UMBRELLA_CONTEXT")
#undef RN_UMBRELLA_CONTEXT
#define RN_UMBRELLA_CONTEXT 1

#include <React/RawValue.h>
#include <react/renderer/core/ComponentDescriptor.h>
#include <react/renderer/core/ConcreteComponentDescriptor.h>
#include <react/renderer/core/ConcreteShadowNode.h>
Expand Down Expand Up @@ -61,8 +65,6 @@
#include <react/renderer/core/RawProps.h>
#include <react/renderer/core/RawPropsKeyMap.h>
#include <react/renderer/core/RawPropsParser.h>
#include <react/renderer/core/RawPropsPrimitives.h>
#include <react/renderer/core/RawValue.h>
#include <react/renderer/core/ReactEventPriority.h>
#include <react/renderer/core/ReactPrimitives.h>
#include <react/renderer/core/ReactRootViewTagGenerator.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -246,8 +246,8 @@ of module `React`, closing a cycle:
React -> ReactNativeHeaders_react -> React
```

Found empirically: `react/timing/primitives.h` -> `<React/Debug.h>`. This is
the same two-module-ownership failure as `UMBRELLA_CXX_GUARDED_EXCLUSIONS`
Found empirically: `react/timing/primitives.h` -> `<React/Debug.h>`. This is the
same two-module-ownership failure as `UMBRELLA_CXX_GUARDED_EXCLUSIONS`
(`RCTFrameTimingsObserver.h`, which reaches the same `primitives.h`), in the
opposite direction. They are `objc-blocked` by construction (they re-export
their module's C++ surface), so they were never R4 umbrella or R5 module
Expand Down
Loading