emscripten-core / emscripten-core/emscripten
What should we do about our closure compiler dependency?
- Dominant language
- C++
- Stars
- 27.6k
- Forks
- 3.6k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 105
Description
Currently emscripten depends pretty strongly on closure compiler to get its absolute smallest output.
Over the years this is caused a lot of issue for us. For example:
1. Bugs in closure compiler itself.
2. Difficulty running closure compiler: Closure compile is available in 3 forms: JavaScript, Java, and native-compiled-gradle. All 3 of these have presented issues for us
3. Opaque limitations of closure. For example, I recently discoverted that it minifies things differently inside a nest scope that it does at the top level. This basically blocked my recent change: #23261
4. Impossible to suppress warnings
5. Jumping through crazy hoops to avoid minification: https://github.com/emscripten-core/emscripten/blob/058550657d10aa97fda433fcf56bcc85e9fb7581/src/shell.js#L28-L29
6. Jumping through even crazier hoops work around limitations: https://github.com/emscripten-core/emscripten/blob/675698d914cc22719d8cd09bd621170009473a60/src/parseTools.mjs#L47-L54
Finally, the future of closure compiler seems somewhat tenous and the npm packages have not been updated in 10 months.
We have a pretty annoying issue that there is not macOS arm64 binary still in npm: https://github.com/google/closure-compiler-npm/issues/291. This means almost all mac users see warning messages and fall back to java version.
Can we remove our dependency on closure somehow?
Contributor guide
Assessment
This issue has not been assessed yet.