-
Notifications
You must be signed in to change notification settings - Fork 24.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Codegen 104] Add getResolvedTypeAnnotation
to Parsers
#37373
Conversation
getResolvedTypeAnnotation
to ParsersgetResolvedTypeAnnotation
to Parsers
Base commit: d8ced6f |
Tests fail with :
When i look at usage of Seems similar to the cyclic dependency described over here : #37043 (comment) |
So the chain of call seems like this : |
@cipolleschi : just sharing my debugging notes here for now, do share your perspective as well when you get a chance, I'd appreciate your insights on this one as well 🙏🏻 |
uhm... your notes make sense... 🤔 |
I can pause on this one for now and maybe pick another one up. |
99c9c97
to
0bd3f47
Compare
I figured out the issue I also had to make changes in |
That's cool! Thank you so much for doing this! |
/rebase |
0bd3f47
to
0b9544c
Compare
@cipolleschi has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
@cipolleschi merged this pull request in e09d585. |
Hi @cipolleschi, I think that pull requests for 105, 106, and 107 were merged after 104. As a result, we now have some duplicate code, resolveTypeAnnotation function for example. |
uhm... I see. I created the stack using the ordinal numbers, so the 104 was at the bottom of the stack, and then I applied all the other changes. :( Probably this was the results of a badly handled git commit resolution. This should fix the problem: #37477 Is there any other duplicated code? |
|
Summary:
[Codegen 104] This PR introduces
getResolvedTypeAnnotation
to the Parser class and implements this function in Typescript and Flow Parsers.We also get rid of usages
resolveTypeAnnotation
from :packages/react-native-codegen/src/parsers/typescript/utils.js
packages/react-native-codegen/src/parsers/flow/utils.js
and replace it with
parsers.getResolvedTypeAnnotation
as requested on #34872Changelog:
[Internal] [Changed] - Add
getResolvedTypeAnnotation
to Parsers and update usages.Test Plan:
Run yarn jest react-native-codegen and ensure CI is green