Welcome! Please see the About page for a little more info on how this works.

+2 votes
in ClojureScript by
retagged by

In versions of CLJS after 1.10.891, when having ES5 set as language out, I get a warning for /goog/i18n/numberformat.js:963:8 that

ERROR - [JSC_LANGUAGE_FEATURE] This language feature is only supported for ECMASCRIPT_2019 mode or better: Optional catch binding.

As far as I can tell, this issue has not yet been reported to the Google Closure Compiler.

2 Answers

0 votes

I'm seeing this behaviour as well with the following compiler options.

{:main            app.ns
 :optimizations   :advanced}

while I feel this is something that would require further attention, the solution I applied was.

{:main            app.ns
 :optimizations   :advanced
 :language-in     :ecmascript-next
 :language-out    :ecmascript-next}

Note: I'm not suggesting this is what you should do. Some may not be able to just change their output like this, but for my case it was fine.

Thanks, this should indeed solve it. Unfortunately, for compatibility reasons (IE11...) this is not a real solution for me.

I'm glad to see it's not just me.
0 votes
edited by

Hi all,

I have logged a bug in the Google Closure Github repo, but (as could be expected), the Google Closure people expect a problem in the configuration, i.e. at Clojurescript side.

Setting :language-in to :ecmascript-next resolves the problem.

I feel that this is actually a bug, or should at least be mentioned in the documentation, because of the incompatibility of having :language-out :es5 and relying on the (incompatible) default :language-in.