Serkan,
The error in the log is when Google Closure is trying to optimize the
code. There is a chance that the bin/js-debug version will still run.
I will look into it why you are getting duplicate keys after I
resolve other issues that are In my queue. I will not have time to
do any serious investigation for another 20 hours or so.
I did take a quick look at the source and noticed you have nested
includeIn. That might be part of the problem, not sure. IOW, the
BorderContainer with id=”findWhat” has includeIn=”defined”, but it is
in a VGroup with includeIn=”defined” so I don’t think the “includeIn”
for “findWhat” is necessary. Try taking that out and see if that helps.
-Alex
*From: *Serkan Taş <[email protected]>
*Reply-To: *"[email protected]" <[email protected]>
*Date: *Saturday, December 1, 2018 at 11:06 PM
*To: *"[email protected]" <[email protected]>
*Subject: *Re: Simple Test Project compiler issues
Hi Alex,
I think there is some misunderstanding here.
Current compiler reports severe error for simple test project.
If you have time you may have a look :
https://github.com/nihavend/royale-testing
<https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnihavend%2Froyale-testing&data=02%7C01%7Caharui%40adobe.com%7Cfa5e8422e7e841ee013c08d65824be4e%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636793312176259854&sdata=JQvIcIheXpkvRiVsVzpHTUVi00dgWuGX7dah8GaZeVo%3D&reserved=0>
Thanks,
Serkan
2.12.2018 10:02 tarihinde Alex Harui yazdı:
If the current compiler reports an error, then it is fatal for
creating an optimized build. So at some point, we want to fix
that. If the bin/js-debug version runs, then it isn’t fatal as
far as debugging your code. See if your browser throws an
exception or not.
Since the current compiler has not reported duplicate keys for
any of the apps I’ve worked on, then I don’t know what code is
resulting in duplicate keys for you, so figure out what the
source code is that is causing the duplication.
Thanks,
-Alex
*From: *Serkan Taş <[email protected]>
<mailto:[email protected]>
*Reply-To: *"[email protected]"
<mailto:[email protected]> <[email protected]>
<mailto:[email protected]>
*Date: *Saturday, December 1, 2018 at 8:43 AM
*To: *"[email protected]" <mailto:[email protected]>
<[email protected]> <mailto:[email protected]>
*Subject: *Re: Simple Test Project compiler issues
Let me clear my self Alex,
Current royale compiler gives this log below for my test project.
I think my real project can not reach this step so give memory
overflow before comes this step.
Log file :
https://drive.google.com/open?id=1ZTHSa4LQikmIMDjhQiQ5xDwIppDns-lF
<https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdrive.google.com%2Fopen%3Fid%3D1ZTHSa4LQikmIMDjhQiQ5xDwIppDns-lF&data=02%7C01%7Caharui%40adobe.com%7Cfa5e8422e7e841ee013c08d65824be4e%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636793312176259854&sdata=8kUJeSZr%2FVxgSv0%2FRRqaHeS6MiaV57ipnJDG37Rh%2B%2B8%3D&reserved=0>
So do you think it is not fatal ?
Thanks,
Serkan
1.12.2018 19:24 tarihinde Alex Harui yazdı:
I saw that it is in there twice, but that shouldn’t be fatal
in this case, unless older Closure Compiler we are currently
using gets confused by it. It is something we should be able
to clean up later if/when we switch to a newer Closure Compiler.
-Alex
*From: *Serkan Taş <[email protected]>
<mailto:[email protected]>
*Reply-To: *"[email protected]"
<mailto:[email protected]> <[email protected]>
<mailto:[email protected]>
*Date: *Saturday, December 1, 2018 at 3:35 AM
*To: *"[email protected]"
<mailto:[email protected]> <[email protected]>
<mailto:[email protected]>
*Subject: *Re: Simple Test Project compiler issues
Hi Alex,
1.12.2018 10:12 tarihinde Alex Harui yazdı:
Hi Serkan,
You are using a new version of Closure Compiler than
Royale so it might be picking up things that the older
version we use isn’t. Royale is using 20170625. I
thought there were more things you had to specify like
entry-point. And Royale is setting some other options as
well. You can check the compiler source in
JSClosureCompilerWrapper.java. But if the newer compiler
doesn’t have memory problems maybe we should look into
switching to it.
I am going to work on this.
Number of lines in a file shouldn’t matter as much as
total file size. MXML is encoded into an array that
spans a lot of lines to make it easier to read, but the
lines should be short. And this is just for debugging.
Again, Closure Compiler will optimize all of that and
remove lots of whitespace.
Okay
Due to things i mixed in one mail, I think you missed the
last question :)
I compiled the test project with royale, not with new version
of closure and here is the result :
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));
}
}
},
The test project, generated js files and full log is
available if you require.
Thanks,
Serkan
-Alex
*From: *Serkan Taş <[email protected]>
<mailto:[email protected]>
*Reply-To: *"[email protected]"
<mailto:[email protected]>
<[email protected]> <mailto:[email protected]>
*Date: *Friday, November 30, 2018 at 10:36 PM
*To: *"[email protected]"
<mailto:[email protected]>
<[email protected]> <mailto:[email protected]>
*Subject: *Simple Test Project compiler issues
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