react / react/react-native

[iOS] a problem with codegen?

Ouverte
#48,936 5 commentaires 2 réactions 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

Platform: iOS Resolution: PR Submitted Type: New Architecture
Langage dominant
C++
Étoiles
127k
Forks
25.3k
Merge moyen
1 j 23 h
PR mergées (30 j)
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

Guide de contribution

Ouvrir le guide de contribution

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Piste de recherche

Commencez par l’issue react-native-builder-bob liée et la branche dev-v2.31 de react-native-fs, puis inspectez les fichiers .mm générés sous ios/generated ainsi que la configuration de la bibliothèque RN 0.77. Reproduisez l’échec de linking de Example App et comparez les sorties générées concernées. Le travail est terminé lorsqu’il est établi si les objets en double proviennent de Codegen ou de la configuration du projet, et qu’une correction concrète est documentée.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
react-native
Domaine
build-system, mobile
Type d'issue
Bug
Difficulté
4/5
Temps estimé
3-5 jours
Activité
Calme
Clarté
À clarifier
Accessibilité débutants
25/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.