-
Notifications
You must be signed in to change notification settings - Fork 660
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
Importing files suppress async generators are unsupported
errors
#1389
Comments
I am not sure I understand the problem. What are "imported files"? Hermes, in the way it is currently used by React Native, has no concept of modules or imported files. It sees a single source file that has been transformed by Babel and packaged by Metro. If that file contains async generators, Hermes will report an error. |
i see ^ i mean files ignored by Babel, required or imported like
simple cases (stripping part of the example) report the Hermes error correctly to sim/emu |
good point i suppose it's not Hermes side, since Metro hot reload outputs correctly to console i'll close here to fix either RN side or Metro side |
also Metro doesn't fail with the Hermes error during bundling when requiring our example file.cjs but e.g. adding
since defining an async generator fn alone (no var to reference it) should be enough for Hermes to recognise it in the source file and report an error (despite being unused) looks like another Metro bug? since both debug and release bundling should be failing with a defined async generator in the source file |
Bug Description
Hermes suppresses
async generators are unsupported
errors in imported fileshermes/lib/AST/SemanticValidator.cpp
Lines 798 to 800 in 7991309
OS: Android, iOS
Platform : arm64-v8a (macOS, M2)
Steps To Reproduce
npx react-native@latest init RN07119 --version 0.71.19
npx react-native@latest init RN07214 --version 0.72.14
The Expected Behavior
Error
async generators are unsupported
(Android, iOS)The text was updated successfully, but these errors were encountered: