HTML -minify removes methods with name 'call'

We have a largish codebase and use the -minify flag when building for production.
Since v6 this has been broken though, as methods with the name ‘call’ get removed, as well as any references to these methods.
I have tried with Lime 5.6.0 & 5.9.1, both exhibit the same behaviour.

Also, I think might be the root cause of this issue:

It sounds similar to this issue:

Can you tell if adding DCE does it, or if it’s Google Closure? You can try openfl test html5 --dce full and see if it’s dead-code elimination, otherwise it’s during the minification process

EDIT: I guess you said -minify, not -final, so it would be Closure. We did update Closure to a newer version. You could try and see if a different version works better by swapping our version with another?

Yeah, works fine with older version of ‘compiler.jar’

I wonder if we could also consider giving ExternalInterface another method (such as call2) and making call an inline call to the real method

Just wanted to report that I had exactly the same problem, and that using the previous version of compiler.jar solved it.

Should I open an issue on github?

Sure, open it on OpenFL, thanks :slight_smile:

Turn out that passing --strict_mode_input false solves this problem, see

A PR with this and a few more minification fixes is here:

Awesome, thanks for the help! I think the assumption is that call is really a redundant call, but here have a real method called call

Thankful for your help :slight_smile: