Hi Alex,
According to documentation of closure i tried launch the compiler from
the command line.
java -jar
D:\dev\royale-emulation-works\compiler-latest\closure-compiler-v20181125.jar
--js .\PinaraUI_mx_managers_SystemManager.js .\Namespace.js .\QName.js
.\XML.js .\XMLList.js .\org\**.js mx\**.js .\com\**.js .\spark\**.js
.\library\**.js
From the output of the compiler, i got some weird logs like :
./com/likya/pinara/comps/jobcrud/LogAnalysisForm.js:1292: ERROR - Object
literal contains illegal duplicate key "findWhat", disallowed in strict mode
findWhat: {
^^^^^^^^
This error does not appear in my previous compiling and i thought that
because of memory overflow may the compiler is not completed even in
js-debug folder ?
This forced me to prepare simple test project to what is happening. I
prepared the project and compiled and get these output like :
Dec 01, 2018 8:59:29 AM com.google.javascript.jscomp.LoggerErrorManager
println
SEVERE:
D:/dev/royale-emulation-works/github/royale-testing/src/main/bin/js-debug/main/LogAnalysisForm.js:1531:
ERROR - Object literal contains illegal duplicate key "findWhat",
disallowed in strict mode
findWhat: {
^^^^^^^^
Discovered that when look into js file it is really declared twice
L:1321
/** @export */
findWhat: {
/** @this {main.LogAnalysisForm} */
get: function() {
return this.findWhat_;
},
/** @this {main.LogAnalysisForm} */
set: function(value) {
if (value != this.findWhat_) {
this.findWhat_ = value;
this.dispatchEvent(org.apache.royale.events.ValueChangeEvent.createUpdateEvent(this,
'findWhat', null, value));
}
}
},
L:1531
/** @export */
findWhat: {
/** @this {main.LogAnalysisForm} */
get: function() {
return this.findWhat_;
},
/** @this {main.LogAnalysisForm} */
set: function(value) {
if (value != this.findWhat_) {
this.findWhat_ = value;
this.dispatchEvent(org.apache.royale.events.ValueChangeEvent.createUpdateEvent(this,
'findWhat', null, value));
}
}
},
May be you may have description of these behavior.
Ant the size of the file LogAnalysisForm.mxml has 310 lines but js
version has 2465. I can understand the increase in size while
transforming to js but the ratio is nearly 10 times, just to note.
The test project, generated js files and full log is available if you
require.
Thanks,
Serkan