Skip to content

Conversation

@war-in
Copy link
Collaborator

@war-in war-in commented Sep 25, 2025

Details

MarkdownTextInputDecoratorShadowNode.cpp has layout method which first check if there is only one child returned from getChildren

const auto &children = getChildren();
  react_native_assert(
      children.size() == 1 &&
      "MarkdownTextInputDecoratorView didn't receive exactly one child");

and then gets the children again to extract the child

auto child = std::static_pointer_cast<const YogaLayoutableShadowNode>(getChildren()[0]);

While I'm migrating Expensify/App to React Native 0.81 I stepped upon this error, which caused adhoc build to crash

[14:24:49]: ▸ C/C++: /home/runner/work/App/App/node_modules/@expensify/react-native-live-markdown/android/src/main/new_arch/react/renderer/components/RNLiveMarkdownSpec/MarkdownTextInputDecoratorShadowNode.cpp:164:15: error: unused variable 'children' [-Werror,-Wunused-variable]
[14:24:49]: ▸ C/C++:   164 |   const auto &children = getChildren();
[14:24:49]: ▸ C/C++:       |               ^~~~~~~~
[14:24:49]: ▸ C/C++: 1 error generated.

Removing the second getChildren call and replacing it with the children variable fixed the issue

Related Issues

n/a

Manual Tests

Running the release build of the example app would be the best but I got Connect timed out from sonatype 🤷
I'll bump the live-markdown to this commit in E/App and link the working adhoc as proof
Adhoc build: Expensify/App#69535 (comment)

Linked PRs

Expensify/App#69535

@war-in war-in marked this pull request as ready for review September 26, 2025 07:57
@war-in war-in requested a review from j-piasecki September 26, 2025 07:58
@war-in war-in merged commit 083fa48 into Expensify:main Sep 26, 2025
4 checks passed
@os-botify
Copy link
Contributor

os-botify bot commented Sep 26, 2025

🚀 Published to npm in 0.1.306 🎉

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