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
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ş <serkan....@likyateknoloji.com>
*Reply-To: *"users@royale.apache.org" <users@royale.apache.org>
*Date: *Saturday, December 1, 2018 at 8:43 AM
*To: *"users@royale.apache.org" <users@royale.apache.org>
*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%7Ceb95c19fd5db4895ce3108d657ac147b%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636792793958216883&sdata=wwidAkiEKrS3VbXAyh0qJrWfE1SHNtgU%2BEatBEAncbk%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ş <serkan....@likyateknoloji.com>
<mailto:serkan....@likyateknoloji.com>
*Reply-To: *"users@royale.apache.org"
<mailto:users@royale.apache.org> <users@royale.apache.org>
<mailto:users@royale.apache.org>
*Date: *Saturday, December 1, 2018 at 3:35 AM
*To: *"users@royale.apache.org" <mailto:users@royale.apache.org>
<users@royale.apache.org> <mailto:users@royale.apache.org>
*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ş <serkan....@likyateknoloji.com>
<mailto:serkan....@likyateknoloji.com>
*Reply-To: *"users@royale.apache.org"
<mailto:users@royale.apache.org> <users@royale.apache.org>
<mailto:users@royale.apache.org>
*Date: *Friday, November 30, 2018 at 10:36 PM
*To: *"users@royale.apache.org"
<mailto:users@royale.apache.org> <users@royale.apache.org>
<mailto:users@royale.apache.org>
*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