Just to clarify, I have also tried the recommended versions of closure-compiler (v20140407) and closure-library (v20190415) as mentioned in the readme. In this case when I run the compile-demo build task, I get the same error:
[exec] Unknown diagnostic group: 'undefinedNames'
But this time if I remove the "undefinedNames" line from the libphonenumber/javascript/build.xml, and run the build again, I get 120 errors, mostly saying "references a namespace which was not required by this file" - I'll paste a few below:
compile-demo:
[exec] /Users/jack/workspace/libphonenumber/libphonenumber/javascript/../../closure-library/closure/goog/base.js:47:14: WARNING - [JSC_PARSE_ERROR] Parse error. unknown @suppress parameter: newCheckTypes
[exec] 47| * @suppress {newCheckTypes}
[exec] ^
[exec]
[exec] /Users/jack/workspace/libphonenumber/libphonenumber/javascript/../../closure-library/closure/goog/dom/dom.js:1017:15: ERROR - [JSC_MISSING_REQUIRE_TYPE_IN_PROVIDES_FILE] 'goog.string.Const' references a namespace which was not required by this file.
[exec] Please add a goog.requireType.
[exec] 1017| * @param {...!goog.string.Const} var_args The HTML strings to concatenate then
[exec] ^^^^^^^^^^^^^^^^^
[exec]
[exec] /Users/jack/workspace/libphonenumber/libphonenumber/javascript/../../closure-library/closure/goog/dom/dom.js:1022:64: ERROR - [JSC_MISSING_REQUIRE_IN_PROVIDES_FILE] 'goog.string.Const' references a namespace which was not required by this file.
[exec] Please add a goog.require.
[exec] 1022| var stringArray = goog.array.map(arguments, goog.string.Const.unwrap);
[exec] ^^^^^^
[exec]
[exec] /Users/jack/workspace/libphonenumber/libphonenumber/javascript/../../closure-library/closure/goog/dom/dom.js:1026:32: ERROR - [JSC_MISSING_REQUIRE_IN_PROVIDES_FILE] 'goog.string.Const' references a namespace which was not required by this file.
[exec] Please add a goog.require.
[exec] 1026| goog.string.Const.from(
[exec] ^^^^
[exec]
... (truncated for brevity) ...
Can anyone tell me what versions of closure-compiler and closure-library work with the latest version of libphonenumber (v8.12.37)? Or is there something wrong with my setup perhaps?
Thanks so much for any pointers :)