Skip to content

fix(android): include the slot's generated shadow node by its codegen path - #1087

Merged
hryhoriiK97 merged 1 commit into
software-mansion:mainfrom
pingdotgg:fix/android-shadow-nodes-include
Oct 26, 2026
Merged

hryhoriiK97 merged 1 commit into
software-mansion:mainfrom
pingdotgg:fix/android-shadow-nodes-include

Conversation

@juliusmarminge

Copy link
Copy Markdown
Contributor

What/Why?

The custom ComponentDescriptors.h from #1027 includes the generated header by its bare name, #include "ShadowNodes.h". The app's autolinking.cpp compiles with every library's codegen directory on the include path. Several libraries generate their own ShadowNodes.h, so whichever comes first wins. In T3 Code that is @react-native-async-storage/async-storage's, and the build fails:

ComponentDescriptors.h:18:82: error: unknown type name 'EnrichedMarkdownBlockSlotShadowNode'; did you mean 'EnrichedMarkdownBlockSlotProps'?

The library's other headers already include generated files by their codegen path. This includes ShadowNodes.h the same way: <react/renderer/components/EnrichedMarkdownTextSpec/ShadowNodes.h>.

Testing

  • T3 Code's Android app, which lists async-storage and react-native-menu before Enriched on the include path, fails to build on main with the error above and builds with this change.
  • clang-format is clean.

PR Checklist

  • Code compiles and runs on iOS, no iOS change
  • Code compiles and runs on Android
  • Updated documentation/README if applicable, not applicable
  • Ran example app to verify changes, verified in a downstream app
  • E2E tests are passing, not run
  • Required E2E tests have been added (if applicable)

Model: Claude Opus 5.5. Harness: Claude Code in T3 Code.

… path

ComponentDescriptors.h included "ShadowNodes.h" by its bare name, so in an app whose include path lists another codegen library first (async-storage, react-native-menu and others ship a ShadowNodes.h too) autolinking.cpp found that library's header and failed: unknown type name 'EnrichedMarkdownBlockSlotShadowNode'. The other headers already use the react/renderer/components/EnrichedMarkdownTextSpec/ path.
@hryhoriiK97
hryhoriiK97 merged commit 32f6f0c into software-mansion:main Oct 26, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants