-
Notifications
You must be signed in to change notification settings - Fork 464
Use pinned flow_parser #7390
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
Use pinned flow_parser #7390
Conversation
Just tried this locally (after rebasing on latest master). |
Co-authored-by: Christoph Knittel <[email protected]>
b8c7b2a
to
c381358
Compare
After fixing the part @cknitt pointed out, this works properly. I would support this change as long as it doesn't cause serious problems in performance or binary size. We don't want to maintain the whole JS parser logic anyway. The only problem is that it requires OCaml compiler 5.2 or higher, but since it doesn't actually require a higher version of OCaml (yet), we can just fork the package and fix the range. |
2746fd3
to
343fe61
Compare
Windows again... I have no idea why opam pin is failing on Windows :/ |
6cc1d11
to
343fe61
Compare
Opened an issue: ocaml/opam#6472 |
Until this is fixed in OPAM, can we vendor the new version? |
c897cdb
to
3b312c5
Compare
85e5099
to
8a7be69
Compare
Not needed, I fixed all issues in our fork facebook/flow@main...rescript-lang:flow:rescript |
This increases the binary size ~1MiB per platform. But once #6183 is done, it would be a minor range. It's a somewhat expected impact since the flow_parser includes a lot of additional syntax. Since we only use a small portion of its functionality, we might have a lighter dedicated parser later. |
Wow, nice work! 🎉 Could warrant a CHANGELOG entry. 😉 |
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.
Ok, will merge now and update the CHANGELOG while preparing the next alpha release.
Experimented with using the upstream parser to catch up with updates and reduce maintenance costs.
Some errors from the Ounit tests are fixed by #7381.
There are some unintended changes in JS artifacts; I really don't get how the JS parser causes them. This needs investigation.