Uh oh!
There was an error while loading. Please reload this page.
[Codegen 94] move extendsForProp into parsers-commons - #37052
Conversation
facebook-github-bot
commented
Apr 23, 2023
Hi @siddarthkay! Thank you for your pull request and welcome to our community. Action RequiredIn order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you. ProcessIn order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks! |
facebook-github-bot
commented
Apr 23, 2023
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks! |
a29ef09 to
e41085eCompare
Base commit: c65ab4d |
siddarthkay
commented
Apr 24, 2023
@cipolleschi : This PR is ready for review. |
facebook-github-bot
commented
Apr 24, 2023
@rshest has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
cipolleschi
left a comment
There was a problem hiding this comment.
Hi @siddarthkay, thank you so much for taking the time to work on this!
I left some comments to improve the current implementation, following a pattern we have established in other Codegen tasks.
Let me know if it is clear and/or if you need help! :D
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
9d48729 to
0b4455aComparesiddarthkay
commented
Apr 24, 2023
Hi @cipolleschi : I've addressed your feedback and I also took the liberty of removing Let me know :) |
facebook-github-bot
commented
Apr 24, 2023
@rshest has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
cipolleschi
left a comment
There was a problem hiding this comment.
Good! :D Thanks for the changes!
1af6089 to
301ac6dCompareca8f170 to
40f63b1Comparesiddarthkay
commented
Apr 25, 2023
Hi @cipolleschi : I've rebased my branch and resolved all conflicts, |
rshest
commented
Apr 25, 2023
Hey @siddarthkay, sorry for back and forth, but this change severely conflicts with #36891, which has been now merged to master (it merges together Could you please rebase this PR to master and try and resolve the merge conflicts? Thanks!!! |
rshest
left a comment
There was a problem hiding this comment.
Please see my comment above, this requires a rebase to master and merge/resolve conflicts.
siddarthkay
commented
Apr 25, 2023
Hi @rshest : I think I already resolved those conflicts few hours ago, I have just now rebased to latest |
facebook-github-bot
commented
Apr 25, 2023
@rshest has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
I see Should I rerun this job on CircleCI : https://app.circleci.com/pipelines/github/facebook/react-native/22620/workflows/be7cfad0-d96d-4c5c-b552-5006294413ff/jobs/580151 ? |
Pranav-yadav
commented
Apr 25, 2023
@siddarthkay as the error says: PS. Reviewer(s) will re-rerun it if required. |
siddarthkay
commented
Apr 26, 2023
Hi @Pranav-yadav Thanks for explaining! |
| ): ExtendsForProp { | ||
| if (!prop.argument) { | ||
| const argument = parser.argumentForProp(prop); | ||
| if (argument) { |
There was a problem hiding this comment.
This now does exactly the opposite of what it used/supposed to do :)
It should instead be:
if (!argument) {
Otherwise this would break codegen completely, at least on our internal tests.
I am surprised, though, that CI on Github didn't catch this (the only failed test seems inside the app template and is unrelated).
I think we need a follow-up on that, CC @cipolleschi
@siddarthkay - note that I fixed this internally myself this time, to save one extra back and forth, but normally that would be your responsibility :)
There was a problem hiding this comment.
Thanks @rshest ! This is probably the outcome of resolving multiple rebase conflicts. Thanks for catching and fixing it ❤️
There was a problem hiding this comment.
I am surprised, though, that CI on Github didn't catch this (the only failed test seems inside the app template and is unrelated).
I think, those files don't have tests, but, other tests should have been failed; or may be the current test-suite doesn't test this specific case 🤔
Summary:
[Codegen 94] This PR attempts to extracts the logic of
extendsForPropfunction from the following locations :parsers/flow/components/extends.jsparsers/typescript/components/props.jssince they are the same and move the function to
parsers/parsers-commons.jsas requested on ☂️ Improving Codegen #34872Changelog:
[Internal] [Changed] - Move
extendsForPropto parser-commons and update usages.Test Plan:
Run
yarn jest react-native-codegenand ensure CI is green