-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Update flow #3238
Update flow #3238
Conversation
cc @lydell who has done this before |
@@ -1 +1 @@ | |||
run_spec(__dirname, null, ["babylon"]); | |||
run_spec(__dirname, { parser: "babylon" }); |
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.
It's related to #1481 but now this code only parses in babylon and not flow anymore. Maybe the babylon fix should be reverted? cc @existentialism
|
||
`; | ||
|
||
exports[`backslash_2029.js 1`] = ` | ||
1;/*a*///b /*c*/2 | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
1; /*a*/ //b /*c*/2 | ||
1; /*a*/ //b | ||
/*c*/ 2; |
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.
Related to #883
not sure what to do here
Regarding syncing the Flow tests: See #2336. Do any tests contain new syntax or something that we'd like to copy? Otherwise it might not be worth syncing. Perhaps we should even remove the sync script. |
I don't think they have any new syntax, they've only removed stuff. I'll just update the existing broken tests then. |
bf79d1a
to
834ace1
Compare
I think something's changed on the flow-parser, now the dist tests are failing with:
|
I managed to add a hack to work around flow-parser’s dynamic require. Hopefully tests will pass now! |
"require(s8)": 'require("fs")', | ||
include: "node_modules/flow-parser/flow_parser.js" | ||
}) | ||
: {}, |
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.
cc @mroch, not sure it was intentional but would be great to remove dynamic requires
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 is js_of_ocaml optimizing things... and comes from its internal library. hrm.
also, s8
is the random name it happened to assign to that hoisted string so this is definitely unstable across releases. will have to think about this...
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.
Yeah, I'm aware this is a random name given in the ocaml -> JS build. But that shouldn't be a problem until we update flow again, and we don't do that often.
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.
But it's funny that the require("constants")
remained like that and require("fs")
got hoisted.
@@ -2,15 +2,15 @@ | |||
|
|||
const a = new Headers("'Content-Type': 'image/jpeg'"); // not correct | |||
const b = new Headers(['Content-Type', 'image/jpeg']); // not correct | |||
const c = new Headers({'Content-Type', 'image/jpeg'}); // correct | |||
const c = new Headers({'Content-Type': 'image/jpeg'}); // correct |
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.
How was it even working!?
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.
IIRC, it was valid short notation, and then not being typechecked properly
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.
Having to workaround the dynamic require isn't ideal, but since it won't break until we update flow again, I think we should merge this
In order to support JSX fragments (#3237) we need to update flow to version 0.59. Since there were some relevant changes I decided to do another sync of the tests.