callstack / react-native-builder-bob

👷‍♂️ Simple set of CLIs to scaffold and build React Native libraries for different targets
https://callstack.github.io/react-native-builder-bob/
2.78k stars 184 forks source link

fix: typo in cmakeListsPath for turbo native modules #629

Closed withSang closed 1 month ago

withSang commented 1 month ago

Summary

It fixes #627, as we were having the same issue in our react native project. When opting in Turbo Native Modules or Fabric Views, cmakeListPath in generated react-native.config.js was not consistent with the hierarchy generated by CodeGen. This fix corrects the path as stated by document.

If my fix isn't correct, feel free to correct me. Thank you.

Test plan

withSang commented 1 month ago

In the issue #627, It seems cmakeListsPath should be adjusted from generated/jni/CMakeLists.txt to build/generated/source/codegen/jni/CMakeLists.txt only when it is a local library.

I tried to correct that by editing the template.

withSang commented 1 month ago

Oh, I see I've made formatting error. I've fixed it again. Sorry.

atlj commented 1 month ago

Thanks a ton for sending this! I totally passed the fact we have a local template option. I've made some changes, let's see if CI passes and we can merge this!

atlj commented 1 month ago

Looks like some options fails but this only happens on CI, some specific templates, and looks like this is a known problem in community CLI https://github.com/react-native-community/cli/issues/2498. So this should be good to merge.

withSang commented 1 month ago

Thank you a lot!! Hope you have a nice day! 👍