JSClosureCompilerWrapper: fix compiler crash when attempting to use --remove-circulars=false with a release build

Was giving the following exception from Closure Compiler:

Internal error: com.google.javascript.jscomp.FlagUsageException: --manage_closure_dependencies cannot be used with --dependency_mode

Presumably, both options were allowed to be set together in previous versions of Closure Compiler.

From Closure's docs:

> --manage_closure_dependencies will keep any files that do not goog.provide symbols (whereas --only_closure_dependencies will drop them).

> --dependency_mode=PRUNE_LEGACY will keep any files that do not goog.provide symbols (whereas --dependency_mode=PRUNE will drop them).

> Using --dependency_mode to Drop Unreferenced Files
> This flag replaces the now deprecated --only_closure_dependencies and --manage_closure_dependencies flags

So basically, they do the same thing, and manage_closure_dependencies is deprecated and replaced by dependency_mode dependency_mode=PRUNE_LEGACY, so it is safe to set dependency_mode=PRUNE_LEGACY only, and leave manage_closure_dependencies as false.
1 file changed