☂️ Improving Codegen
Problem
Description > Note: The items in this list are eligible for Hacktoberfest (https://hacktoberfest.com/). All the accepted PRs under this umbrella task will be tagged with the hacktoberfest-accepted label, to count toward your score.:tada: Hi everyone! This is an umbrella issue to collect a set of tasks aimed to improve the code in the react-native-codegen package. Codegen is a pillar for the New Architecture and is part of the core developer experience. We believe that everyone would benefit from a clear and maintainable codebase, hence this umbrella issue to help us cleanup and restructure some of its components. The codegen internals Codegen work with a 2-steps process: 1. It parses a set of JS-based specifications and it creates a JSON Schema. 2. Starting from the Schema, it generates a set of Native files in various languages: Java, Objective-C++ and C++. Codegen package is divided in three high-level folders: 1. cli => it contains a set of scripts to use the Codegen from a Command Line Interface. 2. generators => it contains a set of file which generate the final code. 3. parsers => it contains a set of files to parse Flow and TypeScript specifications. The first step of this imrpovement effort will focus on the Parsers. Parsers The parsers folders contains subfolders to parse Flow and TypeScript specs. The two folders have a very similar structure: a components folder, where there is the logic to parse Native Components specs a modules folder, where there i
Error Output
error is thrown at lines `132`, `141` and `150` in both Flow and TypeScript parsers.~
Unverified for your environment
Select your OS to check compatibility.
1 Fix
Solution: ☂️ Improving Codegen
Hi @cipolleschi I would like to help with the `Extract the error.js file from the flow and typescript folders into an error.js file in their parent folder. Then, have the two parsers use the same ParserError` task
Trust Score
3 verifications
- 1
Hi @cipolleschi I would like to help with the `Extract the error.js file from th
Hi @cipolleschi I would like to help with the `Extract the error.js file from the flow and typescript folders into an error.js file in their parent folder. Then, have the two parsers use the same ParserError` task
Validation
Resolved in facebook/react-native GitHub issue #34872. Community reactions: 2 upvotes.
Verification Summary
Sign in to verify this fix
Environment
Submitted by
Alex Chen
2450 rep