-
Notifications
You must be signed in to change notification settings - Fork 75
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
Consider moving from fly-esnext to fly-mz #276
Comments
Yes, this is likely to change in the coming weeks.
Can you link to this issue or thread. I was not aware of this. |
These issues mention the decision to stick to RegExp: lukeed/fly-esnext#8 (comment) It seems that v1 of the esnext plugin was babel-based (via babel/register) and v2 moved to regexp. |
@karimsa Thanks for linking me to those! |
No problem! Let me know what you think of the issue. If fly is definitely intending on supporting |
@karimsa Thanks!
|
How would it work with a separate fly-compat plugin? I personally see two possible solutions for switching over to using more ES2015 features:
By updating to the latest features, it would also be really nice to make use of async/await instead of coroutines - which can be wrapped via bluebird to maintain the performance. |
Hi @karimsa! Thanks a lot for this~! Yes, v1 of the original Since "lightweight" and "performance" are two of the pillars that makes Taskr stand out, this was a big no-no that had to change. Along with this, I think it's important that we natively support what Node natively supports. This, again, harks back to those two pillars. However!! That doesn't mean this would be a bad plugin! On the contrary! I think you'd be interested in my latest reply in #241 --- that would fit your Lastly, I was going to support all |
@lukeed You may also want to check this: https://github.com/karimsa/buildjs-benchmarks 🎉 EDIT: Grammar. |
Very cool! More evidence 😜 @karimsa If you don't mind, I can open a PR that will make us win the |
Sounds good! And yeah, absolutely. Feel free to PR any changes you feel make the tests more fair :) |
Great! If you wouldn't mind leaving a 👍 or comment on that thread, I'll appreciate/remember it the next time I look at that issue 😅 And okay 😃 I'm not sure if it's "fair" haha -- that'll be up for you to decide. Opening shortly~ Closing in favor of the other thread. Thanks! |
Fly currently has a hidden feature in which it attempts to pass the
flyfile.js
throughfly-esnext
for transpiling in order to add support for ES2015 features.However, there's a number of issues with
fly-esnext
, the biggest one being inconsistent feature support due to the use of RegExp-based replacements. I know that it manages to have better performance than a parser-transpiler based version due to this but there have been many complaints of the lack of feature support (like how it fails with different spacing, variations of code, or that it runs the regexp engine 5 times in order to transpile the code - and the regexp engine is already so slow).There are also certain other issues like the fact that the flyfile is run inside of a separate V8 sandbox and therefore does not have certain node features (like console is undefined).
However, it seems that the author of that project is insistent on keeping up the regexp way for the performance benefit. I wanted to propose the alternative to that package, a package which I just published called fly-mz. The API is exactly the same as what Fly expects from
fly-esnext
, but it usesbabel-preset-env
for the most optimal transpiling for the current version of node. It also fixes the sandbox issues.I've currently added a hack to the
postinstall
script offly-mz
to use a symlink (fly-mz
->fly-esnext
) in order to get Fly to work with the package.The text was updated successfully, but these errors were encountered: