Simple Test Project compiler issues

classic Classic list List threaded Threaded
14 messages Options
Reply | Threaded
Open this post in threaded view
|

Simple Test Project compiler issues

Serkan Taş
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
Reply | Threaded
Open this post in threaded view
|

Re: Simple Test Project compiler issues

Alex Harui-2

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.

 

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.

 

-Alex

 

From: Serkan Taş <[hidden email]>
Reply-To: "[hidden email]" <[hidden email]>
Date: Friday, November 30, 2018 at 10:36 PM
To: "[hidden email]" <[hidden email]>
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

Reply | Threaded
Open this post in threaded view
|

Re: Simple Test Project compiler issues

Serkan Taş
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ş [hidden email]
Reply-To: [hidden email] [hidden email]
Date: Friday, November 30, 2018 at 10:36 PM
To: [hidden email] [hidden email]
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


Reply | Threaded
Open this post in threaded view
|

Re: Simple Test Project compiler issues

Alex Harui-2

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ş <[hidden email]>
Reply-To: "[hidden email]" <[hidden email]>
Date: Saturday, December 1, 2018 at 3:35 AM
To: "[hidden email]" <[hidden email]>
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ş [hidden email]
Reply-To: [hidden email] [hidden email]
Date: Friday, November 30, 2018 at 10:36 PM
To: [hidden email] [hidden email]
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




Reply | Threaded
Open this post in threaded view
|

Re: Simple Test Project compiler issues

Serkan Taş
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

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ş [hidden email]
Reply-To: [hidden email] [hidden email]
Date: Saturday, December 1, 2018 at 3:35 AM
To: [hidden email] [hidden email]
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ş [hidden email]
Reply-To: [hidden email] [hidden email]
Date: Friday, November 30, 2018 at 10:36 PM
To: [hidden email] [hidden email]
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





Reply | Threaded
Open this post in threaded view
|

Re: Simple Test Project compiler issues

Alex Harui-2

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ş <[hidden email]>
Reply-To: "[hidden email]" <[hidden email]>
Date: Saturday, December 1, 2018 at 8:43 AM
To: "[hidden email]" <[hidden email]>
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

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ş [hidden email]
Reply-To: [hidden email] [hidden email]
Date: Saturday, December 1, 2018 at 3:35 AM
To: [hidden email] [hidden email]
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ş [hidden email]
Reply-To: [hidden email] [hidden email]
Date: Friday, November 30, 2018 at 10:36 PM
To: [hidden email] [hidden email]
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








Reply | Threaded
Open this post in threaded view
|

Re: Simple Test Project compiler issues

Serkan Taş
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ş [hidden email]
Reply-To: [hidden email] [hidden email]
Date: Saturday, December 1, 2018 at 8:43 AM
To: [hidden email] [hidden email]
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

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ş [hidden email]
Reply-To: [hidden email] [hidden email]
Date: Saturday, December 1, 2018 at 3:35 AM
To: [hidden email] [hidden email]
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ş [hidden email]
Reply-To: [hidden email] [hidden email]
Date: Friday, November 30, 2018 at 10:36 PM
To: [hidden email] [hidden email]
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









Reply | Threaded
Open this post in threaded view
|

Re: Simple Test Project compiler issues

Alex Harui-2

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ş <[hidden email]>
Reply-To: "[hidden email]" <[hidden email]>
Date: Saturday, December 1, 2018 at 11:06 PM
To: "[hidden email]" <[hidden email]>
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

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ş [hidden email]
Reply-To: [hidden email] [hidden email]
Date: Saturday, December 1, 2018 at 8:43 AM
To: [hidden email] [hidden email]
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

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ş [hidden email]
Reply-To: [hidden email] [hidden email]
Date: Saturday, December 1, 2018 at 3:35 AM
To: [hidden email] [hidden email]
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ş [hidden email]
Reply-To: [hidden email] [hidden email]
Date: Friday, November 30, 2018 at 10:36 PM
To: [hidden email] [hidden email]
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













Reply | Threaded
Open this post in threaded view
|

Re: Simple Test Project compiler issues

Serkan Taş
Thank you Alex,

I did not realize the difference of "SEVERE" in compiler or optimizer.  Sorry for that thing i mixed up.

I am going to work on the things you mentioned.

Thanks,
Serkan

2.12.2018 10:17 tarihinde Alex Harui yazdı:

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ş [hidden email]
Reply-To: [hidden email] [hidden email]
Date: Saturday, December 1, 2018 at 11:06 PM
To: [hidden email] [hidden email]
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

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ş [hidden email]
Reply-To: [hidden email] [hidden email]
Date: Saturday, December 1, 2018 at 8:43 AM
To: [hidden email] [hidden email]
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

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ş [hidden email]
Reply-To: [hidden email] [hidden email]
Date: Saturday, December 1, 2018 at 3:35 AM
To: [hidden email] [hidden email]
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ş [hidden email]
Reply-To: [hidden email] [hidden email]
Date: Friday, November 30, 2018 at 10:36 PM
To: [hidden email] [hidden email]
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














Reply | Threaded
Open this post in threaded view
|

Re: Simple Test Project compiler issues

Serkan Taş
Removing include in fixed the issue.

Thanks,
Serkan

2.12.2018 10:21 tarihinde Serkan Taş yazdı:
Thank you Alex,

I did not realize the difference of "SEVERE" in compiler or optimizer.  Sorry for that thing i mixed up.

I am going to work on the things you mentioned.

Thanks,
Serkan

2.12.2018 10:17 tarihinde Alex Harui yazdı:

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ş [hidden email]
Reply-To: [hidden email] [hidden email]
Date: Saturday, December 1, 2018 at 11:06 PM
To: [hidden email] [hidden email]
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

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ş [hidden email]
Reply-To: [hidden email] [hidden email]
Date: Saturday, December 1, 2018 at 8:43 AM
To: [hidden email] [hidden email]
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

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ş [hidden email]
Reply-To: [hidden email] [hidden email]
Date: Saturday, December 1, 2018 at 3:35 AM
To: [hidden email] [hidden email]
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ş [hidden email]
Reply-To: [hidden email] [hidden email]
Date: Friday, November 30, 2018 at 10:36 PM
To: [hidden email] [hidden email]
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















Reply | Threaded
Open this post in threaded view
|

Re: Simple Test Project compiler issues

Serkan Taş
nested "excludeFrom" with same conditions has the same effect.

fyi.

Serkan,
Thanks

2.12.2018 12:56 tarihinde Serkan Taş yazdı:
Removing include in fixed the issue.

Thanks,
Serkan

2.12.2018 10:21 tarihinde Serkan Taş yazdı:
Thank you Alex,

I did not realize the difference of "SEVERE" in compiler or optimizer.  Sorry for that thing i mixed up.

I am going to work on the things you mentioned.

Thanks,
Serkan

2.12.2018 10:17 tarihinde Alex Harui yazdı:

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ş [hidden email]
Reply-To: [hidden email] [hidden email]
Date: Saturday, December 1, 2018 at 11:06 PM
To: [hidden email] [hidden email]
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

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ş [hidden email]
Reply-To: [hidden email] [hidden email]
Date: Saturday, December 1, 2018 at 8:43 AM
To: [hidden email] [hidden email]
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

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ş [hidden email]
Reply-To: [hidden email] [hidden email]
Date: Saturday, December 1, 2018 at 3:35 AM
To: [hidden email] [hidden email]
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ş [hidden email]
Reply-To: [hidden email] [hidden email]
Date: Friday, November 30, 2018 at 10:36 PM
To: [hidden email] [hidden email]
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
















Reply | Threaded
Open this post in threaded view
|

Re: Simple Test Project compiler issues

Serkan Taş
Let me sum up the issues :

I guess inner includeIn or excludeFrom causes this error.

The below code gives SEVERE error.

    <s:Group id="mainApp" width="100%" height="100%" excludeFrom="loggedOutState, dummyState">
       
        <s:layout>
            <s:HorizontalLayout clipAndEnableScrolling="true" paddingRight="0" paddingLeft="0" paddingTop="10" paddingBottom="10" />
        </s:layout>
       
        <comps:TreePanel height="100%" id="jobTree" left="0" right="10" top="0" bottom="0" />
       
        <s:Group width="100%" height="100%">
            <s:layout>
                <s:VerticalLayout clipAndEnableScrolling="true" paddingRight="0" paddingLeft="0" paddingTop="10" paddingBottom="10" />
            </s:layout>
            <comps:MenuBar id="menuBar"/>
            <s:Panel id="messagePanel" title="" width="100%" height="55" visible="false" includeInLayout="false">
                <mx:Text id="messageText" text="" textAlign="center" color="0xFF2D00" width="100%" />
            </s:Panel>
            <!--RO:
            <s:BitmapImage source="@Embed('/images/likya.jpg')" left="0" right="0" top="0" bottom="0" scaleMode="stretch" includeIn="anaSayfaState" />
            -->           
            <!--mx:SWFLoader width="950" height="500" source="http://www.youtube.com/v/ojASzi1Kb8c" includeIn="loggedInState"/-->
            <!--comps:MainPanel includeIn="jobListState" height="100%"/-->
            <jobdetail:JobListWithDetails height="100%" excludeFrom="anaSayfaState, jobDetailState" id="jobListDetail"/>
            <jobdetail:JobAllDetailPanel includeIn="jobDetailState" id="allJobDetail" height="100%"/>

        </s:Group>
       
    </s:Group>


Dec 02, 2018 5:35:38 PM com.google.javascript.jscomp.LoggerErrorManager println
SEVERE: D:/dev/royale-emulation-works/github/pinaraui-royale/src/com/likya/pinara/main/bin/js-debug/com/likya/pinara/main/PinaraUI.js:1131: ERROR - Object literal contains illegal duplicate key "jobListDetail", disallowed in strict mode
    jobListDetail: {
    ^^^^^^^^^^^^^

Dec 02, 2018 5:35:38 PM com.google.javascript.jscomp.LoggerErrorManager println
SEVERE: D:/dev/royale-emulation-works/github/pinaraui-royale/src/com/likya/pinara/main/bin/js-debug/com/likya/pinara/main/PinaraUI.js:1173: ERROR - Object literal contains illegal duplicate key "allJobDetail", disallowed in strict mode
    allJobDetail: {
    ^^^^^^^^^^^^

Dec 02, 2018 5:35:38 PM com.google.javascript.jscomp.LoggerErrorManager println
SEVERE: D:/dev/royale-emulation-works/github/pinaraui-royale/src/com/likya/pinara/main/bin/js-debug/com/likya/pinara/main/PinaraUI.js:1392: ERROR - Object literal contains illegal duplicate key "jobListDetail", disallowed in strict mode
        'jobListDetail': { type: 'com.likya.pinara.comps.jobdetail.JobListWithDetails', access: 'readwrite', declaredBy: 'com.likya.pinara.main.PinaraUI'},
        ^^^^^^^^^^^^^^^

Dec 02, 2018 5:35:38 PM com.google.javascript.jscomp.LoggerErrorManager println
SEVERE: D:/dev/royale-emulation-works/github/pinaraui-royale/src/com/likya/pinara/main/bin/js-debug/com/likya/pinara/main/PinaraUI.js:1395: ERROR - Object literal contains illegal duplicate key "allJobDetail", disallowed in strict mode
        'allJobDetail': { type: 'com.likya.pinara.comps.jobdetail.JobAllDetailPanel', access: 'readwrite', declaredBy: 'com.likya.pinara.main.PinaraUI'},


I am commenting out for now. Just for your info.

Thanks,
Serkan

2.12.2018 17:31 tarihinde Serkan Taş yazdı:
nested "excludeFrom" with same conditions has the same effect.

fyi.

Serkan,
Thanks

2.12.2018 12:56 tarihinde Serkan Taş yazdı:
Removing include in fixed the issue.

Thanks,
Serkan

2.12.2018 10:21 tarihinde Serkan Taş yazdı:
Thank you Alex,

I did not realize the difference of "SEVERE" in compiler or optimizer.  Sorry for that thing i mixed up.

I am going to work on the things you mentioned.

Thanks,
Serkan

2.12.2018 10:17 tarihinde Alex Harui yazdı:

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ş [hidden email]
Reply-To: [hidden email] [hidden email]
Date: Saturday, December 1, 2018 at 11:06 PM
To: [hidden email] [hidden email]
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

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ş [hidden email]
Reply-To: [hidden email] [hidden email]
Date: Saturday, December 1, 2018 at 8:43 AM
To: [hidden email] [hidden email]
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

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ş [hidden email]
Reply-To: [hidden email] [hidden email]
Date: Saturday, December 1, 2018 at 3:35 AM
To: [hidden email] [hidden email]
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ş [hidden email]
Reply-To: [hidden email] [hidden email]
Date: Friday, November 30, 2018 at 10:36 PM
To: [hidden email] [hidden email]
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

















Reply | Threaded
Open this post in threaded view
|

Re: Simple Test Project compiler issues

Alex Harui-2

I pushed a change that should fix this in royale-compiler.

 

HTH,

-Alex

 

From: Serkan Taş <[hidden email]>
Reply-To: "[hidden email]" <[hidden email]>
Date: Sunday, December 2, 2018 at 6:39 AM
To: "[hidden email]" <[hidden email]>
Subject: Re: Simple Test Project compiler issues

 

Let me sum up the issues :

I guess inner includeIn or excludeFrom causes this error.

The below code gives SEVERE error.

    <s:Group id="mainApp" width="100%" height="100%" excludeFrom="loggedOutState, dummyState">
       
        <s:layout>
            <s:HorizontalLayout clipAndEnableScrolling="true" paddingRight="0" paddingLeft="0" paddingTop="10" paddingBottom="10" />
        </s:layout>
       
        <comps:TreePanel height="100%" id="jobTree" left="0" right="10" top="0" bottom="0" />
       
        <s:Group width="100%" height="100%">
            <s:layout>
                <s:VerticalLayout clipAndEnableScrolling="true" paddingRight="0" paddingLeft="0" paddingTop="10" paddingBottom="10" />
            </s:layout>
            <comps:MenuBar id="menuBar"/>
            <s:Panel id="messagePanel" title="" width="100%" height="55" visible="false" includeInLayout="false">
                <mx:Text id="messageText" text="" textAlign="center" color="0xFF2D00" width="100%" />
            </s:Panel>
            <!--RO:
            <s:BitmapImage source="@Embed('/images/likya.jpg')" left="0" right="0" top="0" bottom="0" scaleMode="stretch" includeIn="anaSayfaState" />
            -->           
            <!--mx:SWFLoader width="950" height="500" source="http://www.youtube.com/v/ojASzi1Kb8c" includeIn="loggedInState"/-->
            <!--comps:MainPanel includeIn="jobListState" height="100%"/-->
            <jobdetail:JobListWithDetails height="100%" excludeFrom="anaSayfaState, jobDetailState" id="jobListDetail"/>
            <jobdetail:JobAllDetailPanel includeIn="jobDetailState" id="allJobDetail" height="100%"/>

        </s:Group>
       
    </s:Group>


Dec 02, 2018 5:35:38 PM com.google.javascript.jscomp.LoggerErrorManager println
SEVERE: D:/dev/royale-emulation-works/github/pinaraui-royale/src/com/likya/pinara/main/bin/js-debug/com/likya/pinara/main/PinaraUI.js:1131: ERROR - Object literal contains illegal duplicate key "jobListDetail", disallowed in strict mode
    jobListDetail: {
    ^^^^^^^^^^^^^

Dec 02, 2018 5:35:38 PM com.google.javascript.jscomp.LoggerErrorManager println
SEVERE: D:/dev/royale-emulation-works/github/pinaraui-royale/src/com/likya/pinara/main/bin/js-debug/com/likya/pinara/main/PinaraUI.js:1173: ERROR - Object literal contains illegal duplicate key "allJobDetail", disallowed in strict mode
    allJobDetail: {
    ^^^^^^^^^^^^

Dec 02, 2018 5:35:38 PM com.google.javascript.jscomp.LoggerErrorManager println
SEVERE: D:/dev/royale-emulation-works/github/pinaraui-royale/src/com/likya/pinara/main/bin/js-debug/com/likya/pinara/main/PinaraUI.js:1392: ERROR - Object literal contains illegal duplicate key "jobListDetail", disallowed in strict mode
        'jobListDetail': { type: 'com.likya.pinara.comps.jobdetail.JobListWithDetails', access: 'readwrite', declaredBy: 'com.likya.pinara.main.PinaraUI'},
        ^^^^^^^^^^^^^^^

Dec 02, 2018 5:35:38 PM com.google.javascript.jscomp.LoggerErrorManager println
SEVERE: D:/dev/royale-emulation-works/github/pinaraui-royale/src/com/likya/pinara/main/bin/js-debug/com/likya/pinara/main/PinaraUI.js:1395: ERROR - Object literal contains illegal duplicate key "allJobDetail", disallowed in strict mode
        'allJobDetail': { type: 'com.likya.pinara.comps.jobdetail.JobAllDetailPanel', access: 'readwrite', declaredBy: 'com.likya.pinara.main.PinaraUI'},


I am commenting out for now. Just for your info.

Thanks,
Serkan

2.12.2018 17:31 tarihinde Serkan Taş yazdı:

nested "excludeFrom" with same conditions has the same effect.

fyi.

Serkan,
Thanks

2.12.2018 12:56 tarihinde Serkan Taş yazdı:

Removing include in fixed the issue.

Thanks,
Serkan

2.12.2018 10:21 tarihinde Serkan Taş yazdı:

Thank you Alex,

I did not realize the difference of "SEVERE" in compiler or optimizer.  Sorry for that thing i mixed up.

I am going to work on the things you mentioned.

Thanks,
Serkan

2.12.2018 10:17 tarihinde Alex Harui yazdı:

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ş [hidden email]
Reply-To: [hidden email] [hidden email]
Date: Saturday, December 1, 2018 at 11:06 PM
To: [hidden email] [hidden email]
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

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ş [hidden email]
Reply-To: [hidden email] [hidden email]
Date: Saturday, December 1, 2018 at 8:43 AM
To: [hidden email] [hidden email]
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

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ş [hidden email]
Reply-To: [hidden email] [hidden email]
Date: Saturday, December 1, 2018 at 3:35 AM
To: [hidden email] [hidden email]
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ş [hidden email]
Reply-To: [hidden email] [hidden email]
Date: Friday, November 30, 2018 at 10:36 PM
To: [hidden email] [hidden email]
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

















 

 

 



Reply | Threaded
Open this post in threaded view
|

Re: Simple Test Project compiler issues

Serkan Taş
I checked, as i see is fixed.

Thanks,
Serkan

3.12.2018 12:15 tarihinde Alex Harui yazdı:

I pushed a change that should fix this in royale-compiler.

 

HTH,

-Alex

 

From: Serkan Taş [hidden email]
Reply-To: [hidden email] [hidden email]
Date: Sunday, December 2, 2018 at 6:39 AM
To: [hidden email] [hidden email]
Subject: Re: Simple Test Project compiler issues

 

Let me sum up the issues :

I guess inner includeIn or excludeFrom causes this error.

The below code gives SEVERE error.

    <s:Group id="mainApp" width="100%" height="100%" excludeFrom="loggedOutState, dummyState">
       
        <s:layout>
            <s:HorizontalLayout clipAndEnableScrolling="true" paddingRight="0" paddingLeft="0" paddingTop="10" paddingBottom="10" />
        </s:layout>
       
        <comps:TreePanel height="100%" id="jobTree" left="0" right="10" top="0" bottom="0" />
       
        <s:Group width="100%" height="100%">
            <s:layout>
                <s:VerticalLayout clipAndEnableScrolling="true" paddingRight="0" paddingLeft="0" paddingTop="10" paddingBottom="10" />
            </s:layout>
            <comps:MenuBar id="menuBar"/>
            <s:Panel id="messagePanel" title="" width="100%" height="55" visible="false" includeInLayout="false">
                <mx:Text id="messageText" text="" textAlign="center" color="0xFF2D00" width="100%" />
            </s:Panel>
            <!--RO:
            <s:BitmapImage source="@Embed('/images/likya.jpg')" left="0" right="0" top="0" bottom="0" scaleMode="stretch" includeIn="anaSayfaState" />
            -->           
            <!--mx:SWFLoader width="950" height="500" source="http://www.youtube.com/v/ojASzi1Kb8c" includeIn="loggedInState"/-->
            <!--comps:MainPanel includeIn="jobListState" height="100%"/-->
            <jobdetail:JobListWithDetails height="100%" excludeFrom="anaSayfaState, jobDetailState" id="jobListDetail"/>
            <jobdetail:JobAllDetailPanel includeIn="jobDetailState" id="allJobDetail" height="100%"/>

        </s:Group>
       
    </s:Group>


Dec 02, 2018 5:35:38 PM com.google.javascript.jscomp.LoggerErrorManager println
SEVERE: D:/dev/royale-emulation-works/github/pinaraui-royale/src/com/likya/pinara/main/bin/js-debug/com/likya/pinara/main/PinaraUI.js:1131: ERROR - Object literal contains illegal duplicate key "jobListDetail", disallowed in strict mode
    jobListDetail: {
    ^^^^^^^^^^^^^

Dec 02, 2018 5:35:38 PM com.google.javascript.jscomp.LoggerErrorManager println
SEVERE: D:/dev/royale-emulation-works/github/pinaraui-royale/src/com/likya/pinara/main/bin/js-debug/com/likya/pinara/main/PinaraUI.js:1173: ERROR - Object literal contains illegal duplicate key "allJobDetail", disallowed in strict mode
    allJobDetail: {
    ^^^^^^^^^^^^

Dec 02, 2018 5:35:38 PM com.google.javascript.jscomp.LoggerErrorManager println
SEVERE: D:/dev/royale-emulation-works/github/pinaraui-royale/src/com/likya/pinara/main/bin/js-debug/com/likya/pinara/main/PinaraUI.js:1392: ERROR - Object literal contains illegal duplicate key "jobListDetail", disallowed in strict mode
        'jobListDetail': { type: 'com.likya.pinara.comps.jobdetail.JobListWithDetails', access: 'readwrite', declaredBy: 'com.likya.pinara.main.PinaraUI'},
        ^^^^^^^^^^^^^^^

Dec 02, 2018 5:35:38 PM com.google.javascript.jscomp.LoggerErrorManager println
SEVERE: D:/dev/royale-emulation-works/github/pinaraui-royale/src/com/likya/pinara/main/bin/js-debug/com/likya/pinara/main/PinaraUI.js:1395: ERROR - Object literal contains illegal duplicate key "allJobDetail", disallowed in strict mode
        'allJobDetail': { type: 'com.likya.pinara.comps.jobdetail.JobAllDetailPanel', access: 'readwrite', declaredBy: 'com.likya.pinara.main.PinaraUI'},


I am commenting out for now. Just for your info.

Thanks,
Serkan

2.12.2018 17:31 tarihinde Serkan Taş yazdı:

nested "excludeFrom" with same conditions has the same effect.

fyi.

Serkan,
Thanks

2.12.2018 12:56 tarihinde Serkan Taş yazdı:

Removing include in fixed the issue.

Thanks,
Serkan

2.12.2018 10:21 tarihinde Serkan Taş yazdı:

Thank you Alex,

I did not realize the difference of "SEVERE" in compiler or optimizer.  Sorry for that thing i mixed up.

I am going to work on the things you mentioned.

Thanks,
Serkan

2.12.2018 10:17 tarihinde Alex Harui yazdı:

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ş [hidden email]
Reply-To: [hidden email] [hidden email]
Date: Saturday, December 1, 2018 at 11:06 PM
To: [hidden email] [hidden email]
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

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ş [hidden email]
Reply-To: [hidden email] [hidden email]
Date: Saturday, December 1, 2018 at 8:43 AM
To: [hidden email] [hidden email]
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

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ş [hidden email]
Reply-To: [hidden email] [hidden email]
Date: Saturday, December 1, 2018 at 3:35 AM
To: [hidden email] [hidden email]
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ş [hidden email]
Reply-To: [hidden email] [hidden email]
Date: Friday, November 30, 2018 at 10:36 PM
To: [hidden email] [hidden email]
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