Skip to content

Include utils umbrella from renderer CSS headers - #58789

Open
coado wants to merge 8 commits into
react:mainfrom
coado:export-D122337018
Open

coado wants to merge 8 commits into
react:mainfrom
coado:export-D122337018

Conversation

@coado

@coado coado commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

Summary:
The renderer CSS headers are framework-tier APIs, but several of them included fine-grained public react/utils/* headers directly. Those headers are guarded by the public umbrella guard, so a strict consumer that includes a CSS header without first including <React/Utils.h> hit a hard error even after acknowledging framework-tier usage with RN_ALLOW_FRAMEWORKS.

Include <React/Utils.h> from the affected CSS headers instead of the fine-grained utils headers, matching how other exported headers reach public modules. Export the utils dependency from the CSS Buck target, since utils is now part of the CSS headers' public interface; CMake and CocoaPods already expose it.

Changelog: [Internal]

Reviewed By: cipolleschi

Differential Revision: D122337018

Dawid Małecki and others added 8 commits October 1, 2026 00:15
Summary:
Declare direct CSS dependencies for renderer targets that consume CSS headers instead of relying on View or Graphics to expose them transitively. Cover Buck, CMake, CocoaPods, and SwiftPM without changing header visibility or runtime behavior.

Changelog: [Internal]

Differential Revision: D119489856
Summary:
Move shared and platform-specific Graphics color-parsing implementations from exported headers into owned source files across generic C++, Android, Apple, and Windows targets. Preserve the existing public entry points and parsing behavior.

Update Buck source selection so default configurations link the generic C++ parser, and keep the React Native macOS and Windows mirrors synchronized.

Changelog: [Internal]

Differential Revision: D119500849
Summary:
Keep the CSS-free color parsing helpers (`parsePlatformColorFn`, `fromRawValueShared`, and `parsePlatformColor`) in the public Graphics API so the platform `fromRawValue` wrappers remain inline. Move `hashGetColourArguments` and `configurePlatformColorCacheInvalidationHook` into private implementation scope.

Stop exporting CSS, fbjni, and the Android cache library from the Buck target, and express implementation-only dependencies privately in Buck and CMake. The retained shared helper header depends only on `RawValue`, `Color`, and `ContextContainer`; CSS parsing headers remain confined to the implementation file.

Regenerate C++ API snapshots to remove the private hash and cache declarations while retaining the public color parser helpers and inline `fromRawValue` entry point.

Changelog: [Internal]

Differential Revision: D119500886
Summary:
Move View CSS parsing implementation details for color and length coercion, box shadows, and filters from exported headers into compiled source files. Keep only the supported `coerceColor`, `coerceLength`, and `fromRawValue` declarations in public headers while preserving existing parsing behavior.

Update existing conversion tests to exercise the same paths through the public entry points, and regenerate the C++ API snapshots to remove private helper declarations.

Changelog: [Internal]

Differential Revision: D119507169
Summary:
Move CSS-dependent View conversion implementations for Yoga lengths, value units, transforms, transform origins, and aspect ratios from the exported `conversions.h` header into `conversions.cpp`. Keep the supported conversion declarations public and preserve existing parsing behavior.

Update existing conversion tests to exercise the same paths through supported public entry points, and regenerate the C++ API snapshots to remove private helper declarations.

Changelog: [Internal]

Differential Revision: D119507215
Summary:
Reclassify the CSS-dependent View conversion headers as private implementation details:

- `BackgroundImagePropsConversions.h`
- `BoxShadowPropsConversions.h`
- `CSSConversions.h`
- `FilterPropsConversions.h`
- `propsConversions.h`

These headers now use the private guard and are removed from the `<React/View.h>` umbrella, along with `conversions.h` and `accessibilityPropsConversions.h`. `LayoutConformanceProps.h` now includes the public `conversions.h` and core `propsConversions.h` instead of the private View `propsConversions.h`, so the umbrella stays self-contained under the strict API.

Following the Graphics module, renderer CSS becomes an implementation dependency of View in Buck instead of an exported one. Header publishing in Buck, CocoaPods, SwiftPM, and Gradle prefab is unchanged, consistent with other private headers, and the C++ API snapshots are unchanged.

Changelog: [Internal]

Differential Revision: D119970889
Summary:
Reclassify the renderer CSS headers (`react/renderer/css/*.h`) as framework-tier APIs by switching them from the public umbrella guard to the for-frameworks guard. Framework integrations keep access to the fine-grained headers and acknowledge that usage by defining `RN_ALLOW_FRAMEWORKS`.

Remove the `React/CSS.h` umbrella, which has no consumers, and stop publishing it from Buck, CocoaPods, Android prefab, the iOS prebuild header config, and the iOS prebuild header linking step.

Changelog: [Internal]

Differential Revision: D119642784
Summary:
The renderer CSS headers are framework-tier APIs, but several of them included fine-grained public `react/utils/*` headers directly. Those headers are guarded by the public umbrella guard, so a strict consumer that includes a CSS header without first including `<React/Utils.h>` hit a hard error even after acknowledging framework-tier usage with `RN_ALLOW_FRAMEWORKS`.

Include `<React/Utils.h>` from the affected CSS headers instead of the fine-grained utils headers, matching how other exported headers reach public modules. Export the utils dependency from the CSS Buck target, since utils is now part of the CSS headers' public interface; CMake and CocoaPods already expose it.

Changelog: [Internal]

Reviewed By: cipolleschi

Differential Revision: D122337018
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Oct 1, 2026
@facebook-github-tools facebook-github-tools Bot added p: Software Mansion Partner: Software Mansion Partner p: Facebook Partner: Facebook labels Oct 1, 2026
@meta-codesync

meta-codesync Bot commented Oct 1, 2026

Copy link
Copy Markdown

@coado has exported this pull request. If you are a Meta employee, you can view the originating Diff in D122337018.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. meta-exported p: Facebook Partner: Facebook p: Software Mansion Partner: Software Mansion Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant