-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Add control over JS version used in input and output of emscripten #12629
Conversation
I know it will probably make @RReverser sad to see this extra setting needed just to use modern JS.. on the other hand we do hope to bump to the default to ES6 in the very near future. |
6852be0
to
e9e0a09
Compare
b74af05
to
9f00b19
Compare
This is first step towards #11984 |
9f00b19
to
83bc885
Compare
If I understand original issue correctly, Closure Compiler introduces a new syntax even when user didn't write it, and even when using It can be very surprising for users if so, and I agree fixing it is more important for now. |
Yes, I think my understanding of what NO_TRANSPILE on the output and ES_2020 on the input would do. I guess it makes perfect sense that reducing |
I spoke with alon about this and he thinks we should be able to do with without adding so many options. I'm going to try to make this simpler if I can. |
TBH it doesn't make much sense to me, because I'd expect |
Either way I guess |
Yeah, sounds fair. It's a shame we already called the ES module option |
Yeah, that options should really be called "EXPORT_MJS"... perhaps we could make that an alias. Also, by the way the EXPORT_ES6 option is not necessary if your output file ends in ".mjs" or if you pass |
T6his allows users more control of the version of JS they want to produce and the version they want to use in their input. It also fixes a bug where were introducing non-ES5 features into our output files by using closer with --language_out set to NO_TRANSPILE and --language_in set to ECMASCRIPT_2020. Fixes: #12628
83bc885
to
81090f5
Compare
This issue has been automatically marked as stale because there has been no activity in the past year. It will be closed automatically if no further activity occurs in the next 30 days. Feel free to re-open at any time if this issue is still relevant. |
This allows users more control of the version of JS they want
to produce and the version they want to use in their input.
It also fixes a bug where we were introducing non-ES5 features into our
output files by using closure with --language_out set to NO_TRANSPILE and
--language_in set to ECMASCRIPT_2020.
Fixes: #12628