Skip to content
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

Closure compiler build error for Web platform in current dev branch #83584

Closed
akien-mga opened this issue Oct 18, 2023 · 0 comments · Fixed by #83720
Closed

Closure compiler build error for Web platform in current dev branch #83584

akien-mga opened this issue Oct 18, 2023 · 0 comments · Fixed by #83720

Comments

@akien-mga
Copy link
Member

akien-mga commented Oct 18, 2023

Godot version

4.2.beta1 (b137180), didn't test newer but I expect still reproducible

System information

Fedora 36, Emscripten 3.1.18

Issue description

When building the web editor for 4.2-beta1 on the official buildsystem with Emscripten 3.1.18, I ran into this issue with use_closure_compiler=yes (which we use by default for the editor on official builds).

[Time elapsed: 00:13:56.562]
building:ERROR: Closure compiler run failed:

building:ERROR: /tmp/emscripten_temp_ganlltx7/godot.web.editor.wasm32.js.pgrow.js:7828:24: ERROR - [JSC_LANGUAGE_FEATURE] This language feature is only supported for ECMASCRIPT_2020 mode or better: bigint.
  7828|     HEAP64[b + 2 * i] = 1n;
                                ^

/tmp/emscripten_temp_ganlltx7/godot.web.editor.wasm32.js.pgrow.js:7831:24: ERROR - [JSC_LANGUAGE_FEATURE] This language feature is only supported for ECMASCRIPT_2020 mode or better: bigint.
  7831|     HEAP64[b + 2 * i] = 0n;
                                ^

2 error(s), 0 warning(s)

em++: error: closure compiler failed (rc: 2): /root/emsdk/node/14.18.2_64bit/bin/node --max_old_space_size=8192 /root/emsdk/upstream/emscripten/node_modules/.bin/google-closure-compiler --compilation_level ADVANCED_OPTIMIZATIONS --language_in ECMASCRIPT_2020 --language_out NO_TRANSPILE --emit_use_strict=false --externs /root/emsdk/upstream/emscripten/src/closure-externs/closure-externs.js --language_in ECMASCRIPT6 --externs /root/godot0/modules/webxr/native/webxr.externs.js --externs /root/godot0/platform/web/js/libs/library_godot_webgl2.externs.js --js /tmp/emscripten_temp_ganlltx7/godot.web.editor.wasm32.js.pgrow.js --js_output_file tmp4t1u5yfz.cc.js --formatting PRETTY_PRINT
scons: *** [bin/godot.web.editor.wasm32.js] Error 1

This must have been introduced between 4.2-dev6 and 4.2-beta1. I haven't tested latest master but I expect it may still be reproducible.

Steps to reproduce

  • Setup Emscripten 3.1.18, or possibly other versions might have the same issue
  • scons target=editor use_closure_compiler=yes production=yes

Minimal reproduction project

n/a

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant