-
Notifications
You must be signed in to change notification settings - Fork 47k
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
[compiler][patch] Fix jsx non-ascii regex pattern #30382
Conversation
[ghstack-poisoned]
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
ghstack-source-id: 1312951393065d04f5569c877e110c925a0252f0 Pull Request resolved: #30382
Comparing: 512b09b...f1f0aaf Critical size changesIncludes critical production bundles, as well as any change greater than 2%:
Significant size changesIncludes any change greater than 0.2%: Expand to show
|
## Error | ||
|
||
``` | ||
Property arguments[0] of CallExpression expected node to be of a type ["Expression","SpreadElement","JSXNamespacedName","ArgumentPlaceholder"] but instead got "JSXExpressionContainer" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This error is not caught and handled by Forget as it occurs in babel-plugin-fbt
. Going to go back to hack in a check in MemoizeFbtAndMacroOperandsInSameScope
for now, but ideally we would have some type / annotation on Identifier
instances to know which strings are fbt operands
EDIT: moved this fixture to #30386
[ghstack-poisoned]
ghstack-source-id: 19aa7901306dc2b6e8e67a4782677a92256a9476 Pull Request resolved: #30382
[ghstack-poisoned]
ghstack-source-id: e0668730759801f9c80baa30c193a8b8251f7e79 Pull Request resolved: #30382
[ghstack-poisoned]
ghstack-source-id: 19aa7901306dc2b6e8e67a4782677a92256a9476 Pull Request resolved: #30382
@@ -2206,7 +2206,7 @@ function codegenInstructionValue( | |||
* https://en.wikipedia.org/wiki/List_of_Unicode_characters#Control_codes | |||
*/ | |||
const STRING_REQUIRES_EXPR_CONTAINER_PATTERN = | |||
/[\u{0000}-\u{001F}|\u{007F}|\u{0080}-\u{FFFF}]|"/u; | |||
/[\u{0000}-\u{001F}\u{007F}\u{0080}-\u{FFFF}]|"/u; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Previously, we were matching |
literals
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't recall why we needed to escape the u{...
, does it work without them?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
@@ -2206,7 +2206,7 @@ function codegenInstructionValue( | |||
* https://en.wikipedia.org/wiki/List_of_Unicode_characters#Control_codes | |||
*/ | |||
const STRING_REQUIRES_EXPR_CONTAINER_PATTERN = | |||
/[\u{0000}-\u{001F}|\u{007F}|\u{0080}-\u{FFFF}]|"/u; | |||
/[\u{0000}-\u{001F}\u{007F}\u{0080}-\u{FFFF}]|"/u; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't recall why we needed to escape the u{...
, does it work without them?
ghstack-source-id: 97ed49112453c2ca3165361e758b6f31fbd0da20 Pull Request resolved: #30382
ghstack-source-id: 97ed49112453c2ca3165361e758b6f31fbd0da20 Pull Request resolved: facebook#30382
ghstack-source-id: 97ed49112453c2ca3165361e758b6f31fbd0da20 Pull Request resolved: facebook#30382
Stack from ghstack (oldest at bottom):