Skip to content

Commit

Permalink
Use babel for transpiling rather than closure compiler
Browse files Browse the repository at this point in the history
We recently switch from using closure-compiler with `WHITESPACE_ONLY` to
closure-compiler with `SIMPLE_OPTIMIZATIONS`.  However this had the
negative side effect that all input need to be free of closure compiler
warnings, and this turned out not to be practical for all users.
See emscripten-core#20810 for more on this

When selecting a transpilation tool use I also evaluated `swx` (written
in rust) and `esbuild` (written in go).  `esbuild` was rejected
because the simply don't support ES5
(evanw/esbuild#297).  `swx` was rejected
because it almost doubled the side of our `node_modules` directory by
adding two 50mb binary files.
  • Loading branch information
sbc100 committed Dec 8, 2023
1 parent dabbde6 commit 35a3f73
Show file tree
Hide file tree
Showing 9 changed files with 6,285 additions and 2,548 deletions.
1 change: 1 addition & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[flake8]
ignore = E111,E114,E501,E261,E266,E121,E402,E241,W504,E741,B011,B023,U101
exclude =
./node_modules/, # third-party code
./third_party/, # third-party code
./tools/filelock.py, # third-party code
./tools/scons/, # third-party code
Expand Down
23 changes: 14 additions & 9 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,25 @@ See docs/process.md for more on how version tagging works.

3.1.51 (in development)
-----------------------
- Transpilation to support older environments/browser is now performed by babel
rather than closure compiler. This means that folks targetting older browsers
(e.g. `-sLEGACY_VM_SUPPORT`) do not need to ensure their code is closure
compliant. (#20879)
- Breaking change: Using the `*glGetProcAddress()` family of functions now
requires passing a linker flag -sGL_ENABLE_GET_PROC_ADDRESS. This prevents
ports of native GL renderers from later accidentally attempting to activate
"dormant" features if web browser implementations gain new WebGL extensions in
the future, which `*glGetProcAddress()` is not able to support. (#20802)
- Added Hi DPI support to GLFW. When enabled, GLFW automatically accounts for the
`devicePixelRatio` browser property and changes the size of the canvas accordingly
(including dynamically if the canvas is moved from a 4k screen to a 2k screen and
vice-versa). `glfwGetFramebufferSize` now properly returns the canvas size in pixels,
while `glfwGetWindowSize` returns the canvas size is screen size. By default,
this feature is disabled. You can enable it before creating a window by calling
`glfwWindowHint(GLFW_SCALE_TO_MONITOR, GLFW_TRUE)`. You can also
dynamically change it after the window has been created by calling
`glfwSetWindowAttrib(window, GLFW_SCALE_TO_MONITOR, GLFW_TRUE)`. (#20584)
- Added Hi DPI support to GLFW. When enabled, GLFW automatically accounts for
the `devicePixelRatio` browser property and changes the size of the canvas
accordingly (including dynamically if the canvas is moved from a 4k screen to
a 2k screen and vice-versa). `glfwGetFramebufferSize` now properly returns the
canvas size in pixels, while `glfwGetWindowSize` returns the canvas size is
screen size. By default, this feature is disabled. You can enable it before
creating a window by calling `glfwWindowHint(GLFW_SCALE_TO_MONITOR,
GLFW_TRUE)`. You can also dynamically change it after the window has been
created by calling `glfwSetWindowAttrib(window, GLFW_SCALE_TO_MONITOR,
GLFW_TRUE)`. (#20584)

3.1.50 - 11/29/23
-----------------
Expand Down
Loading

0 comments on commit 35a3f73

Please sign in to comment.