[Codegen 84] Merge Parse-Module-Name anon fn of Flow & TS parsers'#36297
[Codegen 84] Merge Parse-Module-Name anon fn of Flow & TS parsers'#36297Pranav-yadav wants to merge 7 commits intofacebook:mainfrom
anon fn of Flow & TS parsers'#36297Conversation
Base commit: a49446b |
There was a problem hiding this comment.
@Pranav-yadav, thank you so much and great job!
I left a couple of comments that should be addressed before merging this PR.
Thank you again for the work you are putting into this!
cipolleschi
left a comment
There was a problem hiding this comment.
Let's remove the commented test (see my comment for the why). I'll import and merge the PR.
Thank you for this work!
aaah... Exactly... I've spent hours debugging it (the generated ASTs 😞) and going through the base test cases but they couldn't help as they use fake manually created ASTs and not the actual one created by parser. PS: was going to add counter for "hours wasted here :(", jk Thanks. I'll rm that test. |
1db994a to
aa19750
Compare
cipolleschi
left a comment
There was a problem hiding this comment.
Thank you so much for taking care of this!
|
@cipolleschi has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
|
I see conflicts again... :( Rebasing quickly to fix :) |
- into a common `parseModuleName` fun in the `parsers-commons.js`
- in `parsers-commons-test.js` - related to: [Codegen 84]
…ror` in `parseModuleName` fn
- reason: The problem here is that;
```flow
export default TurboModuleRegistry.getEnforcing('SampleTurboModule');
```
this result in an `UntypedModuleRegistryCallParserError`, because it is "not generic".
The problem is that, to get a type for it, it "must" be a generic.
I can't think of any other way for `getEnforcing` to be typed with a different type rather than generic. 🤔
I don't think there is a way to create a valid Flow code which is typed with something that is not a generic.
I looked at the base test for that throw and they are manually creating an AST that satisfy that requirement,
but that AST probably can't be actually generated. 🤔
-- @cipolleschi
aa19750 to
2b6a831
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 05454fa. |
…ow (facebook#36297) Summary: ## Summary PR facebook#36285 deleted the Paper (legacy) renderer, including the shim file `scripts/rollup/shims/react-native/ReactNative.js`. However, the `runtime_commit_artifacts` workflow still tries to `rm` this file after moving build artifacts into `compiled-rn/`. Since the file no longer exists in the build output, `rm` (without `-f`) fails and kills the entire step. This has caused **every run of the Commit Artifacts workflow to fail since facebook#36285 landed on April 16**, blocking both `builds/facebook-www` and `builds/facebook-fbsource` branches from receiving new build artifacts. This in turn blocks DiffTrain from syncing React changes into Meta's internal monorepo. DiffTrain build for [bf45a68dd35ed08860b6a70fed641dfe6d7d290d](facebook/react@bf45a68) Reviewed By: zeyap Differential Revision: D101329586
…ow (facebook#36297) (facebook#56483) Summary: ## Summary PR facebook#36285 deleted the Paper (legacy) renderer, including the shim file `scripts/rollup/shims/react-native/ReactNative.js`. However, the `runtime_commit_artifacts` workflow still tries to `rm` this file after moving build artifacts into `compiled-rn/`. Since the file no longer exists in the build output, `rm` (without `-f`) fails and kills the entire step. This has caused **every run of the Commit Artifacts workflow to fail since facebook#36285 landed on April 16**, blocking both `builds/facebook-www` and `builds/facebook-fbsource` branches from receiving new build artifacts. This in turn blocks DiffTrain from syncing React changes into Meta's internal monorepo. DiffTrain build for [bf45a68dd35ed08860b6a70fed641dfe6d7d290d](facebook/react@bf45a68) Reviewed By: zeyap Differential Revision: D101329586
…ow (#36297) (#56483) Summary: Pull Request resolved: #56483 ## Summary PR #36285 deleted the Paper (legacy) renderer, including the shim file `scripts/rollup/shims/react-native/ReactNative.js`. However, the `runtime_commit_artifacts` workflow still tries to `rm` this file after moving build artifacts into `compiled-rn/`. Since the file no longer exists in the build output, `rm` (without `-f`) fails and kills the entire step. This has caused **every run of the Commit Artifacts workflow to fail since #36285 landed on April 16**, blocking both `builds/facebook-www` and `builds/facebook-fbsource` branches from receiving new build artifacts. This in turn blocks DiffTrain from syncing React changes into Meta's internal monorepo. DiffTrain build for [bf45a68dd35ed08860b6a70fed641dfe6d7d290d](facebook/react@bf45a68) Reviewed By: zeyap Differential Revision: D101329586 fbshipit-source-id: d38877d5cc964c46257cb73678f80d0a7c729d90
Summary
Part of Umbrella #34872
Flow&TSparsers; into a commonparseModuleNamefn in theparsers-commons.jsparseModuleNamefn fromparsers-commons.jscallExpressionTypeParametersmethod to parserscallExpressionTypeParametersmethod of parsersparser.callExpressionTypeParametersmethod inparseModuleNamefnPS: fixed merge conflicts several times :(
Overall :)
Changelog
[INTERNAL] [CHANGED] - Merge Parse-Module-Name anon fn of
Flow&TSand addcallExpressionTypeParametersmethod to parsersTest Plan
yarn lint && yarn run flow && yarn test react-native-codegen==> ✅