[iOS] a problem with codegen?
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 127k
- Forks
- 25.3k
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 4
Description
Description
Hey folks, will you please have a brief look at the issue I've created in creact-react-native-library repo: https://github.com/callstack/react-native-builder-bob/issues/755 (not sure whether that issue belongs there, or to the RN repo, as it seems to be caused by Codegen outputs).
Essentially, I am trying to upgrade my fork of react-native-fs to RN@0.77, on the way resetting the library scaffolding to the one generated by the latest version of the create-react-native-library generator. The upgraded code is here: https://github.com/birdofpreyru/react-native-fs/tree/dev-v2.31. I'm trying to build its Example App then, and it fails at the linking step, due to a clash between the same-named objects (like RCTAppDependencyProvider) present both in files generated by the codegen for the library itself, and for smth else.
I have confirmed that builds passes fine and the app works, if I just comment out the content of involved .mm files generated under ios/generated folder (relative to the repo's root); but I have no idea what is the root cause of the problem? Is it a bug inside the Codegen generating for the library some files it is not supposed to generate for it? Is it some mistake in my lib's configuration causing that Codegen behavior? Have I messed-up any other config in the project? Is it a problem with the project template used by creact-react-native-library (same problem happens with the new Turbo Module lib project generated by create-react-native-library, without any other modifications)?
I guess, it is very easy issue to narrow down for anybody who knows how exactly Codegen is supposed to behave here :) (thus, not for me 😅 )
Steps to reproduce
N/A
React Native Version
0.77.0
Affected Platforms
Build - MacOS
Areas
Codegen
Output of npx react-native info
N/A
Stacktrace or Logs
N/A
Reproducer
N/A
Screenshots and Videos
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked react-native-builder-bob issue and the react-native-fs dev-v2.31 branch, then inspect the generated .mm files under ios/generated and the RN 0.77 library configuration. Reproduce the Example App linking failure and compare the generated outputs involved. Done means identifying whether the duplicate objects come from Codegen or project configuration and documenting a concrete correction.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react-native
- Domain
- build-system, mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100