Skip to content

Clean up Image public header dependencies (#58760) - #58760

Open
coado wants to merge 3 commits into
react:mainfrom
coado:export-D122534476
Open

coado wants to merge 3 commits into
react:mainfrom
coado:export-D122534476

Conversation

@coado

@coado coado commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Summary:

Keep the Image component's exported headers self-contained and free of implementation-only dependencies.

  • Move the ImageSource and ImageResizeMode fromRawValue/toString implementations from conversions.h into a new conversions.cpp. The header now only declares them, so it no longer exports glog/logging.h and react_native_expect.h. Every consumer of conversions.h (Image props, text input props, and generated component props) already links the Image library in Buck, CocoaPods, and CMake.
  • Drop the unused Android-only MapBuffer.h and MapBufferBuilder.h includes from ImageState.h; nothing in the Image module uses MapBuffer.
  • Declare standard-library dependencies directly in the Image headers (<memory>, <utility>, <optional>, <string>, <cstdint>).

Changelog: [Internal]

Reviewed By: cipolleschi

Differential Revision: D122534476

@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 Sep 30, 2026
@facebook-github-tools facebook-github-tools Bot added p: Software Mansion Partner: Software Mansion Partner labels Sep 30, 2026
@meta-codesync

meta-codesync Bot commented Sep 30, 2026

Copy link
Copy Markdown

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

@facebook-github-tools facebook-github-tools Bot added the p: Facebook Partner: Facebook label Sep 30, 2026
@meta-codesync meta-codesync Bot changed the title Clean up Image public header dependencies Clean up Image public header dependencies (#58760) Oct 1, 2026
coado added a commit to coado/react-native that referenced this pull request Oct 1, 2026
Summary:

Keep the Image component's exported headers self-contained and free of implementation-only dependencies.

- Move the `ImageSource` and `ImageResizeMode` `fromRawValue`/`toString` implementations from `conversions.h` into a new `conversions.cpp`. The header now only declares them, so it no longer exports `glog/logging.h` and `react_native_expect.h`. Every consumer of `conversions.h` (Image props, text input props, and generated component props) already links the Image library in Buck, CocoaPods, and CMake.
- Drop the unused Android-only `MapBuffer.h` and `MapBufferBuilder.h` includes from `ImageState.h`; nothing in the Image module uses MapBuffer.
- Declare standard-library dependencies directly in the Image headers (`<memory>`, `<utility>`, `<optional>`, `<string>`, `<cstdint>`).

Changelog: [Internal]

Reviewed By: cipolleschi

Differential Revision: D122534476
@coado
coado force-pushed the export-D122534476 branch from 2faef5e to 0dc4a59 Compare October 1, 2026 08:33
coado added a commit to coado/react-native that referenced this pull request Oct 1, 2026
Summary:
Pull Request resolved: react#58760

Keep the Image component's exported headers self-contained and free of implementation-only dependencies.

- Move the `ImageSource` and `ImageResizeMode` `fromRawValue`/`toString` implementations from `conversions.h` into a new `conversions.cpp`. The header now only declares them, so it no longer exports `glog/logging.h` and `react_native_expect.h`. Every consumer of `conversions.h` (Image props, text input props, and generated component props) already links the Image library in Buck, CocoaPods, and CMake.
- Drop the unused Android-only `MapBuffer.h` and `MapBufferBuilder.h` includes from `ImageState.h`; nothing in the Image module uses MapBuffer.
- Declare standard-library dependencies directly in the Image headers (`<memory>`, `<utility>`, `<optional>`, `<string>`, `<cstdint>`).

Changelog: [Internal]

Reviewed By: cipolleschi

Differential Revision: D122534476
@coado
coado force-pushed the export-D122534476 branch from 0dc4a59 to f13f1d4 Compare October 1, 2026 08:36
coado added a commit to coado/react-native that referenced this pull request Oct 1, 2026
Summary:

Keep the Image component's exported headers self-contained and free of implementation-only dependencies.

- Move the `ImageSource` and `ImageResizeMode` `fromRawValue`/`toString` implementations from `conversions.h` into a new `conversions.cpp`. The header now only declares them, so it no longer exports `glog/logging.h` and `react_native_expect.h`. Every consumer of `conversions.h` (Image props, text input props, and generated component props) already links the Image library in Buck, CocoaPods, and CMake.
- Drop the unused Android-only `MapBuffer.h` and `MapBufferBuilder.h` includes from `ImageState.h`; nothing in the Image module uses MapBuffer.
- Declare standard-library dependencies directly in the Image headers (`<memory>`, `<utility>`, `<optional>`, `<string>`, `<cstdint>`).

Changelog: [Internal]

Reviewed By: cipolleschi

Differential Revision: D122534476
@coado
coado force-pushed the export-D122534476 branch from f13f1d4 to 83416f5 Compare October 1, 2026 10:58
coado added a commit to coado/react-native that referenced this pull request Oct 1, 2026
Summary:
Pull Request resolved: react#58760

Keep the Image component's exported headers self-contained and free of implementation-only dependencies.

- Move the `ImageSource` and `ImageResizeMode` `fromRawValue`/`toString` implementations from `conversions.h` into a new `conversions.cpp`. The header now only declares them, so it no longer exports `glog/logging.h` and `react_native_expect.h`. Every consumer of `conversions.h` (Image props, text input props, and generated component props) already links the Image library in Buck, CocoaPods, and CMake.
- Drop the unused Android-only `MapBuffer.h` and `MapBufferBuilder.h` includes from `ImageState.h`; nothing in the Image module uses MapBuffer.
- Declare standard-library dependencies directly in the Image headers (`<memory>`, `<utility>`, `<optional>`, `<string>`, `<cstdint>`).

Changelog: [Internal]

Reviewed By: cipolleschi

Differential Revision: D122534476
@coado
coado force-pushed the export-D122534476 branch from 83416f5 to ffe5ea0 Compare October 1, 2026 11:02
Dawid Małecki added 2 commits October 1, 2026 08:28
Summary:
Migrate React-Fabric attributedstring headers to consume stable Debug, FeatureFlags, CSS, Graphics, MapBuffer, RendererCore, Utils, and View umbrellas instead of guarded leaf headers. Add the direct Buck and CocoaPods dependencies required by those public imports.

Avoid RendererDebug.h because its current utility-template export changes downstream overload lookup; RendererCore already provides the debug declaration types used by attributedstring.

Changelog: [Internal]

Differential Revision: D121793359
Summary:
The public `react/renderer/imagemanager/primitives.h` header included the private `react/renderer/debug/debugStringConvertibleUtils.h` for the inline body of `ImageSource::getDebugProps()`. Because the include was unconditional, any strict consumer of `<React/ImageManager.h>` or `<React/Image.h>` (which reaches `primitives.h` through the Image event emitter) hit the private header guard and failed to compile.

Include the public `DebugStringConvertible.h` and `flags.h` headers instead, which provide `SharedDebugStringConvertibleList` and `RN_DEBUG_STRING_CONVERTIBLE`, and keep only the `getDebugProps()` declaration in the header under the existing `RN_DEBUG_STRING_CONVERTIBLE` guard. Move its unchanged implementation into a new `primitives.cpp`, the only place that needs the private debug helpers. Buck, CMake, and CocoaPods already compile every `imagemanager/*.cpp`, so no build-file changes are needed.

Changelog: [Internal]

Differential Revision: D122534446
coado added a commit to coado/react-native that referenced this pull request Oct 1, 2026
Summary:

Keep the Image component's exported headers self-contained and free of implementation-only dependencies.

- Move the `ImageSource` and `ImageResizeMode` `fromRawValue`/`toString` implementations from `conversions.h` into a new `conversions.cpp`. The header now only declares them, so it no longer exports `glog/logging.h` and `react_native_expect.h`. Every consumer of `conversions.h` (Image props, text input props, and generated component props) already links the Image library in Buck, CocoaPods, and CMake.
- Drop the unused Android-only `MapBuffer.h` and `MapBufferBuilder.h` includes from `ImageState.h`; nothing in the Image module uses MapBuffer.
- Declare standard-library dependencies directly in the Image headers (`<memory>`, `<utility>`, `<optional>`, `<string>`, `<cstdint>`).

Changelog: [Internal]

Reviewed By: cipolleschi

Differential Revision: D122534476
@coado
coado force-pushed the export-D122534476 branch from ffe5ea0 to 987b3ed Compare October 1, 2026 15:39
Summary:
Pull Request resolved: react#58760

Keep the Image component's exported headers self-contained and free of implementation-only dependencies.

- Move the `ImageSource` and `ImageResizeMode` `fromRawValue`/`toString` implementations from `conversions.h` into a new `conversions.cpp`. The header now only declares them, so it no longer exports `glog/logging.h` and `react_native_expect.h`. Every consumer of `conversions.h` (Image props, text input props, and generated component props) already links the Image library in Buck, CocoaPods, and CMake.
- Drop the unused Android-only `MapBuffer.h` and `MapBufferBuilder.h` includes from `ImageState.h`; nothing in the Image module uses MapBuffer.
- Declare standard-library dependencies directly in the Image headers (`<memory>`, `<utility>`, `<optional>`, `<string>`, `<cstdint>`).

Changelog: [Internal]

Reviewed By: cipolleschi

Differential Revision: D122534476
@coado
coado force-pushed the export-D122534476 branch from 987b3ed to 3c468a0 Compare October 1, 2026 15:50

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