You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@royale.apache.org by Roman Isitua <ro...@gmail.com> on 2021/12/23 15:21:51 UTC
Load time is very slow
Hi Everyone,
I am currently working on an app. The app is still in development. I have
deployed it to a test server online.
The app can be access on this url below
http://140.238.127.236:8081/spaciofm/js-debug/index.html
I noticed that the app loading time is slow. It takes up to 20 seconds to
load the application. I have checked to see other royale apps
e.g the adobe spectrum demo, jewel tour de jewel demo and the mdl example
demo. Those apps load much faster.
My maven compilation settings is as follows
<royale.showbindingWarnings>-compiler.show-binding-warnings=false;</
royale.showbindingWarnings>
<royale.sourceMapSettings>-source-map=true;</
royale.sourceMapSettings>
<royale.jsDefaultInitializers>-js-default-initializers=true;</
royale.jsDefaultInitializers>
<royale.jsDynamicAccessUnknownMembers>
-js-dynamic-access-unknown-members=true;</
royale.jsDynamicAccessUnknownMembers>
<royale.targets>JSRoyale</royale.targets>
<royale.debug>true</royale.debug>
<royale.mxroyale.css>
-compiler.exclude-defaults-css-files=MXRoyale-0.9.7-js.swc:defaults.css;</
royale.mxroyale.css>
I will like to ask what could be the reason for the slow load times ?
As the app is currently in development is there a need to compile to
release mode to get fast load times ?
The file size of the debug version is currently 7mb. I am deploying it in a
spring boot embedded tomcat server.
Any ideas ? I would like to tackle this early in the development phase.
Regards,
Roman,
Re: Load time is very slow
Posted by Piotr Zarzycki <pi...@gmail.com>.
Hi Roman,
When you compile framework with artifacts will be stored locally.
Next when your application start with compilation it will uses these stored
locally artifacts.
Thanks,
Piotr
On Mon, 27 Dec 2021 at 18:52, Roman Isitua <ro...@gmail.com> wrote:
> I will try this and revert back to you.
>
> One question, how do i get my application project to use this branch of
> apache royale ?
>
> My project is maven based.
>
> On Mon, 27 Dec 2021, 18:47 Harbs, <ha...@gmail.com> wrote:
>
>> The build instructions should be the same.
>>
>> checkout the branch in both royale-compiler and royale-asjs and rebuild
>> the same way you normally do.
>>
>> This git command should check out the branch.
>>
>> git checkout feature/ROYALE_INTERFACE_INFO
>>
>> If it doesn’t work, details on what happens should help us fix it.
>>
>> On Dec 27, 2021, at 3:37 PM, Roman Isitua <ro...@gmail.com> wrote:
>>
>> Would definitely not mind trying this out.
>>
>> I have built 0.9.8 from source before following the instructions here
>>
>> https://royale.apache.org/source-code/
>>
>> I checked out the branch "develop" and built the source.
>>
>> My app uses maven.
>>
>> How can I test this out ?
>>
>>
>> --
Piotr Zarzycki
Re: Load time is very slow
Posted by Roman Isitua <ro...@gmail.com>.
I will try this and revert back to you.
One question, how do i get my application project to use this branch of
apache royale ?
My project is maven based.
On Mon, 27 Dec 2021, 18:47 Harbs, <ha...@gmail.com> wrote:
> The build instructions should be the same.
>
> checkout the branch in both royale-compiler and royale-asjs and rebuild
> the same way you normally do.
>
> This git command should check out the branch.
>
> git checkout feature/ROYALE_INTERFACE_INFO
>
> If it doesn’t work, details on what happens should help us fix it.
>
> On Dec 27, 2021, at 3:37 PM, Roman Isitua <ro...@gmail.com> wrote:
>
> Would definitely not mind trying this out.
>
> I have built 0.9.8 from source before following the instructions here
>
> https://royale.apache.org/source-code/
>
> I checked out the branch "develop" and built the source.
>
> My app uses maven.
>
> How can I test this out ?
>
>
>
Re: Load time is very slow
Posted by Harbs <ha...@gmail.com>.
The build instructions should be the same.
checkout the branch in both royale-compiler and royale-asjs and rebuild the same way you normally do.
This git command should check out the branch.
git checkout feature/ROYALE_INTERFACE_INFO
If it doesn’t work, details on what happens should help us fix it.
> On Dec 27, 2021, at 3:37 PM, Roman Isitua <ro...@gmail.com> wrote:
>
> Would definitely not mind trying this out.
>
> I have built 0.9.8 from source before following the instructions here
>
> https://royale.apache.org/source-code/ <https://royale.apache.org/source-code/>
>
> I checked out the branch "develop" and built the source.
>
> My app uses maven.
>
> How can I test this out ?
Re: Load time is very slow
Posted by Roman Isitua <ro...@gmail.com>.
Would definitely not mind trying this out.
I have built 0.9.8 from source before following the instructions here
https://royale.apache.org/source-code/
I checked out the branch "develop" and built the source.
My app uses maven.
How can I test this out ?
On Mon, Dec 27, 2021 at 2:12 PM Harbs <ha...@gmail.com> wrote:
> Yes. I made some changes which I’m hoping might help for modules.
>
> On Dec 27, 2021, at 3:06 PM, Roman Isitua <ro...@gmail.com> wrote:
>
> What feature are you referring to here ? Minification of modules ? Please
> clarify.
>
>
> On Mon, Dec 27, 2021 at 1:44 PM Harbs <ha...@gmail.com> wrote:
>
>> If you could try out the feature/ROYALE_INTERFACE_INFO branch and let me
>> know if that helps, it would be very helpful.
>>
>> You need to pull that branch both for royale-compiler and royale-asjs.
>>
>>
>> On Dec 27, 2021, at 2:04 PM, Roman Isitua <ro...@gmail.com> wrote:
>>
>> So I definitely need to figure out how to get modules working with
>> minification.
>>
>> I have also been following the threads on the developer list on
>> minification.
>>
>>
>>
>
Re: Load time is very slow
Posted by Harbs <ha...@gmail.com>.
Yes. I made some changes which I’m hoping might help for modules.
> On Dec 27, 2021, at 3:06 PM, Roman Isitua <ro...@gmail.com> wrote:
>
> What feature are you referring to here ? Minification of modules ? Please clarify.
>
>
> On Mon, Dec 27, 2021 at 1:44 PM Harbs <harbs.lists@gmail.com <ma...@gmail.com>> wrote:
> If you could try out the feature/ROYALE_INTERFACE_INFO branch and let me know if that helps, it would be very helpful.
>
> You need to pull that branch both for royale-compiler and royale-asjs.
>
>
>> On Dec 27, 2021, at 2:04 PM, Roman Isitua <romanisitua@gmail.com <ma...@gmail.com>> wrote:
>>
>> So I definitely need to figure out how to get modules working with minification.
>>
>> I have also been following the threads on the developer list on minification.
>
Re: Load time is very slow
Posted by Roman Isitua <ro...@gmail.com>.
What feature are you referring to here ? Minification of modules ? Please
clarify.
On Mon, Dec 27, 2021 at 1:44 PM Harbs <ha...@gmail.com> wrote:
> If you could try out the feature/ROYALE_INTERFACE_INFO branch and let me
> know if that helps, it would be very helpful.
>
> You need to pull that branch both for royale-compiler and royale-asjs.
>
>
> On Dec 27, 2021, at 2:04 PM, Roman Isitua <ro...@gmail.com> wrote:
>
> So I definitely need to figure out how to get modules working with
> minification.
>
> I have also been following the threads on the developer list on
> minification.
>
>
>
Re: Load time is very slow
Posted by Harbs <ha...@gmail.com>.
If you could try out the feature/ROYALE_INTERFACE_INFO branch and let me know if that helps, it would be very helpful.
You need to pull that branch both for royale-compiler and royale-asjs.
> On Dec 27, 2021, at 2:04 PM, Roman Isitua <ro...@gmail.com> wrote:
>
> So I definitely need to figure out how to get modules working with minification.
>
> I have also been following the threads on the developer list on minification.
Re: Load time is very slow
Posted by Harbs <ha...@gmail.com>.
Yes. This is one of the things I’d like to see happen in 2022.
It should even be possible to automatically load changed JS files in the browser without reloading the whole page (in some cases).
> On Dec 28, 2021, at 9:13 AM, Yishay Weiss <yi...@hotmail.com> wrote:
>
> > That said, I’d like for us to add incremental compiles which should make updates basically instant.
>
> That would be huge.
RE: Load time is very slow
Posted by Maria Jose Esteve <mj...@iest.com>.
Great ;P
thx
Hiedra
De: Harbs <ha...@gmail.com>
Enviado el: jueves, 13 de enero de 2022 0:28
Para: users@royale.apache.org
Asunto: Re: Load time is very slow
The branch is a breaking change (libraries will need to be recompiled to work after merging).
I still have some work to do, and it’ll likely be a couple/few weeks before I can get to that.
On Jan 13, 2022, at 1:25 AM, Maria Jose Esteve <mj...@iest.com>> wrote:
Hi, @Harb, the branches "feature/ROYALE_INTERFACE_INFO" are you going to merge them or were they test branches?
I still can't launch in release.
The actual test: All the code is in the main application project and I'm trying to solve some "new" problems with crux 😝
Hiedra
De: Maria Jose Esteve <mj...@iest.com>>
Enviado el: miércoles, 29 de diciembre de 2021 3:06
Para: users@royale.apache.org<ma...@royale.apache.org>
Asunto: RE: Load time is very slow
Sorry, the previous tests WERE NOT CORRECT because I was not in the ROYALE_INTERFACE_INFO branch of royale-asjs.
Now I have compiled in the correct branches of royale-compiler and royale-asjs and the result, in my case, is the same as before:
- Debug execution, everything ok
- Execution release error:
<image001.png>
MasterConfigSystemModel is in my library, inside one of the modules.
This result is the same as the build, develop, of the full SDK as of 23.12.2021.
Hiedra
De: Maria Jose Esteve <mj...@iest.com>>
Enviado el: miércoles, 29 de diciembre de 2021 1:20
Para: users@royale.apache.org<ma...@royale.apache.org>
Asunto: RE: Load time is very slow
Hi, Let me join you with these tests....
@Harb, I have compiled the SDK from this branch, feature/ROYALE_INTERFACE_INFO, and when running in debug I get this error:
Message on the PURGE CONSOLE is displayed:
Cannot convert org.apache.royale.reflection.beads.ClassAliasBead to IBead
Message in the IDE Window:
Se produjo una excepción: TypeError: Cannot convert [object Object] to IBead
at App.org.apache.royale.core.ElementWrapper.addBead (http://localhost:8080/WNetSuitePlus/org/apache/royale/core/ElementWrapper.js:114:11)
at App.org.apache.royale.core.HTMLElementWrapper.addBead (http://localhost:8080/WNetSuitePlus/org/apache/royale/core/HTMLElementWrapper.js:43:65)
at App.org.apache.royale.jewel.Application.start (http://localhost:8080/WNetSuitePlus/org/apache/royale/jewel/Application.js:246:10)
at App.App_loadXML (http://localhost:8080/WNetSuitePlus/App.js:1681:25)
at org.apache.royale.net.URLLoader.org.apache.royale.events.EventDispatcher.fireListeners (http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:97:23)
at Function.goog.events.EventTarget.dispatchEventInternal_ (http://localhost:8080/WNetSuitePlus/library/closure/goog/events/eventtarget.js:381:26)
at org.apache.royale.net.URLLoader.org.apache.royale.events.EventDispatcher.dispatchEvent (http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:72:37)
at org.apache.royale.net.URLLoader.jsEventHandler (http://localhost:8080/WNetSuitePlus/org/apache/royale/net/URLLoader.js:169:12)
Call stack:
<image002.png>
[INFO] Executing MXMLC in tool group Royale with args: [
-load-config=D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\compile-app-config.xml,
-js-default-initializers=true,
-source-map=true,
-js-dynamic-access-unknown-members=true,
-keep-as3-metadata+=Inject,Dispatcher,EventHandler,Event,PostConstruct,PreDestroy,ViewAdded,ViewRemoved,Bindable,Transient,
-keep-code-with-metadata=Inject,
-show-binding-warnings=false,
-export-public-symbols=false,
-prevent-rename-protected-symbols=false,
-prevent-rename-internal-symbols=false,
-js-output=D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\javascript,
-compiler.targets=JSRoyale,
D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\src\main\royale\App.mxml
The release execution does not change, the error is the same as before (SDK compilation from the develop branch):
Se produjo una excepción: ReferenceError: Error #1065: Variable com.iest.winplusweb.models.MasterConfigSystemModel is not defined.
at yR (http://localhost:8080/WPWebRelease/App.js:3605:1771)
at Mya (http://localhost:8080/WPWebRelease/App.js:3343:365)
at AR.J.usa (http://localhost:8080/WPWebRelease/App.js:434:441)
at GFa.J.fromTypeDefinition (http://localhost:8080/WPWebRelease/App.js:5706:139)
at Function.YT.getTypeDescriptor (http://localhost:8080/WPWebRelease/App.js:4570:820)
at Function.fX.constructBean (http://localhost:8080/WPWebRelease/App.js:2336:472)
at r$.J.initialize (http://localhost:8080/WPWebRelease/App.js:5041:66)
at OW.J.init (http://localhost:8080/WPWebRelease/App.js:950:452)
at OW.J.u (http://localhost:8080/WPWebRelease/App.js:951:454)
at $$.J.addBead (http://localhost:8080/WPWebRelease/App.js:357:549)
The main difference:
project compiled from "SDK-develop" runs fine in js-debug and gives error in js-release and, compiled from "SDK-ROYALE_INTERFACE_INFO" does not launch because of conversion error.
Hiedra
De: Roman Isitua <ro...@gmail.com>>
Enviado el: martes, 28 de diciembre de 2021 15:55
Para: users@royale.apache.org<ma...@royale.apache.org>
Asunto: Re: Load time is very slow
@Harb
I have checked out the feature/ROYALE_INTERFACE_INFO branch and compiled asjs and compiler. I have rebuilt my application with modules in release mode.
I get the following error when I attempt to launch a module
<image003.png>
The module loads fine in debug mode
<image004.png>
Snippets of the log
Overview.js:786 Uncaught TypeError: cm.valuesImpl.init is not a function
at Rr.Mr.yl (Overview.js:786)
at Function.iq.generateMXMLProperties (Overview.js:736)
at Rr.hq.generateMXMLAttributes (Overview.js:546)
at new Rr (Overview.js:804)
at LN.J.loadHandler (FrontEnd.js:1967)
Mr.yl @ Overview.js:786
iq.generateMXMLProperties @ Overview.js:736
hq.generateMXMLAttributes @ Overview.js:546
Rr @ Overview.js:804
J.loadHandler @ FrontEnd.js:1967
load (async)
LN.loadModule @ FrontEnd.js:1965
dN.loadModule @ FrontEnd.js:2406
LD.Un @ FrontEnd.js:1809
ny @ FrontEnd.js:123
ny @ FrontEnd.js:248
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
I have attached the full log to this email.
On Tue, Dec 28, 2021 at 2:51 PM Roman Isitua <ro...@gmail.com>> wrote:
Hi Maria,
Prior to starting this mail discussion "Load time is very slow". I can confirm I have only been compiling in debug mode. My target\javascript\bin\ only had js-debug. It was after I upgraded my royale sdk from 0.9.7 to 0.9.8 that I compiled in release mode.
On Tue, Dec 28, 2021 at 2:24 PM Maria Jose Esteve <mj...@iest.com>> wrote:
Hi, @Roman, I think you are doing a double compile can it be? My times are the same as yours and I always compile in debug and release.
Look at your target folder " target\javascript\bin\" and if you have two folders: js-debug and js-release you are compiling always double.
In my case, the architecture of my project as well as the Maven compilation files (pom.xml) were provided by an external company (we didn't know anything about Maven or Royale at that time) and I understand that this formula was chosen to show us the options we had.
A priori and without doing any test as Harb has done, I think that modularity gives us the advantage of compiling parts of the code once and not compiling them again if they are not modified. So far WITH MY COMPILATION TIMES, sometimes more than 1 minute, this is fundamental. But of course, now we have the problem of minification of the modules and it is really a serious problem because it is impossible for us to deploy in production.
I will try to separate the compiación realese with a profile and if I succeed I will pass it to you @Roman.
@Harb what do you mean by compiling the ROYALE_INTERFACE_INFO branch?
Hiedra
De: Harbs <ha...@gmail.com>>
Enviado el: lunes, 27 de diciembre de 2021 18:32
Para: users@royale.apache.org<ma...@royale.apache.org>
Asunto: Re: Load time is very slow
That doesn’t sound right.
Are you sure you’re compiling debug and not release? That sounds like release build times.
On Dec 27, 2021, at 3:31 PM, Roman Isitua <ro...@gmail.com>> wrote:
Wow ! You are using a workstation with a bleeding edge processor.
I just compiled my app now. It took 44 seconds. (First compilation after ide start up.) Subsequently compilations are usually 19s to 20s.
My application code base is very very small compared to yours. As we continue to add functionality, I expect the compile times to rise.
Re: Load time is very slow
Posted by Harbs <ha...@gmail.com>.
The branch is a breaking change (libraries will need to be recompiled to work after merging).
I still have some work to do, and it’ll likely be a couple/few weeks before I can get to that.
> On Jan 13, 2022, at 1:25 AM, Maria Jose Esteve <mj...@iest.com> wrote:
>
> Hi, @Harb, the branches "feature/ROYALE_INTERFACE_INFO" are you going to merge them or were they test branches?
>
> I still can't launch in release.
> The actual test: All the code is in the main application project and I'm trying to solve some "new" problems with crux 😝
>
> Hiedra
>
> De: Maria Jose Esteve <mjesteve@iest.com <ma...@iest.com>>
> Enviado el: miércoles, 29 de diciembre de 2021 3:06
> Para: users@royale.apache.org <ma...@royale.apache.org>
> Asunto: RE: Load time is very slow
>
> Sorry, the previous tests WERE NOT CORRECT because I was not in the ROYALE_INTERFACE_INFO branch of royale-asjs.
> Now I have compiled in the correct branches of royale-compiler and royale-asjs and the result, in my case, is the same as before:
> - Debug execution, everything ok
> - Execution release error:
>
> <image001.png>
>
> MasterConfigSystemModel is in my library, inside one of the modules.
>
> This result is the same as the build, develop, of the full SDK as of 23.12.2021.
>
> Hiedra
>
> De: Maria Jose Esteve <mjesteve@iest.com <ma...@iest.com>>
> Enviado el: miércoles, 29 de diciembre de 2021 1:20
> Para: users@royale.apache.org <ma...@royale.apache.org>
> Asunto: RE: Load time is very slow
>
> Hi, Let me join you with these tests....
>
> @Harb, I have compiled the SDK from this branch, feature/ROYALE_INTERFACE_INFO, and when running in debug I get this error:
>
> Message on the PURGE CONSOLE is displayed:
>
> Cannot convert org.apache.royale.reflection.beads.ClassAliasBead to IBead
>
> Message in the IDE Window:
>
> Se produjo una excepción: TypeError: Cannot convert [object Object] to IBead
> at App.org.apache.royale.core.ElementWrapper.addBead (http://localhost:8080/WNetSuitePlus/org/apache/royale/core/ElementWrapper.js:114:11 <http://localhost:8080/WNetSuitePlus/org/apache/royale/core/ElementWrapper.js:114:11>)
> at App.org.apache.royale.core.HTMLElementWrapper.addBead (http://localhost:8080/WNetSuitePlus/org/apache/royale/core/HTMLElementWrapper.js:43:65 <http://localhost:8080/WNetSuitePlus/org/apache/royale/core/HTMLElementWrapper.js:43:65>)
> at App.org.apache.royale.jewel.Application.start (http://localhost:8080/WNetSuitePlus/org/apache/royale/jewel/Application.js:246:10 <http://localhost:8080/WNetSuitePlus/org/apache/royale/jewel/Application.js:246:10>)
> at App.App_loadXML (http://localhost:8080/WNetSuitePlus/App.js:1681:25 <http://localhost:8080/WNetSuitePlus/App.js:1681:25>)
> at org.apache.royale.net.URLLoader.org.apache.royale.events.EventDispatcher.fireListeners (http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:97:23 <http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:97:23>)
> at Function.goog.events.EventTarget.dispatchEventInternal_ (http://localhost:8080/WNetSuitePlus/library/closure/goog/events/eventtarget.js:381:26 <http://localhost:8080/WNetSuitePlus/library/closure/goog/events/eventtarget.js:381:26>)
> at org.apache.royale.net.URLLoader.org.apache.royale.events.EventDispatcher.dispatchEvent (http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:72:37 <http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:72:37>)
> at org.apache.royale.net.URLLoader.jsEventHandler (http://localhost:8080/WNetSuitePlus/org/apache/royale/net/URLLoader.js:169:12 <http://localhost:8080/WNetSuitePlus/org/apache/royale/net/URLLoader.js:169:12>)
>
> Call stack:
>
> <image002.png>
>
> [INFO] Executing MXMLC in tool group Royale with args: [
> -load-config=D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\compile-app-config.xml,
> -js-default-initializers=true,
> -source-map=true,
> -js-dynamic-access-unknown-members=true,
> -keep-as3-metadata+=Inject,Dispatcher,EventHandler,Event,PostConstruct,PreDestroy,ViewAdded,ViewRemoved,Bindable,Transient,
> -keep-code-with-metadata=Inject,
> -show-binding-warnings=false,
> -export-public-symbols=false,
> -prevent-rename-protected-symbols=false,
> -prevent-rename-internal-symbols=false,
> -js-output=D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\javascript,
> -compiler.targets=JSRoyale,
> D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\src\main\royale\App.mxml
>
>
> The release execution does not change, the error is the same as before (SDK compilation from the develop branch):
>
> Se produjo una excepción: ReferenceError: Error #1065: Variable com.iest.winplusweb.models.MasterConfigSystemModel is not defined.
> at yR (http://localhost:8080/WPWebRelease/App.js:3605:1771 <http://localhost:8080/WPWebRelease/App.js:3605:1771>)
> at Mya (http://localhost:8080/WPWebRelease/App.js:3343:365 <http://localhost:8080/WPWebRelease/App.js:3343:365>)
> at AR.J.usa (http://localhost:8080/WPWebRelease/App.js:434:441 <http://localhost:8080/WPWebRelease/App.js:434:441>)
> at GFa.J.fromTypeDefinition (http://localhost:8080/WPWebRelease/App.js:5706:139 <http://localhost:8080/WPWebRelease/App.js:5706:139>)
> at Function.YT.getTypeDescriptor (http://localhost:8080/WPWebRelease/App.js:4570:820 <http://localhost:8080/WPWebRelease/App.js:4570:820>)
> at Function.fX.constructBean (http://localhost:8080/WPWebRelease/App.js:2336:472 <http://localhost:8080/WPWebRelease/App.js:2336:472>)
> at r$.J.initialize (http://localhost:8080/WPWebRelease/App.js:5041:66 <http://localhost:8080/WPWebRelease/App.js:5041:66>)
> at OW.J.init (http://localhost:8080/WPWebRelease/App.js:950:452 <http://localhost:8080/WPWebRelease/App.js:950:452>)
> at OW.J.u (http://localhost:8080/WPWebRelease/App.js:951:454 <http://localhost:8080/WPWebRelease/App.js:951:454>)
> at $$.J.addBead (http://localhost:8080/WPWebRelease/App.js:357:549 <http://localhost:8080/WPWebRelease/App.js:357:549>)
>
> The main difference:
> project compiled from "SDK-develop" runs fine in js-debug and gives error in js-release and, compiled from "SDK-ROYALE_INTERFACE_INFO" does not launch because of conversion error.
>
> Hiedra
>
> De: Roman Isitua <romanisitua@gmail.com <ma...@gmail.com>>
> Enviado el: martes, 28 de diciembre de 2021 15:55
> Para: users@royale.apache.org <ma...@royale.apache.org>
> Asunto: Re: Load time is very slow
>
> @Harb
>
> I have checked out the feature/ROYALE_INTERFACE_INFO branch and compiled asjs and compiler. I have rebuilt my application with modules in release mode.
>
> I get the following error when I attempt to launch a module
>
>
> <image003.png>
>
>
> The module loads fine in debug mode
>
> <image004.png>
>
>
> Snippets of the log
>
> Overview.js:786 Uncaught TypeError: cm.valuesImpl.init is not a function
> at Rr.Mr.yl (Overview.js:786)
> at Function.iq.generateMXMLProperties (Overview.js:736)
> at Rr.hq.generateMXMLAttributes (Overview.js:546)
> at new Rr (Overview.js:804)
> at LN.J.loadHandler (FrontEnd.js:1967)
> Mr.yl @ Overview.js:786
> iq.generateMXMLProperties @ Overview.js:736
> hq.generateMXMLAttributes @ Overview.js:546
> Rr @ Overview.js:804
> J.loadHandler @ FrontEnd.js:1967
> load (async)
> LN.loadModule @ FrontEnd.js:1965
> dN.loadModule @ FrontEnd.js:2406
> LD.Un @ FrontEnd.js:1809
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:248
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
>
>
> I have attached the full log to this email.
>
>
>
>
> On Tue, Dec 28, 2021 at 2:51 PM Roman Isitua <romanisitua@gmail.com <ma...@gmail.com>> wrote:
> Hi Maria,
>
> Prior to starting this mail discussion "Load time is very slow". I can confirm I have only been compiling in debug mode. My target\javascript\bin\ only had js-debug. It was after I upgraded my royale sdk from 0.9.7 to 0.9.8 that I compiled in release mode.
>
>
>
> On Tue, Dec 28, 2021 at 2:24 PM Maria Jose Esteve <mjesteve@iest.com <ma...@iest.com>> wrote:
> Hi, @Roman, I think you are doing a double compile can it be? My times are the same as yours and I always compile in debug and release.
>
> Look at your target folder " target\javascript\bin\" and if you have two folders: js-debug and js-release you are compiling always double.
>
> In my case, the architecture of my project as well as the Maven compilation files (pom.xml) were provided by an external company (we didn't know anything about Maven or Royale at that time) and I understand that this formula was chosen to show us the options we had.
>
> A priori and without doing any test as Harb has done, I think that modularity gives us the advantage of compiling parts of the code once and not compiling them again if they are not modified. So far WITH MY COMPILATION TIMES, sometimes more than 1 minute, this is fundamental. But of course, now we have the problem of minification of the modules and it is really a serious problem because it is impossible for us to deploy in production.
>
> I will try to separate the compiación realese with a profile and if I succeed I will pass it to you @Roman.
>
> @Harb what do you mean by compiling the ROYALE_INTERFACE_INFO branch?
>
> Hiedra
>
> De: Harbs <harbs.lists@gmail.com <ma...@gmail.com>>
> Enviado el: lunes, 27 de diciembre de 2021 18:32
> Para: users@royale.apache.org <ma...@royale.apache.org>
> Asunto: Re: Load time is very slow
>
> That doesn’t sound right.
>
> Are you sure you’re compiling debug and not release? That sounds like release build times.
>
>
> On Dec 27, 2021, at 3:31 PM, Roman Isitua <romanisitua@gmail.com <ma...@gmail.com>> wrote:
>
> Wow ! You are using a workstation with a bleeding edge processor.
>
> I just compiled my app now. It took 44 seconds. (First compilation after ide start up.) Subsequently compilations are usually 19s to 20s.
>
> My application code base is very very small compared to yours. As we continue to add functionality, I expect the compile times to rise.
>
>
RE: Load time is very slow
Posted by Maria Jose Esteve <mj...@iest.com>.
Hi, @Harb, the branches "feature/ROYALE_INTERFACE_INFO" are you going to merge them or were they test branches?
I still can't launch in release.
The actual test: All the code is in the main application project and I'm trying to solve some "new" problems with crux 😝
Hiedra
De: Maria Jose Esteve <mj...@iest.com>
Enviado el: miércoles, 29 de diciembre de 2021 3:06
Para: users@royale.apache.org
Asunto: RE: Load time is very slow
Sorry, the previous tests WERE NOT CORRECT because I was not in the ROYALE_INTERFACE_INFO branch of royale-asjs.
Now I have compiled in the correct branches of royale-compiler and royale-asjs and the result, in my case, is the same as before:
- Debug execution, everything ok
- Execution release error:
[cid:image001.png@01D80814.0DC96460]
MasterConfigSystemModel is in my library, inside one of the modules.
This result is the same as the build, develop, of the full SDK as of 23.12.2021.
Hiedra
De: Maria Jose Esteve <mj...@iest.com>>
Enviado el: miércoles, 29 de diciembre de 2021 1:20
Para: users@royale.apache.org<ma...@royale.apache.org>
Asunto: RE: Load time is very slow
Hi, Let me join you with these tests....
@Harb, I have compiled the SDK from this branch, feature/ROYALE_INTERFACE_INFO, and when running in debug I get this error:
Message on the PURGE CONSOLE is displayed:
Cannot convert org.apache.royale.reflection.beads.ClassAliasBead to IBead
Message in the IDE Window:
Se produjo una excepción: TypeError: Cannot convert [object Object] to IBead
at App.org.apache.royale.core.ElementWrapper.addBead (http://localhost:8080/WNetSuitePlus/org/apache/royale/core/ElementWrapper.js:114:11)
at App.org.apache.royale.core.HTMLElementWrapper.addBead (http://localhost:8080/WNetSuitePlus/org/apache/royale/core/HTMLElementWrapper.js:43:65)
at App.org.apache.royale.jewel.Application.start (http://localhost:8080/WNetSuitePlus/org/apache/royale/jewel/Application.js:246:10)
at App.App_loadXML (http://localhost:8080/WNetSuitePlus/App.js:1681:25)
at org.apache.royale.net.URLLoader.org.apache.royale.events.EventDispatcher.fireListeners (http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:97:23)
at Function.goog.events.EventTarget.dispatchEventInternal_ (http://localhost:8080/WNetSuitePlus/library/closure/goog/events/eventtarget.js:381:26)
at org.apache.royale.net.URLLoader.org.apache.royale.events.EventDispatcher.dispatchEvent (http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:72:37)
at org.apache.royale.net.URLLoader.jsEventHandler (http://localhost:8080/WNetSuitePlus/org/apache/royale/net/URLLoader.js:169:12)
Call stack:
[cid:image002.png@01D80814.0DC96460]
[INFO] Executing MXMLC in tool group Royale with args: [
-load-config=D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\compile-app-config.xml,
-js-default-initializers=true,
-source-map=true,
-js-dynamic-access-unknown-members=true,
-keep-as3-metadata+=Inject,Dispatcher,EventHandler,Event,PostConstruct,PreDestroy,ViewAdded,ViewRemoved,Bindable,Transient,
-keep-code-with-metadata=Inject,
-show-binding-warnings=false,
-export-public-symbols=false,
-prevent-rename-protected-symbols=false,
-prevent-rename-internal-symbols=false,
-js-output=D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\javascript,
-compiler.targets=JSRoyale,
D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\src\main\royale\App.mxml
The release execution does not change, the error is the same as before (SDK compilation from the develop branch):
Se produjo una excepción: ReferenceError: Error #1065: Variable com.iest.winplusweb.models.MasterConfigSystemModel is not defined.
at yR (http://localhost:8080/WPWebRelease/App.js:3605:1771)
at Mya (http://localhost:8080/WPWebRelease/App.js:3343:365)
at AR.J.usa (http://localhost:8080/WPWebRelease/App.js:434:441)
at GFa.J.fromTypeDefinition (http://localhost:8080/WPWebRelease/App.js:5706:139)
at Function.YT.getTypeDescriptor (http://localhost:8080/WPWebRelease/App.js:4570:820)
at Function.fX.constructBean (http://localhost:8080/WPWebRelease/App.js:2336:472)
at r$.J.initialize (http://localhost:8080/WPWebRelease/App.js:5041:66)
at OW.J.init (http://localhost:8080/WPWebRelease/App.js:950:452)
at OW.J.u (http://localhost:8080/WPWebRelease/App.js:951:454)
at $$.J.addBead (http://localhost:8080/WPWebRelease/App.js:357:549)
The main difference:
project compiled from "SDK-develop" runs fine in js-debug and gives error in js-release and, compiled from "SDK-ROYALE_INTERFACE_INFO" does not launch because of conversion error.
Hiedra
De: Roman Isitua <ro...@gmail.com>>
Enviado el: martes, 28 de diciembre de 2021 15:55
Para: users@royale.apache.org<ma...@royale.apache.org>
Asunto: Re: Load time is very slow
@Harb
I have checked out the feature/ROYALE_INTERFACE_INFO branch and compiled asjs and compiler. I have rebuilt my application with modules in release mode.
I get the following error when I attempt to launch a module
[cid:image003.png@01D80814.0DC96460]
The module loads fine in debug mode
[cid:image004.png@01D80814.0DC96460]
Snippets of the log
Overview.js:786 Uncaught TypeError: cm.valuesImpl.init is not a function
at Rr.Mr.yl (Overview.js:786)
at Function.iq.generateMXMLProperties (Overview.js:736)
at Rr.hq.generateMXMLAttributes (Overview.js:546)
at new Rr (Overview.js:804)
at LN.J.loadHandler (FrontEnd.js:1967)
Mr.yl @ Overview.js:786
iq.generateMXMLProperties @ Overview.js:736
hq.generateMXMLAttributes @ Overview.js:546
Rr @ Overview.js:804
J.loadHandler @ FrontEnd.js:1967
load (async)
LN.loadModule @ FrontEnd.js:1965
dN.loadModule @ FrontEnd.js:2406
LD.Un @ FrontEnd.js:1809
ny @ FrontEnd.js:123
ny @ FrontEnd.js:248
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
I have attached the full log to this email.
On Tue, Dec 28, 2021 at 2:51 PM Roman Isitua <ro...@gmail.com>> wrote:
Hi Maria,
Prior to starting this mail discussion "Load time is very slow". I can confirm I have only been compiling in debug mode. My target\javascript\bin\ only had js-debug. It was after I upgraded my royale sdk from 0.9.7 to 0.9.8 that I compiled in release mode.
On Tue, Dec 28, 2021 at 2:24 PM Maria Jose Esteve <mj...@iest.com>> wrote:
Hi, @Roman, I think you are doing a double compile can it be? My times are the same as yours and I always compile in debug and release.
Look at your target folder " target\javascript\bin\" and if you have two folders: js-debug and js-release you are compiling always double.
In my case, the architecture of my project as well as the Maven compilation files (pom.xml) were provided by an external company (we didn't know anything about Maven or Royale at that time) and I understand that this formula was chosen to show us the options we had.
A priori and without doing any test as Harb has done, I think that modularity gives us the advantage of compiling parts of the code once and not compiling them again if they are not modified. So far WITH MY COMPILATION TIMES, sometimes more than 1 minute, this is fundamental. But of course, now we have the problem of minification of the modules and it is really a serious problem because it is impossible for us to deploy in production.
I will try to separate the compiación realese with a profile and if I succeed I will pass it to you @Roman.
@Harb what do you mean by compiling the ROYALE_INTERFACE_INFO branch?
Hiedra
De: Harbs <ha...@gmail.com>>
Enviado el: lunes, 27 de diciembre de 2021 18:32
Para: users@royale.apache.org<ma...@royale.apache.org>
Asunto: Re: Load time is very slow
That doesn’t sound right.
Are you sure you’re compiling debug and not release? That sounds like release build times.
On Dec 27, 2021, at 3:31 PM, Roman Isitua <ro...@gmail.com>> wrote:
Wow ! You are using a workstation with a bleeding edge processor.
I just compiled my app now. It took 44 seconds. (First compilation after ide start up.) Subsequently compilations are usually 19s to 20s.
My application code base is very very small compared to yours. As we continue to add functionality, I expect the compile times to rise.
RE: Load time is very slow
Posted by Maria Jose Esteve <mj...@iest.com>.
Sorry, the previous tests WERE NOT CORRECT because I was not in the ROYALE_INTERFACE_INFO branch of royale-asjs.
Now I have compiled in the correct branches of royale-compiler and royale-asjs and the result, in my case, is the same as before:
- Debug execution, everything ok
- Execution release error:
[cid:image004.png@01D7FC60.F03F28D0]
MasterConfigSystemModel is in my library, inside one of the modules.
This result is the same as the build, develop, of the full SDK as of 23.12.2021.
Hiedra
De: Maria Jose Esteve <mj...@iest.com>
Enviado el: miércoles, 29 de diciembre de 2021 1:20
Para: users@royale.apache.org
Asunto: RE: Load time is very slow
Hi, Let me join you with these tests....
@Harb, I have compiled the SDK from this branch, feature/ROYALE_INTERFACE_INFO, and when running in debug I get this error:
Message on the PURGE CONSOLE is displayed:
Cannot convert org.apache.royale.reflection.beads.ClassAliasBead to IBead
Message in the IDE Window:
Se produjo una excepción: TypeError: Cannot convert [object Object] to IBead
at App.org.apache.royale.core.ElementWrapper.addBead (http://localhost:8080/WNetSuitePlus/org/apache/royale/core/ElementWrapper.js:114:11)
at App.org.apache.royale.core.HTMLElementWrapper.addBead (http://localhost:8080/WNetSuitePlus/org/apache/royale/core/HTMLElementWrapper.js:43:65)
at App.org.apache.royale.jewel.Application.start (http://localhost:8080/WNetSuitePlus/org/apache/royale/jewel/Application.js:246:10)
at App.App_loadXML (http://localhost:8080/WNetSuitePlus/App.js:1681:25)
at org.apache.royale.net.URLLoader.org.apache.royale.events.EventDispatcher.fireListeners (http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:97:23)
at Function.goog.events.EventTarget.dispatchEventInternal_ (http://localhost:8080/WNetSuitePlus/library/closure/goog/events/eventtarget.js:381:26)
at org.apache.royale.net.URLLoader.org.apache.royale.events.EventDispatcher.dispatchEvent (http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:72:37)
at org.apache.royale.net.URLLoader.jsEventHandler (http://localhost:8080/WNetSuitePlus/org/apache/royale/net/URLLoader.js:169:12)
Call stack:
[cid:image005.png@01D7FC60.F03F28D0]
[INFO] Executing MXMLC in tool group Royale with args: [
-load-config=D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\compile-app-config.xml,
-js-default-initializers=true,
-source-map=true,
-js-dynamic-access-unknown-members=true,
-keep-as3-metadata+=Inject,Dispatcher,EventHandler,Event,PostConstruct,PreDestroy,ViewAdded,ViewRemoved,Bindable,Transient,
-keep-code-with-metadata=Inject,
-show-binding-warnings=false,
-export-public-symbols=false,
-prevent-rename-protected-symbols=false,
-prevent-rename-internal-symbols=false,
-js-output=D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\javascript,
-compiler.targets=JSRoyale,
D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\src\main\royale\App.mxml
The release execution does not change, the error is the same as before (SDK compilation from the develop branch):
Se produjo una excepción: ReferenceError: Error #1065: Variable com.iest.winplusweb.models.MasterConfigSystemModel is not defined.
at yR (http://localhost:8080/WPWebRelease/App.js:3605:1771)
at Mya (http://localhost:8080/WPWebRelease/App.js:3343:365)
at AR.J.usa (http://localhost:8080/WPWebRelease/App.js:434:441)
at GFa.J.fromTypeDefinition (http://localhost:8080/WPWebRelease/App.js:5706:139)
at Function.YT.getTypeDescriptor (http://localhost:8080/WPWebRelease/App.js:4570:820)
at Function.fX.constructBean (http://localhost:8080/WPWebRelease/App.js:2336:472)
at r$.J.initialize (http://localhost:8080/WPWebRelease/App.js:5041:66)
at OW.J.init (http://localhost:8080/WPWebRelease/App.js:950:452)
at OW.J.u (http://localhost:8080/WPWebRelease/App.js:951:454)
at $$.J.addBead (http://localhost:8080/WPWebRelease/App.js:357:549)
The main difference:
project compiled from "SDK-develop" runs fine in js-debug and gives error in js-release and, compiled from "SDK-ROYALE_INTERFACE_INFO" does not launch because of conversion error.
Hiedra
De: Roman Isitua <ro...@gmail.com>>
Enviado el: martes, 28 de diciembre de 2021 15:55
Para: users@royale.apache.org<ma...@royale.apache.org>
Asunto: Re: Load time is very slow
@Harb
I have checked out the feature/ROYALE_INTERFACE_INFO branch and compiled asjs and compiler. I have rebuilt my application with modules in release mode.
I get the following error when I attempt to launch a module
[cid:image006.png@01D7FC60.F03F28D0]
The module loads fine in debug mode
[cid:image007.png@01D7FC60.F03F28D0]
Snippets of the log
Overview.js:786 Uncaught TypeError: cm.valuesImpl.init is not a function
at Rr.Mr.yl (Overview.js:786)
at Function.iq.generateMXMLProperties (Overview.js:736)
at Rr.hq.generateMXMLAttributes (Overview.js:546)
at new Rr (Overview.js:804)
at LN.J.loadHandler (FrontEnd.js:1967)
Mr.yl @ Overview.js:786
iq.generateMXMLProperties @ Overview.js:736
hq.generateMXMLAttributes @ Overview.js:546
Rr @ Overview.js:804
J.loadHandler @ FrontEnd.js:1967
load (async)
LN.loadModule @ FrontEnd.js:1965
dN.loadModule @ FrontEnd.js:2406
LD.Un @ FrontEnd.js:1809
ny @ FrontEnd.js:123
ny @ FrontEnd.js:248
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
I have attached the full log to this email.
On Tue, Dec 28, 2021 at 2:51 PM Roman Isitua <ro...@gmail.com>> wrote:
Hi Maria,
Prior to starting this mail discussion "Load time is very slow". I can confirm I have only been compiling in debug mode. My target\javascript\bin\ only had js-debug. It was after I upgraded my royale sdk from 0.9.7 to 0.9.8 that I compiled in release mode.
On Tue, Dec 28, 2021 at 2:24 PM Maria Jose Esteve <mj...@iest.com>> wrote:
Hi, @Roman, I think you are doing a double compile can it be? My times are the same as yours and I always compile in debug and release.
Look at your target folder " target\javascript\bin\" and if you have two folders: js-debug and js-release you are compiling always double.
In my case, the architecture of my project as well as the Maven compilation files (pom.xml) were provided by an external company (we didn't know anything about Maven or Royale at that time) and I understand that this formula was chosen to show us the options we had.
A priori and without doing any test as Harb has done, I think that modularity gives us the advantage of compiling parts of the code once and not compiling them again if they are not modified. So far WITH MY COMPILATION TIMES, sometimes more than 1 minute, this is fundamental. But of course, now we have the problem of minification of the modules and it is really a serious problem because it is impossible for us to deploy in production.
I will try to separate the compiación realese with a profile and if I succeed I will pass it to you @Roman.
@Harb what do you mean by compiling the ROYALE_INTERFACE_INFO branch?
Hiedra
De: Harbs <ha...@gmail.com>>
Enviado el: lunes, 27 de diciembre de 2021 18:32
Para: users@royale.apache.org<ma...@royale.apache.org>
Asunto: Re: Load time is very slow
That doesn’t sound right.
Are you sure you’re compiling debug and not release? That sounds like release build times.
On Dec 27, 2021, at 3:31 PM, Roman Isitua <ro...@gmail.com>> wrote:
Wow ! You are using a workstation with a bleeding edge processor.
I just compiled my app now. It took 44 seconds. (First compilation after ide start up.) Subsequently compilations are usually 19s to 20s.
My application code base is very very small compared to yours. As we continue to add functionality, I expect the compile times to rise.
Re: Compiling Modules (was Re: Load time is very slow)
Posted by Harbs <ha...@gmail.com>.
Source maps just reference the original code from the minimized code. Sometimes it helps, and sometimes not. Let’s not focus on that.
Let’s figure out why it can’t find your Model class.
Set your browser tools to break on exceptions. That will allow you to examine the variables and see what’s what.
> On Dec 30, 2021, at 9:43 PM, Maria Jose Esteve <mj...@iest.com> wrote:
>
> Search for “com.iest.winplusweb.models.MasterConfigSystemModel “ in App.js ¿:
> It does appear
> ,jn='com.iest.winplusweb.models.MasterConfigSystemModel',
> Same, it does appear
> ,jn='com.iest.winplusweb.models.MasterConfigSystemModel',
>
> By "compiled code" do you mean App.js or something else?
> Why in "develop" it refers to the js-debug folder and in ROYALE_INTERFACE_INFO it refers to js-release which is correct?
>
> I remove the option "-source-map-source-root=${project.basedir}/src/main/royale/" and the Error looks the same BUT now the console errors have been swapped: In A it now references js-debug and in B it now references js-release. I DON'T UNDERSTAND ANYTHING, FORGIVE ME.
>
> Console:
> Uncaught ReferenceError: Error #1065: Variable com.iest.winplusweb.models.MasterConfigSystemModel is not defined.
> MQ @ d:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\javascript\bin\js-debug\org\apache\royale\reflection\getDefinitionByName.js:61:11
> Console:
> Uncaught ReferenceError: Error #1065: Variable com.iest.winplusweb.models.MasterConfigSystemModel is not defined.
> MQ @ D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\javascript\bin\js-release\App.js:4313:1727
>
> Hiedra
>
> De: Harbs <ha...@gmail.com>
> Enviado el: jueves, 30 de diciembre de 2021 19:59
> Para: users@royale.apache.org
> Asunto: Re: Compiling Modules (was Re: Load time is very slow)
>
> It appears to be the same error. Your message in B is probably diufferent because you have source maps.
>
> getDefinitionByName() cannot find com.iest.winplusweb.models.MasterConfigSystemModel.
>
> Does that string exist in your compiled code? If not, the compiler probably thought it was dead code for some reason and removed it.
>
>
> On Dec 30, 2021, at 8:46 PM, Maria Jose Esteve <mjesteve@iest.com <ma...@iest.com>> wrote:
>
> No Harb, we have in common the Maven compilation and the use of Maven modules.
> But I take this opportunity to show you a "curious" test, look at the error displayed in the Debug Console... (The sdk compiled from develop the error references the js-debug folder, even though it is running from js-release)
>
> A : SDK compiled on branch ROYALE_INTERFACE_INFO
> B: SDK compiled on branch develop
>
> Test 1) Basic:
> Additional options in the Library (mvn modules) and in the main application:
>
> -source-map=true;
> -show-binding-warnings=false;
> -source-map-source-root=${project.basedir}/src/main/royale/; <!—This option is not in the pom of the main application, only in the library -->
>
> -js-default-initializers=true;
> -js-dynamic-access-unknown-members=true;
>
> -keep-as3-metadata+=Inject,Dispatcher,EventHandler,Event,PostConstruct,PreDestroy,ViewAdded,ViewRemoved,Bindable,Transient;
> -keep-code-with-metadata=Inject;
>
> A.
> DEBUG: OK
> RELEASE: Error
> Se produjo una excepción: ReferenceError: Error #1065: Variable com.iest.winplusweb.models.MasterConfigSystemModel is not defined.
> at MQ (http://localhost:8080/WPWebRelease/App.js:4315:1727 <http://localhost:8080/WPWebRelease/App.js:4315:1727>)
> at Function.I$.getMetadataHost (http://localhost:8080/WPWebRelease/App.js:6303:45 <http://localhost:8080/WPWebRelease/App.js:6303:45>)
> at F9.getMetadataHost (http://localhost:8080/WPWebRelease/App.js:6711:147 <http://localhost:8080/WPWebRelease/App.js:6711:147>)
> at F9.getMetadataHosts (http://localhost:8080/WPWebRelease/App.js:6710:299 <http://localhost:8080/WPWebRelease/App.js:6710:299>)
> at F9.fromTypeDefinition (http://localhost:8080/WPWebRelease/App.js:6711:381 <http://localhost:8080/WPWebRelease/App.js:6711:381>)
> at Function.dT.getTypeDescriptor (http://localhost:8080/WPWebRelease/App.js:5469:885 <http://localhost:8080/WPWebRelease/App.js:5469:885>)
> at Function.GW.constructBean (http://localhost:8080/WPWebRelease/App.js:2753:296 <http://localhost:8080/WPWebRelease/App.js:2753:296>)
> at n$.initializeBeans (http://localhost:8080/WPWebRelease/App.js:5994:1046 <http://localhost:8080/WPWebRelease/App.js:5994:1046>)
> at n$.initialize (http://localhost:8080/WPWebRelease/App.js:5994:915 <http://localhost:8080/WPWebRelease/App.js:5994:915>)
> at oW.constructProviders (http://localhost:8080/WPWebRelease/App.js:1152:254 <http://localhost:8080/WPWebRelease/App.js:1152:254>)
>
> Message in Console:
> Uncaught ReferenceError: Error #1065: Variable com.iest.winplusweb.models.MasterConfigSystemModel is not defined.
> MQ @ D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\javascript\bin\js-release\App.js:4315:1727
>
> B.
> DEBUG:OK
> RELEASE: Same error
> Message in Console:
> Uncaught ReferenceError: Error #1065: Variable com.iest.winplusweb.models.MasterConfigSystemModel is not defined.
> MQ @ d:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\javascript\bin\js-debug\org\apache\royale\reflection\getDefinitionByName.js:61:11
>
>
> Hiedra
>
> De: Harbs <harbs.lists@gmail.com <ma...@gmail.com>>
> Enviado el: jueves, 30 de diciembre de 2021 19:42
> Para: users@royale.apache.org <ma...@royale.apache.org>
> Asunto: Re: Compiling Modules (was Re: Load time is very slow)
>
> Wait. I’m confused.
>
> Does your app work? I’m assuming that your app is not the same as Roman’s.
>
>
>
> On Dec 30, 2021, at 8:07 PM, Maria Jose Esteve <mjesteve@iest.com <ma...@iest.com>> wrote:
>
> I was preparing an email with a battery of tests but I don't use any configuration or property files... maybe I'd better stop and read it to you.
>
> Hiedra
>
> De: Harbs <harbs.lists@gmail.com <ma...@gmail.com>>
> Enviado el: jueves, 30 de diciembre de 2021 18:56
> Para: users@royale.apache.org <ma...@royale.apache.org>
> Asunto: Re: Compiling Modules (was Re: Load time is very slow)
>
> 1. I’d get rid of the agressive minification options. It will likely cause issues. If you get it to work without those options, you can try to add them back in and see if it still works.
> 2. You seem to be missing the compiler options explained here: https://apache.github.io/royale-docs/features/modules#minification <https://apache.github.io/royale-docs/features/modules#minification>
>
> For a pom, it would look something like this (adjust your paths to match your setup):
>
> Main app:
> <additionalCompilerOptions>-source-map=true;-js-compiler-option=--variable_map_output_file gccvars.txt;-js-compiler-option+=--property_map_output_file gccprops.txt</additionalCompilerOptions>
>
> Module:
> <additionalCompilerOptions>-source-map=true;-js-compiler-option=--variable_map_input_file ../../../../../MainApp/bin/js-release/gccvars.txt;-js-compiler-option+=--property_map_input_file ../../../../../MainApp/bin/js-release/gccprops.txt</additionalCompilerOptions>
>
> On Dec 30, 2021, at 7:43 PM, Roman Isitua <romanisitua@gmail.com <ma...@gmail.com>> wrote:
>
> I think it will be better for me to share my pom's that way you can see all the compilation options used. The pom for the parent (FmClient2), the MainApp and one module (Overview) have been attached to this email.
>
>
> On Thu, Dec 30, 2021 at 6:22 PM Harbs <harbs.lists@gmail.com <ma...@gmail.com>> wrote:
> Roman, can you share your full compiler options?
>
> I decided to remove the below settings completely
> -export-public-symbols=false
> -prevent-rename-protected-symbols=false
> -prevent-rename-public-symbols=false
> -prevent-rename-internal-symbols=false
>
>
> I enabled the below settings
>
> -js-dynamic-access-unknown-members=true;
> -js-default-initializers=true
>
>
> The release version starts up
>
> Hiedra, that’s great!
>
>
>
>
> On Dec 30, 2021, at 7:15 PM, Roman Isitua <romanisitua@gmail.com <ma...@gmail.com>> wrote:
>
>
> Yes. I am testing with the sdk compiled on branch ROYALE_INTERFACE_INFO
>
> On Thu, Dec 30, 2021 at 6:10 PM Maria Jose Esteve <mjesteve@iest.com <ma...@iest.com>> wrote:
> Roman, are you testing with the SDK compiled from the Harb branches, ROYALE_INTERFACE_INFO, or from develop?
>
> Hiedra
>
> De: Roman Isitua <romanisitua@gmail.com <ma...@gmail.com>>
> Enviado el: jueves, 30 de diciembre de 2021 16:52
> Para: users@royale.apache.org <ma...@royale.apache.org>
> Asunto: Re: Compiling Modules (was Re: Load time is very slow)
>
> I decided to remove the below settings completely
> -export-public-symbols=false
> -prevent-rename-protected-symbols=false
> -prevent-rename-public-symbols=false
> -prevent-rename-internal-symbols=false
>
>
> I enabled the below settings
>
> -js-dynamic-access-unknown-members=true;
> -js-default-initializers=true
>
>
> The release version starts up
>
>
>
> <image001.png>
>
>
> <image002.png>
>
> However, the moment I launch a module. I get the below error
>
> <image003.png>
>
>
> It appears to be failing when I launch the "Overview" module (by clicking the Overview side menu).
>
> So my current observation is that by retaining only two settings
>
> -js-dynamic-access-unknown-members=true;
> -js-default-initializers=true
>
> The release module starts up but the app fails whenever I launch a module.
>
> The smallest size settings in the documentation do not work. The app does not start up.
>
> -export-public-symbols=false
> -prevent-rename-protected-symbols=false
> -prevent-rename-public-symbols=false
> -prevent-rename-internal-symbols=false
>
>
>
> The error trace is below
>
>
> Uncaught TypeError: cm.valuesImpl.init is not a function
> at Wr.Rr.pl <http://wr.rr.pl/> (Overview.js:792)
> at Function.mq.generateMXMLProperties (Overview.js:743)
> at Wr.lq.generateMXMLAttributes (Overview.js:551)
> at new Wr (Overview.js:810)
> at QN.J.loadHandler (FrontEnd.js:1978)
> 3Overview.js:56 Uncaught TypeError: Cannot read properties of undefined (reading 'prototype')
> at P (Overview.js:56)
> at VG.convert (FrontEnd.js:910)
> at ny (FrontEnd.js:250)
> at HTMLElement.iy (FrontEnd.js:125)
> at HTMLElement.b (FrontEnd.js:121)
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOut (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOver (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOver @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOut (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOut @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOver (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOver @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOut (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOut @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOver (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOver @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOut (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOut @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOver (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOver @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOut (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOut @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
>
> On Thu, Dec 30, 2021 at 4:32 PM Roman Isitua <romanisitua@gmail.com <ma...@gmail.com>> wrote:
> I get the same error even when I set the -js-dynamic-access-unknown-members=true;
>
> On Thu, Dec 30, 2021 at 4:24 PM Roman Isitua <romanisitua@gmail.com <ma...@gmail.com>> wrote:
>
> Using the below settings,
>
> -export-public-symbols=false
> -prevent-rename-protected-symbols=false
> -prevent-rename-public-symbols=false
> -prevent-rename-internal-symbols=false
> -js-dynamic-access-unknown-members=false;
> -js-default-initializers=true
>
>
> Debug version runs fine. The release version does not start up
>
> <image004.png>
>
>
> I get the below errors
>
> Uncaught TypeError: Cannot read properties of undefined (reading 'apply')
> at KE.hm (FrontEnd.js:1600)
> at XE.M.Fb (FrontEnd.js:943)
> at XE.M.uh (FrontEnd.js:937)
> at FE.M.na <http://fe.m.na/> (FrontEnd.js:497)
> at FE.M.v (FrontEnd.js:497)
> at dR.M.S (FrontEnd.js:213)
> at dR.Nz.S (FrontEnd.js:217)
> at dR.M.start (FrontEnd.js:1396)
> at index.html:45
> :8080/favicon.ico:1 Failed to load resource: the server responded with a status of 404 (Not Found)
>
>
> FrontEnd.js is the start up class for the application. i.e. It implements the Jewel application class.
>
>
>
> On Thu, Dec 30, 2021 at 3:19 PM Roman Isitua <romanisitua@gmail.com <ma...@gmail.com>> wrote:
> Hi Harb,
>
> Thanks for your response. I have gone through the documentation. I will do my test again starting with the smallest size option and share my findings.
>
> Regards,
>
> On Thu, Dec 30, 2021 at 10:59 AM Harbs <harbs.lists@gmail.com <ma...@gmail.com>> wrote:
> Sorry for my deal in responding.
>
> Let’s take a step back.
>
> I’m not sure how you are compiling your modules. I just added some content to the module documentation page which explains what compiler options you need while compiling modules. (It still needs some editing.) https://apache.github.io/royale-docs/features/modules#minification <https://apache.github.io/royale-docs/features/modules#minification>
>
> Are you using those options?
>
>
> On Dec 29, 2021, at 2:19 AM, Maria Jose Esteve <mjesteve@iest.com <ma...@iest.com>> wrote:
>
> Hi, Let me join you with these tests....
>
> @Harb, I have compiled the SDK from this branch, feature/ROYALE_INTERFACE_INFO, and when running in debug I get this error:
>
> Message on the PURGE CONSOLE is displayed:
>
> Cannot convert org.apache.royale.reflection.beads.ClassAliasBead to IBead
>
> Message in the IDE Window:
>
> Se produjo una excepción: TypeError: Cannot convert [object Object] to IBead
> at App.org.apache.royale.core.ElementWrapper.addBead (http://localhost:8080/WNetSuitePlus/org/apache/royale/core/ElementWrapper.js:114:11 <http://localhost:8080/WNetSuitePlus/org/apache/royale/core/ElementWrapper.js:114:11>)
> at App.org.apache.royale.core.HTMLElementWrapper.addBead (http://localhost:8080/WNetSuitePlus/org/apache/royale/core/HTMLElementWrapper.js:43:65 <http://localhost:8080/WNetSuitePlus/org/apache/royale/core/HTMLElementWrapper.js:43:65>)
> at App.org.apache.royale.jewel.Application.start (http://localhost:8080/WNetSuitePlus/org/apache/royale/jewel/Application.js:246:10 <http://localhost:8080/WNetSuitePlus/org/apache/royale/jewel/Application.js:246:10>)
> at App.App_loadXML (http://localhost:8080/WNetSuitePlus/App.js:1681:25 <http://localhost:8080/WNetSuitePlus/App.js:1681:25>)
> at org.apache.royale.net.URLLoader.org.apache.royale.events.EventDispatcher.fireListeners (http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:97:23 <http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:97:23>)
> at Function.goog.events.EventTarget.dispatchEventInternal_ (http://localhost:8080/WNetSuitePlus/library/closure/goog/events/eventtarget.js:381:26 <http://localhost:8080/WNetSuitePlus/library/closure/goog/events/eventtarget.js:381:26>)
> at org.apache.royale.net.URLLoader.org.apache.royale.events.EventDispatcher.dispatchEvent (http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:72:37 <http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:72:37>)
> at org.apache.royale.net.URLLoader.jsEventHandler (http://localhost:8080/WNetSuitePlus/org/apache/royale/net/URLLoader.js:169:12 <http://localhost:8080/WNetSuitePlus/org/apache/royale/net/URLLoader.js:169:12>)
>
> Call stack:
>
> <image003.png>
>
> [INFO] Executing MXMLC in tool group Royale with args: [
> -load-config=D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\compile-app-config.xml,
> -js-default-initializers=true,
> -source-map=true,
> -js-dynamic-access-unknown-members=true,
> -keep-as3-metadata+=Inject,Dispatcher,EventHandler,Event,PostConstruct,PreDestroy,ViewAdded,ViewRemoved,Bindable,Transient,
> -keep-code-with-metadata=Inject,
> -show-binding-warnings=false,
> -export-public-symbols=false,
> -prevent-rename-protected-symbols=false,
> -prevent-rename-internal-symbols=false,
> -js-output=D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\javascript,
> -compiler.targets=JSRoyale,
> D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\src\main\royale\App.mxml
>
>
> The release execution does not change, the error is the same as before (SDK compilation from the develop branch):
>
> Se produjo una excepción: ReferenceError: Error #1065: Variable com.iest.winplusweb.models.MasterConfigSystemModel is not defined.
> at yR (http://localhost:8080/WPWebRelease/App.js:3605:1771 <http://localhost:8080/WPWebRelease/App.js:3605:1771>)
> at Mya (http://localhost:8080/WPWebRelease/App.js:3343:365 <http://localhost:8080/WPWebRelease/App.js:3343:365>)
> at AR.J.usa (http://localhost:8080/WPWebRelease/App.js:434:441 <http://localhost:8080/WPWebRelease/App.js:434:441>)
> at GFa.J.fromTypeDefinition (http://localhost:8080/WPWebRelease/App.js:5706:139 <http://localhost:8080/WPWebRelease/App.js:5706:139>)
> at Function.YT.getTypeDescriptor (http://localhost:8080/WPWebRelease/App.js:4570:820 <http://localhost:8080/WPWebRelease/App.js:4570:820>)
> at Function.fX.constructBean (http://localhost:8080/WPWebRelease/App.js:2336:472 <http://localhost:8080/WPWebRelease/App.js:2336:472>)
> at r$.J.initialize (http://localhost:8080/WPWebRelease/App.js:5041:66 <http://localhost:8080/WPWebRelease/App.js:5041:66>)
> at OW.J.init (http://localhost:8080/WPWebRelease/App.js:950:452 <http://localhost:8080/WPWebRelease/App.js:950:452>)
> at OW.J.u (http://localhost:8080/WPWebRelease/App.js:951:454 <http://localhost:8080/WPWebRelease/App.js:951:454>)
> at $$.J.addBead (http://localhost:8080/WPWebRelease/App.js:357:549 <http://localhost:8080/WPWebRelease/App.js:357:549>)
>
> The main difference:
> project compiled from "SDK-develop" runs fine in js-debug and gives error in js-release and, compiled from "SDK-ROYALE_INTERFACE_INFO" does not launch because of conversion error.
>
> Hiedra
>
> De: Roman Isitua <romanisitua@gmail.com <ma...@gmail.com>>
> Enviado el: martes, 28 de diciembre de 2021 15:55
> Para: users@royale.apache.org <ma...@royale.apache.org>
> Asunto: Re: Load time is very slow
>
> @Harb
>
> I have checked out the feature/ROYALE_INTERFACE_INFO branch and compiled asjs and compiler. I have rebuilt my application with modules in release mode.
>
> I get the following error when I attempt to launch a module
>
>
> <image001.png>
>
>
> The module loads fine in debug mode
>
> <image002.png>
>
>
> Snippets of the log
>
> Overview.js:786 Uncaught TypeError: cm.valuesImpl.init is not a function
> at Rr.Mr.yl (Overview.js:786)
> at Function.iq.generateMXMLProperties (Overview.js:736)
> at Rr.hq.generateMXMLAttributes (Overview.js:546)
> at new Rr (Overview.js:804)
> at LN.J.loadHandler (FrontEnd.js:1967)
> Mr.yl @ Overview.js:786
> iq.generateMXMLProperties @ Overview.js:736
> hq.generateMXMLAttributes @ Overview.js:546
> Rr @ Overview.js:804
> J.loadHandler @ FrontEnd.js:1967
> load (async)
> LN.loadModule @ FrontEnd.js:1965
> dN.loadModule @ FrontEnd.js:2406
> LD.Un @ FrontEnd.js:1809
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:248
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
>
>
> I have attached the full log to this email.
>
>
>
>
> On Tue, Dec 28, 2021 at 2:51 PM Roman Isitua <romanisitua@gmail.com <ma...@gmail.com>> wrote:
> Hi Maria,
>
> Prior to starting this mail discussion "Load time is very slow". I can confirm I have only been compiling in debug mode. My target\javascript\bin\ only had js-debug. It was after I upgraded my royale sdk from 0.9.7 to 0.9.8 that I compiled in release mode.
>
>
>
> On Tue, Dec 28, 2021 at 2:24 PM Maria Jose Esteve <mjesteve@iest.com <ma...@iest.com>> wrote:
> Hi, @Roman, I think you are doing a double compile can it be? My times are the same as yours and I always compile in debug and release.
>
> Look at your target folder " target\javascript\bin\" and if you have two folders: js-debug and js-release you are compiling always double.
>
> In my case, the architecture of my project as well as the Maven compilation files (pom.xml) were provided by an external company (we didn't know anything about Maven or Royale at that time) and I understand that this formula was chosen to show us the options we had.
>
> A priori and without doing any test as Harb has done, I think that modularity gives us the advantage of compiling parts of the code once and not compiling them again if they are not modified. So far WITH MY COMPILATION TIMES, sometimes more than 1 minute, this is fundamental. But of course, now we have the problem of minification of the modules and it is really a serious problem because it is impossible for us to deploy in production.
>
> I will try to separate the compiación realese with a profile and if I succeed I will pass it to you @Roman.
>
> @Harb what do you mean by compiling the ROYALE_INTERFACE_INFO branch?
>
> Hiedra
>
> De: Harbs <harbs.lists@gmail.com <ma...@gmail.com>>
> Enviado el: lunes, 27 de diciembre de 2021 18:32
> Para: users@royale.apache.org <ma...@royale.apache.org>
> Asunto: Re: Load time is very slow
>
> That doesn’t sound right.
>
> Are you sure you’re compiling debug and not release? That sounds like release build times.
>
>
> On Dec 27, 2021, at 3:31 PM, Roman Isitua <romanisitua@gmail.com <ma...@gmail.com>> wrote:
>
> Wow ! You are using a workstation with a bleeding edge processor.
>
> I just compiled my app now. It took 44 seconds. (First compilation after ide start up.) Subsequently compilations are usually 19s to 20s.
>
> My application code base is very very small compared to yours. As we continue to add functionality, I expect the compile times to rise.
>
>
>
>
> <MainApp_pom.xml><Overview_pom.xml><fm_client2_pom.xml>
RE: Compiling Modules (was Re: Load time is very slow)
Posted by Maria Jose Esteve <mj...@iest.com>.
Search for “com.iest.winplusweb.models.MasterConfigSystemModel “ in App.js ¿:
1. It does appear
,jn='com.iest.winplusweb.models.MasterConfigSystemModel',
1. Same, it does appear
,jn='com.iest.winplusweb.models.MasterConfigSystemModel',
By "compiled code" do you mean App.js or something else?
Why in "develop" it refers to the js-debug folder and in ROYALE_INTERFACE_INFO it refers to js-release which is correct?
I remove the option "-source-map-source-root=${project.basedir}/src/main/royale/" and the Error looks the same BUT now the console errors have been swapped: In A it now references js-debug and in B it now references js-release. I DON'T UNDERSTAND ANYTHING, FORGIVE ME.
1. Console:
Uncaught ReferenceError: Error #1065: Variable com.iest.winplusweb.models.MasterConfigSystemModel is not defined.
MQ @ d:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\javascript\bin\js-debug\org\apache\royale\reflection\getDefinitionByName.js:61:11
1. Console:
Uncaught ReferenceError: Error #1065: Variable com.iest.winplusweb.models.MasterConfigSystemModel is not defined.
MQ @ D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\javascript\bin\js-release\App.js:4313:1727
Hiedra
De: Harbs <ha...@gmail.com>
Enviado el: jueves, 30 de diciembre de 2021 19:59
Para: users@royale.apache.org
Asunto: Re: Compiling Modules (was Re: Load time is very slow)
It appears to be the same error. Your message in B is probably diufferent because you have source maps.
getDefinitionByName() cannot find com.iest.winplusweb.models.MasterConfigSystemModel.
Does that string exist in your compiled code? If not, the compiler probably thought it was dead code for some reason and removed it.
On Dec 30, 2021, at 8:46 PM, Maria Jose Esteve <mj...@iest.com>> wrote:
No Harb, we have in common the Maven compilation and the use of Maven modules.
But I take this opportunity to show you a "curious" test, look at the error displayed in the Debug Console... (The sdk compiled from develop the error references the js-debug folder, even though it is running from js-release)
A : SDK compiled on branch ROYALE_INTERFACE_INFO
B: SDK compiled on branch develop
Test 1) Basic:
Additional options in the Library (mvn modules) and in the main application:
-source-map=true;
-show-binding-warnings=false;
-source-map-source-root=${project.basedir}/src/main/royale/; <!—This option is not in the pom of the main application, only in the library -->
-js-default-initializers=true;
-js-dynamic-access-unknown-members=true;
-keep-as3-metadata+=Inject,Dispatcher,EventHandler,Event,PostConstruct,PreDestroy,ViewAdded,ViewRemoved,Bindable,Transient;
-keep-code-with-metadata=Inject;
A.
DEBUG: OK
RELEASE: Error
Se produjo una excepción: ReferenceError: Error #1065: Variable com.iest.winplusweb.models.MasterConfigSystemModel is not defined.
at MQ (http://localhost:8080/WPWebRelease/App.js:4315:1727)
at Function.I$.getMetadataHost (http://localhost:8080/WPWebRelease/App.js:6303:45)
at F9.getMetadataHost (http://localhost:8080/WPWebRelease/App.js:6711:147)
at F9.getMetadataHosts (http://localhost:8080/WPWebRelease/App.js:6710:299)
at F9.fromTypeDefinition (http://localhost:8080/WPWebRelease/App.js:6711:381)
at Function.dT.getTypeDescriptor (http://localhost:8080/WPWebRelease/App.js:5469:885)
at Function.GW.constructBean (http://localhost:8080/WPWebRelease/App.js:2753:296)
at n$.initializeBeans (http://localhost:8080/WPWebRelease/App.js:5994:1046)
at n$.initialize (http://localhost:8080/WPWebRelease/App.js:5994:915)
at oW.constructProviders (http://localhost:8080/WPWebRelease/App.js:1152:254)
Message in Console:
Uncaught ReferenceError: Error #1065: Variable com.iest.winplusweb.models.MasterConfigSystemModel is not defined.
MQ @ D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\javascript\bin\js-release\App.js:4315:1727
B.
DEBUG:OK
RELEASE: Same error
Message in Console:
Uncaught ReferenceError: Error #1065: Variable com.iest.winplusweb.models.MasterConfigSystemModel is not defined.
MQ @ d:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\javascript\bin\js-debug\org\apache\royale\reflection\getDefinitionByName.js:61:11
Hiedra
De: Harbs <ha...@gmail.com>>
Enviado el: jueves, 30 de diciembre de 2021 19:42
Para: users@royale.apache.org<ma...@royale.apache.org>
Asunto: Re: Compiling Modules (was Re: Load time is very slow)
Wait. I’m confused.
Does your app work? I’m assuming that your app is not the same as Roman’s.
On Dec 30, 2021, at 8:07 PM, Maria Jose Esteve <mj...@iest.com>> wrote:
I was preparing an email with a battery of tests but I don't use any configuration or property files... maybe I'd better stop and read it to you.
Hiedra
De: Harbs <ha...@gmail.com>>
Enviado el: jueves, 30 de diciembre de 2021 18:56
Para: users@royale.apache.org<ma...@royale.apache.org>
Asunto: Re: Compiling Modules (was Re: Load time is very slow)
1. I’d get rid of the agressive minification options. It will likely cause issues. If you get it to work without those options, you can try to add them back in and see if it still works.
2. You seem to be missing the compiler options explained here: https://apache.github.io/royale-docs/features/modules#minification
For a pom, it would look something like this (adjust your paths to match your setup):
Main app:
<additionalCompilerOptions>-source-map=true;-js-compiler-option=--variable_map_output_file gccvars.txt;-js-compiler-option+=--property_map_output_file gccprops.txt</additionalCompilerOptions>
Module:
<additionalCompilerOptions>-source-map=true;-js-compiler-option=--variable_map_input_file ../../../../../MainApp/bin/js-release/gccvars.txt;-js-compiler-option+=--property_map_input_file ../../../../../MainApp/bin/js-release/gccprops.txt</additionalCompilerOptions>
On Dec 30, 2021, at 7:43 PM, Roman Isitua <ro...@gmail.com>> wrote:
I think it will be better for me to share my pom's that way you can see all the compilation options used. The pom for the parent (FmClient2), the MainApp and one module (Overview) have been attached to this email.
On Thu, Dec 30, 2021 at 6:22 PM Harbs <ha...@gmail.com>> wrote:
Roman, can you share your full compiler options?
I decided to remove the below settings completely
-export-public-symbols=false
-prevent-rename-protected-symbols=false
-prevent-rename-public-symbols=false
-prevent-rename-internal-symbols=false
I enabled the below settings
-js-dynamic-access-unknown-members=true;
-js-default-initializers=true
The release version starts up
Hiedra, that’s great!
On Dec 30, 2021, at 7:15 PM, Roman Isitua <ro...@gmail.com>> wrote:
Yes. I am testing with the sdk compiled on branch ROYALE_INTERFACE_INFO
On Thu, Dec 30, 2021 at 6:10 PM Maria Jose Esteve <mj...@iest.com>> wrote:
Roman, are you testing with the SDK compiled from the Harb branches, ROYALE_INTERFACE_INFO, or from develop?
Hiedra
De: Roman Isitua <ro...@gmail.com>>
Enviado el: jueves, 30 de diciembre de 2021 16:52
Para: users@royale.apache.org<ma...@royale.apache.org>
Asunto: Re: Compiling Modules (was Re: Load time is very slow)
I decided to remove the below settings completely
-export-public-symbols=false
-prevent-rename-protected-symbols=false
-prevent-rename-public-symbols=false
-prevent-rename-internal-symbols=false
I enabled the below settings
-js-dynamic-access-unknown-members=true;
-js-default-initializers=true
The release version starts up
<image001.png>
<image002.png>
However, the moment I launch a module. I get the below error
<image003.png>
It appears to be failing when I launch the "Overview" module (by clicking the Overview side menu).
So my current observation is that by retaining only two settings
-js-dynamic-access-unknown-members=true;
-js-default-initializers=true
The release module starts up but the app fails whenever I launch a module.
The smallest size settings in the documentation do not work. The app does not start up.
-export-public-symbols=false
-prevent-rename-protected-symbols=false
-prevent-rename-public-symbols=false
-prevent-rename-internal-symbols=false
The error trace is below
Uncaught TypeError: cm.valuesImpl.init is not a function
at Wr.Rr.pl<http://wr.rr.pl/> (Overview.js:792)
at Function.mq.generateMXMLProperties (Overview.js:743)
at Wr.lq.generateMXMLAttributes (Overview.js:551)
at new Wr (Overview.js:810)
at QN.J.loadHandler (FrontEnd.js:1978)
3Overview.js:56 Uncaught TypeError: Cannot read properties of undefined (reading 'prototype')
at P (Overview.js:56)
at VG.convert (FrontEnd.js:910)
at ny (FrontEnd.js:250)
at HTMLElement.iy (FrontEnd.js:125)
at HTMLElement.b (FrontEnd.js:121)
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOut (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOver (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOver @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOut (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOut @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOver (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOver @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOut (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOut @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOver (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOver @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOut (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOut @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOver (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOver @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOut (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOut @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
On Thu, Dec 30, 2021 at 4:32 PM Roman Isitua <ro...@gmail.com>> wrote:
I get the same error even when I set the -js-dynamic-access-unknown-members=true;
On Thu, Dec 30, 2021 at 4:24 PM Roman Isitua <ro...@gmail.com>> wrote:
Using the below settings,
-export-public-symbols=false
-prevent-rename-protected-symbols=false
-prevent-rename-public-symbols=false
-prevent-rename-internal-symbols=false
-js-dynamic-access-unknown-members=false;
-js-default-initializers=true
Debug version runs fine. The release version does not start up
<image004.png>
I get the below errors
Uncaught TypeError: Cannot read properties of undefined (reading 'apply')
at KE.hm (FrontEnd.js:1600)
at XE.M.Fb (FrontEnd.js:943)
at XE.M.uh (FrontEnd.js:937)
at FE.M.na<http://fe.m.na/> (FrontEnd.js:497)
at FE.M.v (FrontEnd.js:497)
at dR.M.S (FrontEnd.js:213)
at dR.Nz.S (FrontEnd.js:217)
at dR.M.start (FrontEnd.js:1396)
at index.html:45
:8080/favicon.ico:1 Failed to load resource: the server responded with a status of 404 (Not Found)
FrontEnd.js is the start up class for the application. i.e. It implements the Jewel application class.
On Thu, Dec 30, 2021 at 3:19 PM Roman Isitua <ro...@gmail.com>> wrote:
Hi Harb,
Thanks for your response. I have gone through the documentation. I will do my test again starting with the smallest size option and share my findings.
Regards,
On Thu, Dec 30, 2021 at 10:59 AM Harbs <ha...@gmail.com>> wrote:
Sorry for my deal in responding.
Let’s take a step back.
I’m not sure how you are compiling your modules. I just added some content to the module documentation page which explains what compiler options you need while compiling modules. (It still needs some editing.) https://apache.github.io/royale-docs/features/modules#minification
Are you using those options?
On Dec 29, 2021, at 2:19 AM, Maria Jose Esteve <mj...@iest.com>> wrote:
Hi, Let me join you with these tests....
@Harb, I have compiled the SDK from this branch, feature/ROYALE_INTERFACE_INFO, and when running in debug I get this error:
Message on the PURGE CONSOLE is displayed:
Cannot convert org.apache.royale.reflection.beads.ClassAliasBead to IBead
Message in the IDE Window:
Se produjo una excepción: TypeError: Cannot convert [object Object] to IBead
at App.org.apache.royale.core.ElementWrapper.addBead (http://localhost:8080/WNetSuitePlus/org/apache/royale/core/ElementWrapper.js:114:11)
at App.org.apache.royale.core.HTMLElementWrapper.addBead (http://localhost:8080/WNetSuitePlus/org/apache/royale/core/HTMLElementWrapper.js:43:65)
at App.org.apache.royale.jewel.Application.start (http://localhost:8080/WNetSuitePlus/org/apache/royale/jewel/Application.js:246:10)
at App.App_loadXML (http://localhost:8080/WNetSuitePlus/App.js:1681:25)
at org.apache.royale.net.URLLoader.org.apache.royale.events.EventDispatcher.fireListeners (http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:97:23)
at Function.goog.events.EventTarget.dispatchEventInternal_ (http://localhost:8080/WNetSuitePlus/library/closure/goog/events/eventtarget.js:381:26)
at org.apache.royale.net.URLLoader.org.apache.royale.events.EventDispatcher.dispatchEvent (http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:72:37)
at org.apache.royale.net.URLLoader.jsEventHandler (http://localhost:8080/WNetSuitePlus/org/apache/royale/net/URLLoader.js:169:12)
Call stack:
<image003.png>
[INFO] Executing MXMLC in tool group Royale with args: [
-load-config=D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\compile-app-config.xml,
-js-default-initializers=true,
-source-map=true,
-js-dynamic-access-unknown-members=true,
-keep-as3-metadata+=Inject,Dispatcher,EventHandler,Event,PostConstruct,PreDestroy,ViewAdded,ViewRemoved,Bindable,Transient,
-keep-code-with-metadata=Inject,
-show-binding-warnings=false,
-export-public-symbols=false,
-prevent-rename-protected-symbols=false,
-prevent-rename-internal-symbols=false,
-js-output=D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\javascript,
-compiler.targets=JSRoyale,
D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\src\main\royale\App.mxml
The release execution does not change, the error is the same as before (SDK compilation from the develop branch):
Se produjo una excepción: ReferenceError: Error #1065: Variable com.iest.winplusweb.models.MasterConfigSystemModel is not defined.
at yR (http://localhost:8080/WPWebRelease/App.js:3605:1771)
at Mya (http://localhost:8080/WPWebRelease/App.js:3343:365)
at AR.J.usa (http://localhost:8080/WPWebRelease/App.js:434:441)
at GFa.J.fromTypeDefinition (http://localhost:8080/WPWebRelease/App.js:5706:139)
at Function.YT.getTypeDescriptor (http://localhost:8080/WPWebRelease/App.js:4570:820)
at Function.fX.constructBean (http://localhost:8080/WPWebRelease/App.js:2336:472)
at r$.J.initialize (http://localhost:8080/WPWebRelease/App.js:5041:66)
at OW.J.init (http://localhost:8080/WPWebRelease/App.js:950:452)
at OW.J.u (http://localhost:8080/WPWebRelease/App.js:951:454)
at $$.J.addBead (http://localhost:8080/WPWebRelease/App.js:357:549)
The main difference:
project compiled from "SDK-develop" runs fine in js-debug and gives error in js-release and, compiled from "SDK-ROYALE_INTERFACE_INFO" does not launch because of conversion error.
Hiedra
De: Roman Isitua <ro...@gmail.com>>
Enviado el: martes, 28 de diciembre de 2021 15:55
Para: users@royale.apache.org<ma...@royale.apache.org>
Asunto: Re: Load time is very slow
@Harb
I have checked out the feature/ROYALE_INTERFACE_INFO branch and compiled asjs and compiler. I have rebuilt my application with modules in release mode.
I get the following error when I attempt to launch a module
<image001.png>
The module loads fine in debug mode
<image002.png>
Snippets of the log
Overview.js:786 Uncaught TypeError: cm.valuesImpl.init is not a function
at Rr.Mr.yl (Overview.js:786)
at Function.iq.generateMXMLProperties (Overview.js:736)
at Rr.hq.generateMXMLAttributes (Overview.js:546)
at new Rr (Overview.js:804)
at LN.J.loadHandler (FrontEnd.js:1967)
Mr.yl @ Overview.js:786
iq.generateMXMLProperties @ Overview.js:736
hq.generateMXMLAttributes @ Overview.js:546
Rr @ Overview.js:804
J.loadHandler @ FrontEnd.js:1967
load (async)
LN.loadModule @ FrontEnd.js:1965
dN.loadModule @ FrontEnd.js:2406
LD.Un @ FrontEnd.js:1809
ny @ FrontEnd.js:123
ny @ FrontEnd.js:248
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
I have attached the full log to this email.
On Tue, Dec 28, 2021 at 2:51 PM Roman Isitua <ro...@gmail.com>> wrote:
Hi Maria,
Prior to starting this mail discussion "Load time is very slow". I can confirm I have only been compiling in debug mode. My target\javascript\bin\ only had js-debug. It was after I upgraded my royale sdk from 0.9.7 to 0.9.8 that I compiled in release mode.
On Tue, Dec 28, 2021 at 2:24 PM Maria Jose Esteve <mj...@iest.com>> wrote:
Hi, @Roman, I think you are doing a double compile can it be? My times are the same as yours and I always compile in debug and release.
Look at your target folder " target\javascript\bin\" and if you have two folders: js-debug and js-release you are compiling always double.
In my case, the architecture of my project as well as the Maven compilation files (pom.xml) were provided by an external company (we didn't know anything about Maven or Royale at that time) and I understand that this formula was chosen to show us the options we had.
A priori and without doing any test as Harb has done, I think that modularity gives us the advantage of compiling parts of the code once and not compiling them again if they are not modified. So far WITH MY COMPILATION TIMES, sometimes more than 1 minute, this is fundamental. But of course, now we have the problem of minification of the modules and it is really a serious problem because it is impossible for us to deploy in production.
I will try to separate the compiación realese with a profile and if I succeed I will pass it to you @Roman.
@Harb what do you mean by compiling the ROYALE_INTERFACE_INFO branch?
Hiedra
De: Harbs <ha...@gmail.com>>
Enviado el: lunes, 27 de diciembre de 2021 18:32
Para: users@royale.apache.org<ma...@royale.apache.org>
Asunto: Re: Load time is very slow
That doesn’t sound right.
Are you sure you’re compiling debug and not release? That sounds like release build times.
On Dec 27, 2021, at 3:31 PM, Roman Isitua <ro...@gmail.com>> wrote:
Wow ! You are using a workstation with a bleeding edge processor.
I just compiled my app now. It took 44 seconds. (First compilation after ide start up.) Subsequently compilations are usually 19s to 20s.
My application code base is very very small compared to yours. As we continue to add functionality, I expect the compile times to rise.
<MainApp_pom.xml><Overview_pom.xml><fm_client2_pom.xml>
Re: Compiling Modules (was Re: Load time is very slow)
Posted by Harbs <ha...@gmail.com>.
It appears to be the same error. Your message in B is probably diufferent because you have source maps.
getDefinitionByName() cannot find com.iest.winplusweb.models.MasterConfigSystemModel.
Does that string exist in your compiled code? If not, the compiler probably thought it was dead code for some reason and removed it.
> On Dec 30, 2021, at 8:46 PM, Maria Jose Esteve <mj...@iest.com> wrote:
>
> No Harb, we have in common the Maven compilation and the use of Maven modules.
> But I take this opportunity to show you a "curious" test, look at the error displayed in the Debug Console... (The sdk compiled from develop the error references the js-debug folder, even though it is running from js-release)
>
> A : SDK compiled on branch ROYALE_INTERFACE_INFO
> B: SDK compiled on branch develop
>
> Test 1) Basic:
> Additional options in the Library (mvn modules) and in the main application:
>
> -source-map=true;
> -show-binding-warnings=false;
> -source-map-source-root=${project.basedir}/src/main/royale/; <!—This option is not in the pom of the main application, only in the library -->
>
> -js-default-initializers=true;
> -js-dynamic-access-unknown-members=true;
>
> -keep-as3-metadata+=Inject,Dispatcher,EventHandler,Event,PostConstruct,PreDestroy,ViewAdded,ViewRemoved,Bindable,Transient;
> -keep-code-with-metadata=Inject;
>
> A.
> DEBUG: OK
> RELEASE: Error
> Se produjo una excepción: ReferenceError: Error #1065: Variable com.iest.winplusweb.models.MasterConfigSystemModel is not defined.
> at MQ (http://localhost:8080/WPWebRelease/App.js:4315:1727 <http://localhost:8080/WPWebRelease/App.js:4315:1727>)
> at Function.I$.getMetadataHost (http://localhost:8080/WPWebRelease/App.js:6303:45 <http://localhost:8080/WPWebRelease/App.js:6303:45>)
> at F9.getMetadataHost (http://localhost:8080/WPWebRelease/App.js:6711:147 <http://localhost:8080/WPWebRelease/App.js:6711:147>)
> at F9.getMetadataHosts (http://localhost:8080/WPWebRelease/App.js:6710:299 <http://localhost:8080/WPWebRelease/App.js:6710:299>)
> at F9.fromTypeDefinition (http://localhost:8080/WPWebRelease/App.js:6711:381 <http://localhost:8080/WPWebRelease/App.js:6711:381>)
> at Function.dT.getTypeDescriptor (http://localhost:8080/WPWebRelease/App.js:5469:885 <http://localhost:8080/WPWebRelease/App.js:5469:885>)
> at Function.GW.constructBean (http://localhost:8080/WPWebRelease/App.js:2753:296 <http://localhost:8080/WPWebRelease/App.js:2753:296>)
> at n$.initializeBeans (http://localhost:8080/WPWebRelease/App.js:5994:1046 <http://localhost:8080/WPWebRelease/App.js:5994:1046>)
> at n$.initialize (http://localhost:8080/WPWebRelease/App.js:5994:915 <http://localhost:8080/WPWebRelease/App.js:5994:915>)
> at oW.constructProviders (http://localhost:8080/WPWebRelease/App.js:1152:254 <http://localhost:8080/WPWebRelease/App.js:1152:254>)
>
> Message in Console:
> Uncaught ReferenceError: Error #1065: Variable com.iest.winplusweb.models.MasterConfigSystemModel is not defined.
> MQ @ D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\javascript\bin\js-release\App.js:4315:1727
>
> B.
> DEBUG:OK
> RELEASE: Same error
> Message in Console:
> Uncaught ReferenceError: Error #1065: Variable com.iest.winplusweb.models.MasterConfigSystemModel is not defined.
> MQ @ d:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\javascript\bin\js-debug\org\apache\royale\reflection\getDefinitionByName.js:61:11
>
>
> Hiedra
>
> De: Harbs <ha...@gmail.com>
> Enviado el: jueves, 30 de diciembre de 2021 19:42
> Para: users@royale.apache.org
> Asunto: Re: Compiling Modules (was Re: Load time is very slow)
>
> Wait. I’m confused.
>
> Does your app work? I’m assuming that your app is not the same as Roman’s.
>
>
> On Dec 30, 2021, at 8:07 PM, Maria Jose Esteve <mjesteve@iest.com <ma...@iest.com>> wrote:
>
> I was preparing an email with a battery of tests but I don't use any configuration or property files... maybe I'd better stop and read it to you.
>
> Hiedra
>
> De: Harbs <harbs.lists@gmail.com <ma...@gmail.com>>
> Enviado el: jueves, 30 de diciembre de 2021 18:56
> Para: users@royale.apache.org <ma...@royale.apache.org>
> Asunto: Re: Compiling Modules (was Re: Load time is very slow)
>
> 1. I’d get rid of the agressive minification options. It will likely cause issues. If you get it to work without those options, you can try to add them back in and see if it still works.
> 2. You seem to be missing the compiler options explained here: https://apache.github.io/royale-docs/features/modules#minification <https://apache.github.io/royale-docs/features/modules#minification>
>
> For a pom, it would look something like this (adjust your paths to match your setup):
>
> Main app:
> <additionalCompilerOptions>-source-map=true;-js-compiler-option=--variable_map_output_file gccvars.txt;-js-compiler-option+=--property_map_output_file gccprops.txt</additionalCompilerOptions>
>
> Module:
> <additionalCompilerOptions>-source-map=true;-js-compiler-option=--variable_map_input_file ../../../../../MainApp/bin/js-release/gccvars.txt;-js-compiler-option+=--property_map_input_file ../../../../../MainApp/bin/js-release/gccprops.txt</additionalCompilerOptions>
>
> On Dec 30, 2021, at 7:43 PM, Roman Isitua <romanisitua@gmail.com <ma...@gmail.com>> wrote:
>
> I think it will be better for me to share my pom's that way you can see all the compilation options used. The pom for the parent (FmClient2), the MainApp and one module (Overview) have been attached to this email.
>
>
> On Thu, Dec 30, 2021 at 6:22 PM Harbs <harbs.lists@gmail.com <ma...@gmail.com>> wrote:
> Roman, can you share your full compiler options?
>
> I decided to remove the below settings completely
> -export-public-symbols=false
> -prevent-rename-protected-symbols=false
> -prevent-rename-public-symbols=false
> -prevent-rename-internal-symbols=false
>
>
> I enabled the below settings
>
> -js-dynamic-access-unknown-members=true;
> -js-default-initializers=true
>
>
> The release version starts up
>
> Hiedra, that’s great!
>
>
>
> On Dec 30, 2021, at 7:15 PM, Roman Isitua <romanisitua@gmail.com <ma...@gmail.com>> wrote:
>
>
> Yes. I am testing with the sdk compiled on branch ROYALE_INTERFACE_INFO
>
> On Thu, Dec 30, 2021 at 6:10 PM Maria Jose Esteve <mjesteve@iest.com <ma...@iest.com>> wrote:
> Roman, are you testing with the SDK compiled from the Harb branches, ROYALE_INTERFACE_INFO, or from develop?
>
> Hiedra
>
> De: Roman Isitua <romanisitua@gmail.com <ma...@gmail.com>>
> Enviado el: jueves, 30 de diciembre de 2021 16:52
> Para: users@royale.apache.org <ma...@royale.apache.org>
> Asunto: Re: Compiling Modules (was Re: Load time is very slow)
>
> I decided to remove the below settings completely
> -export-public-symbols=false
> -prevent-rename-protected-symbols=false
> -prevent-rename-public-symbols=false
> -prevent-rename-internal-symbols=false
>
>
> I enabled the below settings
>
> -js-dynamic-access-unknown-members=true;
> -js-default-initializers=true
>
>
> The release version starts up
>
>
>
> <image001.png>
>
>
> <image002.png>
>
> However, the moment I launch a module. I get the below error
>
> <image003.png>
>
>
> It appears to be failing when I launch the "Overview" module (by clicking the Overview side menu).
>
> So my current observation is that by retaining only two settings
>
> -js-dynamic-access-unknown-members=true;
> -js-default-initializers=true
>
> The release module starts up but the app fails whenever I launch a module.
>
> The smallest size settings in the documentation do not work. The app does not start up.
>
> -export-public-symbols=false
> -prevent-rename-protected-symbols=false
> -prevent-rename-public-symbols=false
> -prevent-rename-internal-symbols=false
>
>
>
> The error trace is below
>
>
> Uncaught TypeError: cm.valuesImpl.init is not a function
> at Wr.Rr.pl <http://wr.rr.pl/> (Overview.js:792)
> at Function.mq.generateMXMLProperties (Overview.js:743)
> at Wr.lq.generateMXMLAttributes (Overview.js:551)
> at new Wr (Overview.js:810)
> at QN.J.loadHandler (FrontEnd.js:1978)
> 3Overview.js:56 Uncaught TypeError: Cannot read properties of undefined (reading 'prototype')
> at P (Overview.js:56)
> at VG.convert (FrontEnd.js:910)
> at ny (FrontEnd.js:250)
> at HTMLElement.iy (FrontEnd.js:125)
> at HTMLElement.b (FrontEnd.js:121)
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOut (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOver (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOver @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOut (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOut @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOver (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOver @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOut (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOut @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOver (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOver @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOut (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOut @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOver (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOver @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOut (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOut @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
>
> On Thu, Dec 30, 2021 at 4:32 PM Roman Isitua <romanisitua@gmail.com <ma...@gmail.com>> wrote:
> I get the same error even when I set the -js-dynamic-access-unknown-members=true;
>
> On Thu, Dec 30, 2021 at 4:24 PM Roman Isitua <romanisitua@gmail.com <ma...@gmail.com>> wrote:
>
> Using the below settings,
>
> -export-public-symbols=false
> -prevent-rename-protected-symbols=false
> -prevent-rename-public-symbols=false
> -prevent-rename-internal-symbols=false
> -js-dynamic-access-unknown-members=false;
> -js-default-initializers=true
>
>
> Debug version runs fine. The release version does not start up
>
> <image004.png>
>
>
> I get the below errors
>
> Uncaught TypeError: Cannot read properties of undefined (reading 'apply')
> at KE.hm (FrontEnd.js:1600)
> at XE.M.Fb (FrontEnd.js:943)
> at XE.M.uh (FrontEnd.js:937)
> at FE.M.na <http://fe.m.na/> (FrontEnd.js:497)
> at FE.M.v (FrontEnd.js:497)
> at dR.M.S (FrontEnd.js:213)
> at dR.Nz.S (FrontEnd.js:217)
> at dR.M.start (FrontEnd.js:1396)
> at index.html:45
> :8080/favicon.ico:1 Failed to load resource: the server responded with a status of 404 (Not Found)
>
>
> FrontEnd.js is the start up class for the application. i.e. It implements the Jewel application class.
>
>
>
> On Thu, Dec 30, 2021 at 3:19 PM Roman Isitua <romanisitua@gmail.com <ma...@gmail.com>> wrote:
> Hi Harb,
>
> Thanks for your response. I have gone through the documentation. I will do my test again starting with the smallest size option and share my findings.
>
> Regards,
>
> On Thu, Dec 30, 2021 at 10:59 AM Harbs <harbs.lists@gmail.com <ma...@gmail.com>> wrote:
> Sorry for my deal in responding.
>
> Let’s take a step back.
>
> I’m not sure how you are compiling your modules. I just added some content to the module documentation page which explains what compiler options you need while compiling modules. (It still needs some editing.) https://apache.github.io/royale-docs/features/modules#minification <https://apache.github.io/royale-docs/features/modules#minification>
>
> Are you using those options?
>
>
> On Dec 29, 2021, at 2:19 AM, Maria Jose Esteve <mjesteve@iest.com <ma...@iest.com>> wrote:
>
> Hi, Let me join you with these tests....
>
> @Harb, I have compiled the SDK from this branch, feature/ROYALE_INTERFACE_INFO, and when running in debug I get this error:
>
> Message on the PURGE CONSOLE is displayed:
>
> Cannot convert org.apache.royale.reflection.beads.ClassAliasBead to IBead
>
> Message in the IDE Window:
>
> Se produjo una excepción: TypeError: Cannot convert [object Object] to IBead
> at App.org.apache.royale.core.ElementWrapper.addBead (http://localhost:8080/WNetSuitePlus/org/apache/royale/core/ElementWrapper.js:114:11 <http://localhost:8080/WNetSuitePlus/org/apache/royale/core/ElementWrapper.js:114:11>)
> at App.org.apache.royale.core.HTMLElementWrapper.addBead (http://localhost:8080/WNetSuitePlus/org/apache/royale/core/HTMLElementWrapper.js:43:65 <http://localhost:8080/WNetSuitePlus/org/apache/royale/core/HTMLElementWrapper.js:43:65>)
> at App.org.apache.royale.jewel.Application.start (http://localhost:8080/WNetSuitePlus/org/apache/royale/jewel/Application.js:246:10 <http://localhost:8080/WNetSuitePlus/org/apache/royale/jewel/Application.js:246:10>)
> at App.App_loadXML (http://localhost:8080/WNetSuitePlus/App.js:1681:25 <http://localhost:8080/WNetSuitePlus/App.js:1681:25>)
> at org.apache.royale.net.URLLoader.org.apache.royale.events.EventDispatcher.fireListeners (http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:97:23 <http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:97:23>)
> at Function.goog.events.EventTarget.dispatchEventInternal_ (http://localhost:8080/WNetSuitePlus/library/closure/goog/events/eventtarget.js:381:26 <http://localhost:8080/WNetSuitePlus/library/closure/goog/events/eventtarget.js:381:26>)
> at org.apache.royale.net.URLLoader.org.apache.royale.events.EventDispatcher.dispatchEvent (http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:72:37 <http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:72:37>)
> at org.apache.royale.net.URLLoader.jsEventHandler (http://localhost:8080/WNetSuitePlus/org/apache/royale/net/URLLoader.js:169:12 <http://localhost:8080/WNetSuitePlus/org/apache/royale/net/URLLoader.js:169:12>)
>
> Call stack:
>
> <image003.png>
>
> [INFO] Executing MXMLC in tool group Royale with args: [
> -load-config=D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\compile-app-config.xml,
> -js-default-initializers=true,
> -source-map=true,
> -js-dynamic-access-unknown-members=true,
> -keep-as3-metadata+=Inject,Dispatcher,EventHandler,Event,PostConstruct,PreDestroy,ViewAdded,ViewRemoved,Bindable,Transient,
> -keep-code-with-metadata=Inject,
> -show-binding-warnings=false,
> -export-public-symbols=false,
> -prevent-rename-protected-symbols=false,
> -prevent-rename-internal-symbols=false,
> -js-output=D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\javascript,
> -compiler.targets=JSRoyale,
> D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\src\main\royale\App.mxml
>
>
> The release execution does not change, the error is the same as before (SDK compilation from the develop branch):
>
> Se produjo una excepción: ReferenceError: Error #1065: Variable com.iest.winplusweb.models.MasterConfigSystemModel is not defined.
> at yR (http://localhost:8080/WPWebRelease/App.js:3605:1771 <http://localhost:8080/WPWebRelease/App.js:3605:1771>)
> at Mya (http://localhost:8080/WPWebRelease/App.js:3343:365 <http://localhost:8080/WPWebRelease/App.js:3343:365>)
> at AR.J.usa (http://localhost:8080/WPWebRelease/App.js:434:441 <http://localhost:8080/WPWebRelease/App.js:434:441>)
> at GFa.J.fromTypeDefinition (http://localhost:8080/WPWebRelease/App.js:5706:139 <http://localhost:8080/WPWebRelease/App.js:5706:139>)
> at Function.YT.getTypeDescriptor (http://localhost:8080/WPWebRelease/App.js:4570:820 <http://localhost:8080/WPWebRelease/App.js:4570:820>)
> at Function.fX.constructBean (http://localhost:8080/WPWebRelease/App.js:2336:472 <http://localhost:8080/WPWebRelease/App.js:2336:472>)
> at r$.J.initialize (http://localhost:8080/WPWebRelease/App.js:5041:66 <http://localhost:8080/WPWebRelease/App.js:5041:66>)
> at OW.J.init (http://localhost:8080/WPWebRelease/App.js:950:452 <http://localhost:8080/WPWebRelease/App.js:950:452>)
> at OW.J.u (http://localhost:8080/WPWebRelease/App.js:951:454 <http://localhost:8080/WPWebRelease/App.js:951:454>)
> at $$.J.addBead (http://localhost:8080/WPWebRelease/App.js:357:549 <http://localhost:8080/WPWebRelease/App.js:357:549>)
>
> The main difference:
> project compiled from "SDK-develop" runs fine in js-debug and gives error in js-release and, compiled from "SDK-ROYALE_INTERFACE_INFO" does not launch because of conversion error.
>
> Hiedra
>
> De: Roman Isitua <romanisitua@gmail.com <ma...@gmail.com>>
> Enviado el: martes, 28 de diciembre de 2021 15:55
> Para: users@royale.apache.org <ma...@royale.apache.org>
> Asunto: Re: Load time is very slow
>
> @Harb
>
> I have checked out the feature/ROYALE_INTERFACE_INFO branch and compiled asjs and compiler. I have rebuilt my application with modules in release mode.
>
> I get the following error when I attempt to launch a module
>
>
> <image001.png>
>
>
> The module loads fine in debug mode
>
> <image002.png>
>
>
> Snippets of the log
>
> Overview.js:786 Uncaught TypeError: cm.valuesImpl.init is not a function
> at Rr.Mr.yl (Overview.js:786)
> at Function.iq.generateMXMLProperties (Overview.js:736)
> at Rr.hq.generateMXMLAttributes (Overview.js:546)
> at new Rr (Overview.js:804)
> at LN.J.loadHandler (FrontEnd.js:1967)
> Mr.yl @ Overview.js:786
> iq.generateMXMLProperties @ Overview.js:736
> hq.generateMXMLAttributes @ Overview.js:546
> Rr @ Overview.js:804
> J.loadHandler @ FrontEnd.js:1967
> load (async)
> LN.loadModule @ FrontEnd.js:1965
> dN.loadModule @ FrontEnd.js:2406
> LD.Un @ FrontEnd.js:1809
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:248
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
>
>
> I have attached the full log to this email.
>
>
>
>
> On Tue, Dec 28, 2021 at 2:51 PM Roman Isitua <romanisitua@gmail.com <ma...@gmail.com>> wrote:
> Hi Maria,
>
> Prior to starting this mail discussion "Load time is very slow". I can confirm I have only been compiling in debug mode. My target\javascript\bin\ only had js-debug. It was after I upgraded my royale sdk from 0.9.7 to 0.9.8 that I compiled in release mode.
>
>
>
> On Tue, Dec 28, 2021 at 2:24 PM Maria Jose Esteve <mjesteve@iest.com <ma...@iest.com>> wrote:
> Hi, @Roman, I think you are doing a double compile can it be? My times are the same as yours and I always compile in debug and release.
>
> Look at your target folder " target\javascript\bin\" and if you have two folders: js-debug and js-release you are compiling always double.
>
> In my case, the architecture of my project as well as the Maven compilation files (pom.xml) were provided by an external company (we didn't know anything about Maven or Royale at that time) and I understand that this formula was chosen to show us the options we had.
>
> A priori and without doing any test as Harb has done, I think that modularity gives us the advantage of compiling parts of the code once and not compiling them again if they are not modified. So far WITH MY COMPILATION TIMES, sometimes more than 1 minute, this is fundamental. But of course, now we have the problem of minification of the modules and it is really a serious problem because it is impossible for us to deploy in production.
>
> I will try to separate the compiación realese with a profile and if I succeed I will pass it to you @Roman.
>
> @Harb what do you mean by compiling the ROYALE_INTERFACE_INFO branch?
>
> Hiedra
>
> De: Harbs <harbs.lists@gmail.com <ma...@gmail.com>>
> Enviado el: lunes, 27 de diciembre de 2021 18:32
> Para: users@royale.apache.org <ma...@royale.apache.org>
> Asunto: Re: Load time is very slow
>
> That doesn’t sound right.
>
> Are you sure you’re compiling debug and not release? That sounds like release build times.
>
>
> On Dec 27, 2021, at 3:31 PM, Roman Isitua <romanisitua@gmail.com <ma...@gmail.com>> wrote:
>
> Wow ! You are using a workstation with a bleeding edge processor.
>
> I just compiled my app now. It took 44 seconds. (First compilation after ide start up.) Subsequently compilations are usually 19s to 20s.
>
> My application code base is very very small compared to yours. As we continue to add functionality, I expect the compile times to rise.
>
>
>
>
> <MainApp_pom.xml><Overview_pom.xml><fm_client2_pom.xml>
RE: Compiling Modules (was Re: Load time is very slow)
Posted by Maria Jose Esteve <mj...@iest.com>.
No Harb, we have in common the Maven compilation and the use of Maven modules.
But I take this opportunity to show you a "curious" test, look at the error displayed in the Debug Console... (The sdk compiled from develop the error references the js-debug folder, even though it is running from js-release)
A : SDK compiled on branch ROYALE_INTERFACE_INFO
B: SDK compiled on branch develop
Test 1) Basic:
Additional options in the Library (mvn modules) and in the main application:
-source-map=true;
-show-binding-warnings=false;
-source-map-source-root=${project.basedir}/src/main/royale/; <!—This option is not in the pom of the main application, only in the library -->
-js-default-initializers=true;
-js-dynamic-access-unknown-members=true;
-keep-as3-metadata+=Inject,Dispatcher,EventHandler,Event,PostConstruct,PreDestroy,ViewAdded,ViewRemoved,Bindable,Transient;
-keep-code-with-metadata=Inject;
A.
DEBUG: OK
RELEASE: Error
Se produjo una excepción: ReferenceError: Error #1065: Variable com.iest.winplusweb.models.MasterConfigSystemModel is not defined.
at MQ (http://localhost:8080/WPWebRelease/App.js:4315:1727)
at Function.I$.getMetadataHost (http://localhost:8080/WPWebRelease/App.js:6303:45)
at F9.getMetadataHost (http://localhost:8080/WPWebRelease/App.js:6711:147)
at F9.getMetadataHosts (http://localhost:8080/WPWebRelease/App.js:6710:299)
at F9.fromTypeDefinition (http://localhost:8080/WPWebRelease/App.js:6711:381)
at Function.dT.getTypeDescriptor (http://localhost:8080/WPWebRelease/App.js:5469:885)
at Function.GW.constructBean (http://localhost:8080/WPWebRelease/App.js:2753:296)
at n$.initializeBeans (http://localhost:8080/WPWebRelease/App.js:5994:1046)
at n$.initialize (http://localhost:8080/WPWebRelease/App.js:5994:915)
at oW.constructProviders (http://localhost:8080/WPWebRelease/App.js:1152:254)
Message in Console:
Uncaught ReferenceError: Error #1065: Variable com.iest.winplusweb.models.MasterConfigSystemModel is not defined.
MQ @ D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\javascript\bin\js-release\App.js:4315:1727
B.
DEBUG:OK
RELEASE: Same error
Message in Console:
Uncaught ReferenceError: Error #1065: Variable com.iest.winplusweb.models.MasterConfigSystemModel is not defined.
MQ @ d:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\javascript\bin\js-debug\org\apache\royale\reflection\getDefinitionByName.js:61:11
Hiedra
De: Harbs <ha...@gmail.com>
Enviado el: jueves, 30 de diciembre de 2021 19:42
Para: users@royale.apache.org
Asunto: Re: Compiling Modules (was Re: Load time is very slow)
Wait. I’m confused.
Does your app work? I’m assuming that your app is not the same as Roman’s.
On Dec 30, 2021, at 8:07 PM, Maria Jose Esteve <mj...@iest.com>> wrote:
I was preparing an email with a battery of tests but I don't use any configuration or property files... maybe I'd better stop and read it to you.
Hiedra
De: Harbs <ha...@gmail.com>>
Enviado el: jueves, 30 de diciembre de 2021 18:56
Para: users@royale.apache.org<ma...@royale.apache.org>
Asunto: Re: Compiling Modules (was Re: Load time is very slow)
1. I’d get rid of the agressive minification options. It will likely cause issues. If you get it to work without those options, you can try to add them back in and see if it still works.
2. You seem to be missing the compiler options explained here: https://apache.github.io/royale-docs/features/modules#minification
For a pom, it would look something like this (adjust your paths to match your setup):
Main app:
<additionalCompilerOptions>-source-map=true;-js-compiler-option=--variable_map_output_file gccvars.txt;-js-compiler-option+=--property_map_output_file gccprops.txt</additionalCompilerOptions>
Module:
<additionalCompilerOptions>-source-map=true;-js-compiler-option=--variable_map_input_file ../../../../../MainApp/bin/js-release/gccvars.txt;-js-compiler-option+=--property_map_input_file ../../../../../MainApp/bin/js-release/gccprops.txt</additionalCompilerOptions>
On Dec 30, 2021, at 7:43 PM, Roman Isitua <ro...@gmail.com>> wrote:
I think it will be better for me to share my pom's that way you can see all the compilation options used. The pom for the parent (FmClient2), the MainApp and one module (Overview) have been attached to this email.
On Thu, Dec 30, 2021 at 6:22 PM Harbs <ha...@gmail.com>> wrote:
Roman, can you share your full compiler options?
I decided to remove the below settings completely
-export-public-symbols=false
-prevent-rename-protected-symbols=false
-prevent-rename-public-symbols=false
-prevent-rename-internal-symbols=false
I enabled the below settings
-js-dynamic-access-unknown-members=true;
-js-default-initializers=true
The release version starts up
Hiedra, that’s great!
On Dec 30, 2021, at 7:15 PM, Roman Isitua <ro...@gmail.com>> wrote:
Yes. I am testing with the sdk compiled on branch ROYALE_INTERFACE_INFO
On Thu, Dec 30, 2021 at 6:10 PM Maria Jose Esteve <mj...@iest.com>> wrote:
Roman, are you testing with the SDK compiled from the Harb branches, ROYALE_INTERFACE_INFO, or from develop?
Hiedra
De: Roman Isitua <ro...@gmail.com>>
Enviado el: jueves, 30 de diciembre de 2021 16:52
Para: users@royale.apache.org<ma...@royale.apache.org>
Asunto: Re: Compiling Modules (was Re: Load time is very slow)
I decided to remove the below settings completely
-export-public-symbols=false
-prevent-rename-protected-symbols=false
-prevent-rename-public-symbols=false
-prevent-rename-internal-symbols=false
I enabled the below settings
-js-dynamic-access-unknown-members=true;
-js-default-initializers=true
The release version starts up
<image001.png>
<image002.png>
However, the moment I launch a module. I get the below error
<image003.png>
It appears to be failing when I launch the "Overview" module (by clicking the Overview side menu).
So my current observation is that by retaining only two settings
-js-dynamic-access-unknown-members=true;
-js-default-initializers=true
The release module starts up but the app fails whenever I launch a module.
The smallest size settings in the documentation do not work. The app does not start up.
-export-public-symbols=false
-prevent-rename-protected-symbols=false
-prevent-rename-public-symbols=false
-prevent-rename-internal-symbols=false
The error trace is below
Uncaught TypeError: cm.valuesImpl.init is not a function
at Wr.Rr.pl<http://wr.rr.pl/> (Overview.js:792)
at Function.mq.generateMXMLProperties (Overview.js:743)
at Wr.lq.generateMXMLAttributes (Overview.js:551)
at new Wr (Overview.js:810)
at QN.J.loadHandler (FrontEnd.js:1978)
3Overview.js:56 Uncaught TypeError: Cannot read properties of undefined (reading 'prototype')
at P (Overview.js:56)
at VG.convert (FrontEnd.js:910)
at ny (FrontEnd.js:250)
at HTMLElement.iy (FrontEnd.js:125)
at HTMLElement.b (FrontEnd.js:121)
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOut (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOver (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOver @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOut (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOut @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOver (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOver @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOut (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOut @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOver (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOver @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOut (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOut @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOver (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOver @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOut (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOut @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
On Thu, Dec 30, 2021 at 4:32 PM Roman Isitua <ro...@gmail.com>> wrote:
I get the same error even when I set the -js-dynamic-access-unknown-members=true;
On Thu, Dec 30, 2021 at 4:24 PM Roman Isitua <ro...@gmail.com>> wrote:
Using the below settings,
-export-public-symbols=false
-prevent-rename-protected-symbols=false
-prevent-rename-public-symbols=false
-prevent-rename-internal-symbols=false
-js-dynamic-access-unknown-members=false;
-js-default-initializers=true
Debug version runs fine. The release version does not start up
<image004.png>
I get the below errors
Uncaught TypeError: Cannot read properties of undefined (reading 'apply')
at KE.hm (FrontEnd.js:1600)
at XE.M.Fb (FrontEnd.js:943)
at XE.M.uh (FrontEnd.js:937)
at FE.M.na<http://fe.m.na/> (FrontEnd.js:497)
at FE.M.v (FrontEnd.js:497)
at dR.M.S (FrontEnd.js:213)
at dR.Nz.S (FrontEnd.js:217)
at dR.M.start (FrontEnd.js:1396)
at index.html:45
:8080/favicon.ico:1 Failed to load resource: the server responded with a status of 404 (Not Found)
FrontEnd.js is the start up class for the application. i.e. It implements the Jewel application class.
On Thu, Dec 30, 2021 at 3:19 PM Roman Isitua <ro...@gmail.com>> wrote:
Hi Harb,
Thanks for your response. I have gone through the documentation. I will do my test again starting with the smallest size option and share my findings.
Regards,
On Thu, Dec 30, 2021 at 10:59 AM Harbs <ha...@gmail.com>> wrote:
Sorry for my deal in responding.
Let’s take a step back.
I’m not sure how you are compiling your modules. I just added some content to the module documentation page which explains what compiler options you need while compiling modules. (It still needs some editing.) https://apache.github.io/royale-docs/features/modules#minification
Are you using those options?
On Dec 29, 2021, at 2:19 AM, Maria Jose Esteve <mj...@iest.com>> wrote:
Hi, Let me join you with these tests....
@Harb, I have compiled the SDK from this branch, feature/ROYALE_INTERFACE_INFO, and when running in debug I get this error:
Message on the PURGE CONSOLE is displayed:
Cannot convert org.apache.royale.reflection.beads.ClassAliasBead to IBead
Message in the IDE Window:
Se produjo una excepción: TypeError: Cannot convert [object Object] to IBead
at App.org.apache.royale.core.ElementWrapper.addBead (http://localhost:8080/WNetSuitePlus/org/apache/royale/core/ElementWrapper.js:114:11)
at App.org.apache.royale.core.HTMLElementWrapper.addBead (http://localhost:8080/WNetSuitePlus/org/apache/royale/core/HTMLElementWrapper.js:43:65)
at App.org.apache.royale.jewel.Application.start (http://localhost:8080/WNetSuitePlus/org/apache/royale/jewel/Application.js:246:10)
at App.App_loadXML (http://localhost:8080/WNetSuitePlus/App.js:1681:25)
at org.apache.royale.net.URLLoader.org.apache.royale.events.EventDispatcher.fireListeners (http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:97:23)
at Function.goog.events.EventTarget.dispatchEventInternal_ (http://localhost:8080/WNetSuitePlus/library/closure/goog/events/eventtarget.js:381:26)
at org.apache.royale.net.URLLoader.org.apache.royale.events.EventDispatcher.dispatchEvent (http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:72:37)
at org.apache.royale.net.URLLoader.jsEventHandler (http://localhost:8080/WNetSuitePlus/org/apache/royale/net/URLLoader.js:169:12)
Call stack:
<image003.png>
[INFO] Executing MXMLC in tool group Royale with args: [
-load-config=D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\compile-app-config.xml,
-js-default-initializers=true,
-source-map=true,
-js-dynamic-access-unknown-members=true,
-keep-as3-metadata+=Inject,Dispatcher,EventHandler,Event,PostConstruct,PreDestroy,ViewAdded,ViewRemoved,Bindable,Transient,
-keep-code-with-metadata=Inject,
-show-binding-warnings=false,
-export-public-symbols=false,
-prevent-rename-protected-symbols=false,
-prevent-rename-internal-symbols=false,
-js-output=D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\javascript,
-compiler.targets=JSRoyale,
D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\src\main\royale\App.mxml
The release execution does not change, the error is the same as before (SDK compilation from the develop branch):
Se produjo una excepción: ReferenceError: Error #1065: Variable com.iest.winplusweb.models.MasterConfigSystemModel is not defined.
at yR (http://localhost:8080/WPWebRelease/App.js:3605:1771)
at Mya (http://localhost:8080/WPWebRelease/App.js:3343:365)
at AR.J.usa (http://localhost:8080/WPWebRelease/App.js:434:441)
at GFa.J.fromTypeDefinition (http://localhost:8080/WPWebRelease/App.js:5706:139)
at Function.YT.getTypeDescriptor (http://localhost:8080/WPWebRelease/App.js:4570:820)
at Function.fX.constructBean (http://localhost:8080/WPWebRelease/App.js:2336:472)
at r$.J.initialize (http://localhost:8080/WPWebRelease/App.js:5041:66)
at OW.J.init (http://localhost:8080/WPWebRelease/App.js:950:452)
at OW.J.u (http://localhost:8080/WPWebRelease/App.js:951:454)
at $$.J.addBead (http://localhost:8080/WPWebRelease/App.js:357:549)
The main difference:
project compiled from "SDK-develop" runs fine in js-debug and gives error in js-release and, compiled from "SDK-ROYALE_INTERFACE_INFO" does not launch because of conversion error.
Hiedra
De: Roman Isitua <ro...@gmail.com>>
Enviado el: martes, 28 de diciembre de 2021 15:55
Para: users@royale.apache.org<ma...@royale.apache.org>
Asunto: Re: Load time is very slow
@Harb
I have checked out the feature/ROYALE_INTERFACE_INFO branch and compiled asjs and compiler. I have rebuilt my application with modules in release mode.
I get the following error when I attempt to launch a module
<image001.png>
The module loads fine in debug mode
<image002.png>
Snippets of the log
Overview.js:786 Uncaught TypeError: cm.valuesImpl.init is not a function
at Rr.Mr.yl (Overview.js:786)
at Function.iq.generateMXMLProperties (Overview.js:736)
at Rr.hq.generateMXMLAttributes (Overview.js:546)
at new Rr (Overview.js:804)
at LN.J.loadHandler (FrontEnd.js:1967)
Mr.yl @ Overview.js:786
iq.generateMXMLProperties @ Overview.js:736
hq.generateMXMLAttributes @ Overview.js:546
Rr @ Overview.js:804
J.loadHandler @ FrontEnd.js:1967
load (async)
LN.loadModule @ FrontEnd.js:1965
dN.loadModule @ FrontEnd.js:2406
LD.Un @ FrontEnd.js:1809
ny @ FrontEnd.js:123
ny @ FrontEnd.js:248
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
I have attached the full log to this email.
On Tue, Dec 28, 2021 at 2:51 PM Roman Isitua <ro...@gmail.com>> wrote:
Hi Maria,
Prior to starting this mail discussion "Load time is very slow". I can confirm I have only been compiling in debug mode. My target\javascript\bin\ only had js-debug. It was after I upgraded my royale sdk from 0.9.7 to 0.9.8 that I compiled in release mode.
On Tue, Dec 28, 2021 at 2:24 PM Maria Jose Esteve <mj...@iest.com>> wrote:
Hi, @Roman, I think you are doing a double compile can it be? My times are the same as yours and I always compile in debug and release.
Look at your target folder " target\javascript\bin\" and if you have two folders: js-debug and js-release you are compiling always double.
In my case, the architecture of my project as well as the Maven compilation files (pom.xml) were provided by an external company (we didn't know anything about Maven or Royale at that time) and I understand that this formula was chosen to show us the options we had.
A priori and without doing any test as Harb has done, I think that modularity gives us the advantage of compiling parts of the code once and not compiling them again if they are not modified. So far WITH MY COMPILATION TIMES, sometimes more than 1 minute, this is fundamental. But of course, now we have the problem of minification of the modules and it is really a serious problem because it is impossible for us to deploy in production.
I will try to separate the compiación realese with a profile and if I succeed I will pass it to you @Roman.
@Harb what do you mean by compiling the ROYALE_INTERFACE_INFO branch?
Hiedra
De: Harbs <ha...@gmail.com>>
Enviado el: lunes, 27 de diciembre de 2021 18:32
Para: users@royale.apache.org<ma...@royale.apache.org>
Asunto: Re: Load time is very slow
That doesn’t sound right.
Are you sure you’re compiling debug and not release? That sounds like release build times.
On Dec 27, 2021, at 3:31 PM, Roman Isitua <ro...@gmail.com>> wrote:
Wow ! You are using a workstation with a bleeding edge processor.
I just compiled my app now. It took 44 seconds. (First compilation after ide start up.) Subsequently compilations are usually 19s to 20s.
My application code base is very very small compared to yours. As we continue to add functionality, I expect the compile times to rise.
<MainApp_pom.xml><Overview_pom.xml><fm_client2_pom.xml>
Re: Compiling Modules (was Re: Load time is very slow)
Posted by Harbs <ha...@gmail.com>.
Wait. I’m confused.
Does your app work? I’m assuming that your app is not the same as Roman’s.
> On Dec 30, 2021, at 8:07 PM, Maria Jose Esteve <mj...@iest.com> wrote:
>
> I was preparing an email with a battery of tests but I don't use any configuration or property files... maybe I'd better stop and read it to you.
>
> Hiedra
>
> De: Harbs <ha...@gmail.com>
> Enviado el: jueves, 30 de diciembre de 2021 18:56
> Para: users@royale.apache.org
> Asunto: Re: Compiling Modules (was Re: Load time is very slow)
>
> 1. I’d get rid of the agressive minification options. It will likely cause issues. If you get it to work without those options, you can try to add them back in and see if it still works.
> 2. You seem to be missing the compiler options explained here: https://apache.github.io/royale-docs/features/modules#minification <https://apache.github.io/royale-docs/features/modules#minification>
>
> For a pom, it would look something like this (adjust your paths to match your setup):
>
> Main app:
> <additionalCompilerOptions>-source-map=true;-js-compiler-option=--variable_map_output_file gccvars.txt;-js-compiler-option+=--property_map_output_file gccprops.txt</additionalCompilerOptions>
>
> Module:
> <additionalCompilerOptions>-source-map=true;-js-compiler-option=--variable_map_input_file ../../../../../MainApp/bin/js-release/gccvars.txt;-js-compiler-option+=--property_map_input_file ../../../../../MainApp/bin/js-release/gccprops.txt</additionalCompilerOptions>
>
> On Dec 30, 2021, at 7:43 PM, Roman Isitua <romanisitua@gmail.com <ma...@gmail.com>> wrote:
>
> I think it will be better for me to share my pom's that way you can see all the compilation options used. The pom for the parent (FmClient2), the MainApp and one module (Overview) have been attached to this email.
>
>
> On Thu, Dec 30, 2021 at 6:22 PM Harbs <harbs.lists@gmail.com <ma...@gmail.com>> wrote:
> Roman, can you share your full compiler options?
>
> I decided to remove the below settings completely
> -export-public-symbols=false
> -prevent-rename-protected-symbols=false
> -prevent-rename-public-symbols=false
> -prevent-rename-internal-symbols=false
>
>
> I enabled the below settings
>
> -js-dynamic-access-unknown-members=true;
> -js-default-initializers=true
>
>
> The release version starts up
>
> Hiedra, that’s great!
>
>
> On Dec 30, 2021, at 7:15 PM, Roman Isitua <romanisitua@gmail.com <ma...@gmail.com>> wrote:
>
>
> Yes. I am testing with the sdk compiled on branch ROYALE_INTERFACE_INFO
>
> On Thu, Dec 30, 2021 at 6:10 PM Maria Jose Esteve <mjesteve@iest.com <ma...@iest.com>> wrote:
> Roman, are you testing with the SDK compiled from the Harb branches, ROYALE_INTERFACE_INFO, or from develop?
>
> Hiedra
>
> De: Roman Isitua <romanisitua@gmail.com <ma...@gmail.com>>
> Enviado el: jueves, 30 de diciembre de 2021 16:52
> Para: users@royale.apache.org <ma...@royale.apache.org>
> Asunto: Re: Compiling Modules (was Re: Load time is very slow)
>
> I decided to remove the below settings completely
> -export-public-symbols=false
> -prevent-rename-protected-symbols=false
> -prevent-rename-public-symbols=false
> -prevent-rename-internal-symbols=false
>
>
> I enabled the below settings
>
> -js-dynamic-access-unknown-members=true;
> -js-default-initializers=true
>
>
> The release version starts up
>
>
>
> <image001.png>
>
>
> <image002.png>
>
> However, the moment I launch a module. I get the below error
>
> <image003.png>
>
>
> It appears to be failing when I launch the "Overview" module (by clicking the Overview side menu).
>
> So my current observation is that by retaining only two settings
>
> -js-dynamic-access-unknown-members=true;
> -js-default-initializers=true
>
> The release module starts up but the app fails whenever I launch a module.
>
> The smallest size settings in the documentation do not work. The app does not start up.
>
> -export-public-symbols=false
> -prevent-rename-protected-symbols=false
> -prevent-rename-public-symbols=false
> -prevent-rename-internal-symbols=false
>
>
>
> The error trace is below
>
>
> Uncaught TypeError: cm.valuesImpl.init is not a function
> at Wr.Rr.pl <http://wr.rr.pl/> (Overview.js:792)
> at Function.mq.generateMXMLProperties (Overview.js:743)
> at Wr.lq.generateMXMLAttributes (Overview.js:551)
> at new Wr (Overview.js:810)
> at QN.J.loadHandler (FrontEnd.js:1978)
> 3Overview.js:56 Uncaught TypeError: Cannot read properties of undefined (reading 'prototype')
> at P (Overview.js:56)
> at VG.convert (FrontEnd.js:910)
> at ny (FrontEnd.js:250)
> at HTMLElement.iy (FrontEnd.js:125)
> at HTMLElement.b (FrontEnd.js:121)
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOut (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOver (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOver @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOut (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOut @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOver (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOver @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOut (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOut @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOver (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOver @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOut (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOut @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOver (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOver @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOut (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOut @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
>
> On Thu, Dec 30, 2021 at 4:32 PM Roman Isitua <romanisitua@gmail.com <ma...@gmail.com>> wrote:
> I get the same error even when I set the -js-dynamic-access-unknown-members=true;
>
> On Thu, Dec 30, 2021 at 4:24 PM Roman Isitua <romanisitua@gmail.com <ma...@gmail.com>> wrote:
>
> Using the below settings,
>
> -export-public-symbols=false
> -prevent-rename-protected-symbols=false
> -prevent-rename-public-symbols=false
> -prevent-rename-internal-symbols=false
> -js-dynamic-access-unknown-members=false;
> -js-default-initializers=true
>
>
> Debug version runs fine. The release version does not start up
>
> <image004.png>
>
>
> I get the below errors
>
> Uncaught TypeError: Cannot read properties of undefined (reading 'apply')
> at KE.hm (FrontEnd.js:1600)
> at XE.M.Fb (FrontEnd.js:943)
> at XE.M.uh (FrontEnd.js:937)
> at FE.M.na <http://fe.m.na/> (FrontEnd.js:497)
> at FE.M.v (FrontEnd.js:497)
> at dR.M.S (FrontEnd.js:213)
> at dR.Nz.S (FrontEnd.js:217)
> at dR.M.start (FrontEnd.js:1396)
> at index.html:45
> :8080/favicon.ico:1 Failed to load resource: the server responded with a status of 404 (Not Found)
>
>
> FrontEnd.js is the start up class for the application. i.e. It implements the Jewel application class.
>
>
>
> On Thu, Dec 30, 2021 at 3:19 PM Roman Isitua <romanisitua@gmail.com <ma...@gmail.com>> wrote:
> Hi Harb,
>
> Thanks for your response. I have gone through the documentation. I will do my test again starting with the smallest size option and share my findings.
>
> Regards,
>
> On Thu, Dec 30, 2021 at 10:59 AM Harbs <harbs.lists@gmail.com <ma...@gmail.com>> wrote:
> Sorry for my deal in responding.
>
> Let’s take a step back.
>
> I’m not sure how you are compiling your modules. I just added some content to the module documentation page which explains what compiler options you need while compiling modules. (It still needs some editing.) https://apache.github.io/royale-docs/features/modules#minification <https://apache.github.io/royale-docs/features/modules#minification>
>
> Are you using those options?
>
>
> On Dec 29, 2021, at 2:19 AM, Maria Jose Esteve <mjesteve@iest.com <ma...@iest.com>> wrote:
>
> Hi, Let me join you with these tests....
>
> @Harb, I have compiled the SDK from this branch, feature/ROYALE_INTERFACE_INFO, and when running in debug I get this error:
>
> Message on the PURGE CONSOLE is displayed:
>
> Cannot convert org.apache.royale.reflection.beads.ClassAliasBead to IBead
>
> Message in the IDE Window:
>
> Se produjo una excepción: TypeError: Cannot convert [object Object] to IBead
> at App.org.apache.royale.core.ElementWrapper.addBead (http://localhost:8080/WNetSuitePlus/org/apache/royale/core/ElementWrapper.js:114:11 <http://localhost:8080/WNetSuitePlus/org/apache/royale/core/ElementWrapper.js:114:11>)
> at App.org.apache.royale.core.HTMLElementWrapper.addBead (http://localhost:8080/WNetSuitePlus/org/apache/royale/core/HTMLElementWrapper.js:43:65 <http://localhost:8080/WNetSuitePlus/org/apache/royale/core/HTMLElementWrapper.js:43:65>)
> at App.org.apache.royale.jewel.Application.start (http://localhost:8080/WNetSuitePlus/org/apache/royale/jewel/Application.js:246:10 <http://localhost:8080/WNetSuitePlus/org/apache/royale/jewel/Application.js:246:10>)
> at App.App_loadXML (http://localhost:8080/WNetSuitePlus/App.js:1681:25 <http://localhost:8080/WNetSuitePlus/App.js:1681:25>)
> at org.apache.royale.net.URLLoader.org.apache.royale.events.EventDispatcher.fireListeners (http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:97:23 <http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:97:23>)
> at Function.goog.events.EventTarget.dispatchEventInternal_ (http://localhost:8080/WNetSuitePlus/library/closure/goog/events/eventtarget.js:381:26 <http://localhost:8080/WNetSuitePlus/library/closure/goog/events/eventtarget.js:381:26>)
> at org.apache.royale.net.URLLoader.org.apache.royale.events.EventDispatcher.dispatchEvent (http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:72:37 <http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:72:37>)
> at org.apache.royale.net.URLLoader.jsEventHandler (http://localhost:8080/WNetSuitePlus/org/apache/royale/net/URLLoader.js:169:12 <http://localhost:8080/WNetSuitePlus/org/apache/royale/net/URLLoader.js:169:12>)
>
> Call stack:
>
> <image003.png>
>
> [INFO] Executing MXMLC in tool group Royale with args: [
> -load-config=D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\compile-app-config.xml,
> -js-default-initializers=true,
> -source-map=true,
> -js-dynamic-access-unknown-members=true,
> -keep-as3-metadata+=Inject,Dispatcher,EventHandler,Event,PostConstruct,PreDestroy,ViewAdded,ViewRemoved,Bindable,Transient,
> -keep-code-with-metadata=Inject,
> -show-binding-warnings=false,
> -export-public-symbols=false,
> -prevent-rename-protected-symbols=false,
> -prevent-rename-internal-symbols=false,
> -js-output=D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\javascript,
> -compiler.targets=JSRoyale,
> D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\src\main\royale\App.mxml
>
>
> The release execution does not change, the error is the same as before (SDK compilation from the develop branch):
>
> Se produjo una excepción: ReferenceError: Error #1065: Variable com.iest.winplusweb.models.MasterConfigSystemModel is not defined.
> at yR (http://localhost:8080/WPWebRelease/App.js:3605:1771 <http://localhost:8080/WPWebRelease/App.js:3605:1771>)
> at Mya (http://localhost:8080/WPWebRelease/App.js:3343:365 <http://localhost:8080/WPWebRelease/App.js:3343:365>)
> at AR.J.usa (http://localhost:8080/WPWebRelease/App.js:434:441 <http://localhost:8080/WPWebRelease/App.js:434:441>)
> at GFa.J.fromTypeDefinition (http://localhost:8080/WPWebRelease/App.js:5706:139 <http://localhost:8080/WPWebRelease/App.js:5706:139>)
> at Function.YT.getTypeDescriptor (http://localhost:8080/WPWebRelease/App.js:4570:820 <http://localhost:8080/WPWebRelease/App.js:4570:820>)
> at Function.fX.constructBean (http://localhost:8080/WPWebRelease/App.js:2336:472 <http://localhost:8080/WPWebRelease/App.js:2336:472>)
> at r$.J.initialize (http://localhost:8080/WPWebRelease/App.js:5041:66 <http://localhost:8080/WPWebRelease/App.js:5041:66>)
> at OW.J.init (http://localhost:8080/WPWebRelease/App.js:950:452 <http://localhost:8080/WPWebRelease/App.js:950:452>)
> at OW.J.u (http://localhost:8080/WPWebRelease/App.js:951:454 <http://localhost:8080/WPWebRelease/App.js:951:454>)
> at $$.J.addBead (http://localhost:8080/WPWebRelease/App.js:357:549 <http://localhost:8080/WPWebRelease/App.js:357:549>)
>
> The main difference:
> project compiled from "SDK-develop" runs fine in js-debug and gives error in js-release and, compiled from "SDK-ROYALE_INTERFACE_INFO" does not launch because of conversion error.
>
> Hiedra
>
> De: Roman Isitua <romanisitua@gmail.com <ma...@gmail.com>>
> Enviado el: martes, 28 de diciembre de 2021 15:55
> Para: users@royale.apache.org <ma...@royale.apache.org>
> Asunto: Re: Load time is very slow
>
> @Harb
>
> I have checked out the feature/ROYALE_INTERFACE_INFO branch and compiled asjs and compiler. I have rebuilt my application with modules in release mode.
>
> I get the following error when I attempt to launch a module
>
>
> <image001.png>
>
>
> The module loads fine in debug mode
>
> <image002.png>
>
>
> Snippets of the log
>
> Overview.js:786 Uncaught TypeError: cm.valuesImpl.init is not a function
> at Rr.Mr.yl (Overview.js:786)
> at Function.iq.generateMXMLProperties (Overview.js:736)
> at Rr.hq.generateMXMLAttributes (Overview.js:546)
> at new Rr (Overview.js:804)
> at LN.J.loadHandler (FrontEnd.js:1967)
> Mr.yl @ Overview.js:786
> iq.generateMXMLProperties @ Overview.js:736
> hq.generateMXMLAttributes @ Overview.js:546
> Rr @ Overview.js:804
> J.loadHandler @ FrontEnd.js:1967
> load (async)
> LN.loadModule @ FrontEnd.js:1965
> dN.loadModule @ FrontEnd.js:2406
> LD.Un @ FrontEnd.js:1809
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:248
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
>
>
> I have attached the full log to this email.
>
>
>
>
> On Tue, Dec 28, 2021 at 2:51 PM Roman Isitua <romanisitua@gmail.com <ma...@gmail.com>> wrote:
> Hi Maria,
>
> Prior to starting this mail discussion "Load time is very slow". I can confirm I have only been compiling in debug mode. My target\javascript\bin\ only had js-debug. It was after I upgraded my royale sdk from 0.9.7 to 0.9.8 that I compiled in release mode.
>
>
>
> On Tue, Dec 28, 2021 at 2:24 PM Maria Jose Esteve <mjesteve@iest.com <ma...@iest.com>> wrote:
> Hi, @Roman, I think you are doing a double compile can it be? My times are the same as yours and I always compile in debug and release.
>
> Look at your target folder " target\javascript\bin\" and if you have two folders: js-debug and js-release you are compiling always double.
>
> In my case, the architecture of my project as well as the Maven compilation files (pom.xml) were provided by an external company (we didn't know anything about Maven or Royale at that time) and I understand that this formula was chosen to show us the options we had.
>
> A priori and without doing any test as Harb has done, I think that modularity gives us the advantage of compiling parts of the code once and not compiling them again if they are not modified. So far WITH MY COMPILATION TIMES, sometimes more than 1 minute, this is fundamental. But of course, now we have the problem of minification of the modules and it is really a serious problem because it is impossible for us to deploy in production.
>
> I will try to separate the compiación realese with a profile and if I succeed I will pass it to you @Roman.
>
> @Harb what do you mean by compiling the ROYALE_INTERFACE_INFO branch?
>
> Hiedra
>
> De: Harbs <harbs.lists@gmail.com <ma...@gmail.com>>
> Enviado el: lunes, 27 de diciembre de 2021 18:32
> Para: users@royale.apache.org <ma...@royale.apache.org>
> Asunto: Re: Load time is very slow
>
> That doesn’t sound right.
>
> Are you sure you’re compiling debug and not release? That sounds like release build times.
>
>
> On Dec 27, 2021, at 3:31 PM, Roman Isitua <romanisitua@gmail.com <ma...@gmail.com>> wrote:
>
> Wow ! You are using a workstation with a bleeding edge processor.
>
> I just compiled my app now. It took 44 seconds. (First compilation after ide start up.) Subsequently compilations are usually 19s to 20s.
>
> My application code base is very very small compared to yours. As we continue to add functionality, I expect the compile times to rise.
>
>
>
>
> <MainApp_pom.xml><Overview_pom.xml><fm_client2_pom.xml>
RE: Compiling Modules (was Re: Load time is very slow)
Posted by Maria Jose Esteve <mj...@iest.com>.
I was preparing an email with a battery of tests but I don't use any configuration or property files... maybe I'd better stop and read it to you.
Hiedra
De: Harbs <ha...@gmail.com>
Enviado el: jueves, 30 de diciembre de 2021 18:56
Para: users@royale.apache.org
Asunto: Re: Compiling Modules (was Re: Load time is very slow)
1. I’d get rid of the agressive minification options. It will likely cause issues. If you get it to work without those options, you can try to add them back in and see if it still works.
2. You seem to be missing the compiler options explained here: https://apache.github.io/royale-docs/features/modules#minification
For a pom, it would look something like this (adjust your paths to match your setup):
Main app:
<additionalCompilerOptions>-source-map=true;-js-compiler-option=--variable_map_output_file gccvars.txt;-js-compiler-option+=--property_map_output_file gccprops.txt</additionalCompilerOptions>
Module:
<additionalCompilerOptions>-source-map=true;-js-compiler-option=--variable_map_input_file ../../../../../MainApp/bin/js-release/gccvars.txt;-js-compiler-option+=--property_map_input_file ../../../../../MainApp/bin/js-release/gccprops.txt</additionalCompilerOptions>
On Dec 30, 2021, at 7:43 PM, Roman Isitua <ro...@gmail.com>> wrote:
I think it will be better for me to share my pom's that way you can see all the compilation options used. The pom for the parent (FmClient2), the MainApp and one module (Overview) have been attached to this email.
On Thu, Dec 30, 2021 at 6:22 PM Harbs <ha...@gmail.com>> wrote:
Roman, can you share your full compiler options?
I decided to remove the below settings completely
-export-public-symbols=false
-prevent-rename-protected-symbols=false
-prevent-rename-public-symbols=false
-prevent-rename-internal-symbols=false
I enabled the below settings
-js-dynamic-access-unknown-members=true;
-js-default-initializers=true
The release version starts up
Hiedra, that’s great!
On Dec 30, 2021, at 7:15 PM, Roman Isitua <ro...@gmail.com>> wrote:
Yes. I am testing with the sdk compiled on branch ROYALE_INTERFACE_INFO
On Thu, Dec 30, 2021 at 6:10 PM Maria Jose Esteve <mj...@iest.com>> wrote:
Roman, are you testing with the SDK compiled from the Harb branches, ROYALE_INTERFACE_INFO, or from develop?
Hiedra
De: Roman Isitua <ro...@gmail.com>>
Enviado el: jueves, 30 de diciembre de 2021 16:52
Para: users@royale.apache.org<ma...@royale.apache.org>
Asunto: Re: Compiling Modules (was Re: Load time is very slow)
I decided to remove the below settings completely
-export-public-symbols=false
-prevent-rename-protected-symbols=false
-prevent-rename-public-symbols=false
-prevent-rename-internal-symbols=false
I enabled the below settings
-js-dynamic-access-unknown-members=true;
-js-default-initializers=true
The release version starts up
<image001.png>
<image002.png>
However, the moment I launch a module. I get the below error
<image003.png>
It appears to be failing when I launch the "Overview" module (by clicking the Overview side menu).
So my current observation is that by retaining only two settings
-js-dynamic-access-unknown-members=true;
-js-default-initializers=true
The release module starts up but the app fails whenever I launch a module.
The smallest size settings in the documentation do not work. The app does not start up.
-export-public-symbols=false
-prevent-rename-protected-symbols=false
-prevent-rename-public-symbols=false
-prevent-rename-internal-symbols=false
The error trace is below
Uncaught TypeError: cm.valuesImpl.init is not a function
at Wr.Rr.pl<http://wr.rr.pl/> (Overview.js:792)
at Function.mq.generateMXMLProperties (Overview.js:743)
at Wr.lq.generateMXMLAttributes (Overview.js:551)
at new Wr (Overview.js:810)
at QN.J.loadHandler (FrontEnd.js:1978)
3Overview.js:56 Uncaught TypeError: Cannot read properties of undefined (reading 'prototype')
at P (Overview.js:56)
at VG.convert (FrontEnd.js:910)
at ny (FrontEnd.js:250)
at HTMLElement.iy (FrontEnd.js:125)
at HTMLElement.b (FrontEnd.js:121)
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOut (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOver (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOver @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOut (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOut @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOver (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOver @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOut (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOut @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOver (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOver @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOut (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOut @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOver (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOver @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOut (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOut @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
On Thu, Dec 30, 2021 at 4:32 PM Roman Isitua <ro...@gmail.com>> wrote:
I get the same error even when I set the -js-dynamic-access-unknown-members=true;
On Thu, Dec 30, 2021 at 4:24 PM Roman Isitua <ro...@gmail.com>> wrote:
Using the below settings,
-export-public-symbols=false
-prevent-rename-protected-symbols=false
-prevent-rename-public-symbols=false
-prevent-rename-internal-symbols=false
-js-dynamic-access-unknown-members=false;
-js-default-initializers=true
Debug version runs fine. The release version does not start up
<image004.png>
I get the below errors
Uncaught TypeError: Cannot read properties of undefined (reading 'apply')
at KE.hm (FrontEnd.js:1600)
at XE.M.Fb (FrontEnd.js:943)
at XE.M.uh (FrontEnd.js:937)
at FE.M.na<http://fe.m.na/> (FrontEnd.js:497)
at FE.M.v (FrontEnd.js:497)
at dR.M.S (FrontEnd.js:213)
at dR.Nz.S (FrontEnd.js:217)
at dR.M.start (FrontEnd.js:1396)
at index.html:45
:8080/favicon.ico:1 Failed to load resource: the server responded with a status of 404 (Not Found)
FrontEnd.js is the start up class for the application. i.e. It implements the Jewel application class.
On Thu, Dec 30, 2021 at 3:19 PM Roman Isitua <ro...@gmail.com>> wrote:
Hi Harb,
Thanks for your response. I have gone through the documentation. I will do my test again starting with the smallest size option and share my findings.
Regards,
On Thu, Dec 30, 2021 at 10:59 AM Harbs <ha...@gmail.com>> wrote:
Sorry for my deal in responding.
Let’s take a step back.
I’m not sure how you are compiling your modules. I just added some content to the module documentation page which explains what compiler options you need while compiling modules. (It still needs some editing.) https://apache.github.io/royale-docs/features/modules#minification
Are you using those options?
On Dec 29, 2021, at 2:19 AM, Maria Jose Esteve <mj...@iest.com>> wrote:
Hi, Let me join you with these tests....
@Harb, I have compiled the SDK from this branch, feature/ROYALE_INTERFACE_INFO, and when running in debug I get this error:
Message on the PURGE CONSOLE is displayed:
Cannot convert org.apache.royale.reflection.beads.ClassAliasBead to IBead
Message in the IDE Window:
Se produjo una excepción: TypeError: Cannot convert [object Object] to IBead
at App.org.apache.royale.core.ElementWrapper.addBead (http://localhost:8080/WNetSuitePlus/org/apache/royale/core/ElementWrapper.js:114:11)
at App.org.apache.royale.core.HTMLElementWrapper.addBead (http://localhost:8080/WNetSuitePlus/org/apache/royale/core/HTMLElementWrapper.js:43:65)
at App.org.apache.royale.jewel.Application.start (http://localhost:8080/WNetSuitePlus/org/apache/royale/jewel/Application.js:246:10)
at App.App_loadXML (http://localhost:8080/WNetSuitePlus/App.js:1681:25)
at org.apache.royale.net.URLLoader.org.apache.royale.events.EventDispatcher.fireListeners (http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:97:23)
at Function.goog.events.EventTarget.dispatchEventInternal_ (http://localhost:8080/WNetSuitePlus/library/closure/goog/events/eventtarget.js:381:26)
at org.apache.royale.net.URLLoader.org.apache.royale.events.EventDispatcher.dispatchEvent (http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:72:37)
at org.apache.royale.net.URLLoader.jsEventHandler (http://localhost:8080/WNetSuitePlus/org/apache/royale/net/URLLoader.js:169:12)
Call stack:
<image003.png>
[INFO] Executing MXMLC in tool group Royale with args: [
-load-config=D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\compile-app-config.xml,
-js-default-initializers=true,
-source-map=true,
-js-dynamic-access-unknown-members=true,
-keep-as3-metadata+=Inject,Dispatcher,EventHandler,Event,PostConstruct,PreDestroy,ViewAdded,ViewRemoved,Bindable,Transient,
-keep-code-with-metadata=Inject,
-show-binding-warnings=false,
-export-public-symbols=false,
-prevent-rename-protected-symbols=false,
-prevent-rename-internal-symbols=false,
-js-output=D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\javascript,
-compiler.targets=JSRoyale,
D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\src\main\royale\App.mxml
The release execution does not change, the error is the same as before (SDK compilation from the develop branch):
Se produjo una excepción: ReferenceError: Error #1065: Variable com.iest.winplusweb.models.MasterConfigSystemModel is not defined.
at yR (http://localhost:8080/WPWebRelease/App.js:3605:1771)
at Mya (http://localhost:8080/WPWebRelease/App.js:3343:365)
at AR.J.usa (http://localhost:8080/WPWebRelease/App.js:434:441)
at GFa.J.fromTypeDefinition (http://localhost:8080/WPWebRelease/App.js:5706:139)
at Function.YT.getTypeDescriptor (http://localhost:8080/WPWebRelease/App.js:4570:820)
at Function.fX.constructBean (http://localhost:8080/WPWebRelease/App.js:2336:472)
at r$.J.initialize (http://localhost:8080/WPWebRelease/App.js:5041:66)
at OW.J.init (http://localhost:8080/WPWebRelease/App.js:950:452)
at OW.J.u (http://localhost:8080/WPWebRelease/App.js:951:454)
at $$.J.addBead (http://localhost:8080/WPWebRelease/App.js:357:549)
The main difference:
project compiled from "SDK-develop" runs fine in js-debug and gives error in js-release and, compiled from "SDK-ROYALE_INTERFACE_INFO" does not launch because of conversion error.
Hiedra
De: Roman Isitua <ro...@gmail.com>>
Enviado el: martes, 28 de diciembre de 2021 15:55
Para: users@royale.apache.org<ma...@royale.apache.org>
Asunto: Re: Load time is very slow
@Harb
I have checked out the feature/ROYALE_INTERFACE_INFO branch and compiled asjs and compiler. I have rebuilt my application with modules in release mode.
I get the following error when I attempt to launch a module
<image001.png>
The module loads fine in debug mode
<image002.png>
Snippets of the log
Overview.js:786 Uncaught TypeError: cm.valuesImpl.init is not a function
at Rr.Mr.yl (Overview.js:786)
at Function.iq.generateMXMLProperties (Overview.js:736)
at Rr.hq.generateMXMLAttributes (Overview.js:546)
at new Rr (Overview.js:804)
at LN.J.loadHandler (FrontEnd.js:1967)
Mr.yl @ Overview.js:786
iq.generateMXMLProperties @ Overview.js:736
hq.generateMXMLAttributes @ Overview.js:546
Rr @ Overview.js:804
J.loadHandler @ FrontEnd.js:1967
load (async)
LN.loadModule @ FrontEnd.js:1965
dN.loadModule @ FrontEnd.js:2406
LD.Un @ FrontEnd.js:1809
ny @ FrontEnd.js:123
ny @ FrontEnd.js:248
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
I have attached the full log to this email.
On Tue, Dec 28, 2021 at 2:51 PM Roman Isitua <ro...@gmail.com>> wrote:
Hi Maria,
Prior to starting this mail discussion "Load time is very slow". I can confirm I have only been compiling in debug mode. My target\javascript\bin\ only had js-debug. It was after I upgraded my royale sdk from 0.9.7 to 0.9.8 that I compiled in release mode.
On Tue, Dec 28, 2021 at 2:24 PM Maria Jose Esteve <mj...@iest.com>> wrote:
Hi, @Roman, I think you are doing a double compile can it be? My times are the same as yours and I always compile in debug and release.
Look at your target folder " target\javascript\bin\" and if you have two folders: js-debug and js-release you are compiling always double.
In my case, the architecture of my project as well as the Maven compilation files (pom.xml) were provided by an external company (we didn't know anything about Maven or Royale at that time) and I understand that this formula was chosen to show us the options we had.
A priori and without doing any test as Harb has done, I think that modularity gives us the advantage of compiling parts of the code once and not compiling them again if they are not modified. So far WITH MY COMPILATION TIMES, sometimes more than 1 minute, this is fundamental. But of course, now we have the problem of minification of the modules and it is really a serious problem because it is impossible for us to deploy in production.
I will try to separate the compiación realese with a profile and if I succeed I will pass it to you @Roman.
@Harb what do you mean by compiling the ROYALE_INTERFACE_INFO branch?
Hiedra
De: Harbs <ha...@gmail.com>>
Enviado el: lunes, 27 de diciembre de 2021 18:32
Para: users@royale.apache.org<ma...@royale.apache.org>
Asunto: Re: Load time is very slow
That doesn’t sound right.
Are you sure you’re compiling debug and not release? That sounds like release build times.
On Dec 27, 2021, at 3:31 PM, Roman Isitua <ro...@gmail.com>> wrote:
Wow ! You are using a workstation with a bleeding edge processor.
I just compiled my app now. It took 44 seconds. (First compilation after ide start up.) Subsequently compilations are usually 19s to 20s.
My application code base is very very small compared to yours. As we continue to add functionality, I expect the compile times to rise.
<MainApp_pom.xml><Overview_pom.xml><fm_client2_pom.xml>
Re: Compiling Modules (was Re: Load time is very slow)
Posted by Alex Harui <ah...@adobe.com>.
The GCC way appears to have one limitation that Flex modules did not, which is asynchronous compilation. IOW, the GCC way seems to want to split up your code in one giant compile where it can consider all of your sources at the same time, whereas one key advantage of Flex modules is to allow compilation of a single module at a different time than the compilation of the main app. That is a huge advantage for geographically dispersed teams, and also helps you gain certainty that the module you just changed can’t have an effect on the main app. It also allows deployments like Form Manager apps where a shell is delivered, and new forms can be made available much later without re-deploying the shell, thus not requiring redownloading of the shell.
IIRC, I asked the GCC folks for some better tooling for asynchronous compiles but they said no. So we have to cross our fingers that we can find ways to work within their strategies. For sure, you can turn off all renaming and modules will work, so the challenge really is to try to leverage renaming and still get it to work.
In my current experiment, GCC is doing some unexpected collapsing of package trees, appearing to ignore the @nocollapse directive.
-Alex
From: Greg Dove <gr...@gmail.com>
Reply-To: "users@royale.apache.org" <us...@royale.apache.org>
Date: Tuesday, January 4, 2022 at 11:13 AM
To: "users@royale.apache.org" <us...@royale.apache.org>
Subject: Re: Compiling Modules (was Re: Load time is very slow)
Alex, this is probably more a topic for dev list (and we can definitely continue it there if need be, I would have done so, but could not figure out how to link to *this* thread properly in the archives).
When you originally worked on this, did you eliminate using the GCC approach to creating 'modules' (it used to be called 'modules' in older GCC apparently, perhaps even the one we are currently locked to, but is now called 'chunks' in more recent GCC versions) ?
Perhaps there is a technical difference or some other reason (e.g. the feature may not have been well documented) that meant it could not be used. However, if that was able to be used for royale modules, it seems like it would be faster/easier, because it is a single release compilation pass that splits the release build into multiple files, instead of using multiple passes. After reading the description for that [1] it does seem like it does all the hard work of avoiding the issues, in particular avoiding the need for the various output and input files related for renaming etc that are needed for multiple passes.
1. https://github.com/google/closure-compiler/wiki/Chunk-output-for-dynamic-loading<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fgoogle%2Fclosure-compiler%2Fwiki%2FChunk-output-for-dynamic-loading&data=04%7C01%7Caharui%40adobe.com%7Cd9296373d0a54715ebd308d9cfb657e3%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637769204353922251%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=0NVBaAmvmdYdcCHIiL7N6vcfmxGADbVwYSsPON4XBs0%3D&reserved=0>
On Wed, Jan 5, 2022 at 6:02 AM Alex Harui <ah...@adobe.com>> wrote:
Essentially, -externs-report is for the Closure (JS) Compiler. -link-report and -load-externs (one leading ‘-‘) is for the Royale Compiler to tell the Royale Compiler what classes to feed to the Closure Compiler. Both contain the same data (the set of classes used in the main app), just formatted differently and used differently.
The –externs option for the Closure Compiler then tells the Closure Compiler not to look for classes in the set of files it is supposed to minify.
So, you have the right settings for the main app, but for the module, it should be:
-js-compiler-option=--externs extrep.txt; -load-externs linkrep.txt;
However, even that won’t work today, as the Royale Compiler is not handling -load-externs on the JS prep for Closure Compiler. I have some local changes to the compiler that mixes most of it, but am facing issues with how Closure handles package paths. If that can be resolved, then we have a good chance of things working.
-Alex
From: Roman Isitua <ro...@gmail.com>>
Reply-To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Date: Tuesday, January 4, 2022 at 12:39 AM
To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Subject: Re: Compiling Modules (was Re: Load time is very slow)
Thanks for the update.
I attempted the following:
1. In the main application, I use the following setting:
-externs-report=extrep.txt; -link-report=linkrep.txt;
2. In the module I use the following
-js-compiler-option=--externs extrep.txt; -js-compiler-option+=--load-externs linkrep.txt;
The main application compiles successfully, I get a compilation error with the module
"--load-externs" is not a valid option
Sample usage: --compilation_level (-O) VAL --externs VAL --js VAL --js_output_file VAL --warning_level (-W) [QUIET | DEFAULT
| VERBOSE]
Run with --help for all options and details
Internal error: java.lang.NullPointerException com.google.javascript.jscomp.CommandLineRunner.createOptions(CommandLineRunner.java:1809)org.apache.royale.compiler.utils.JSClosureCompilerWrapper$CompilerOptionsParser.getOptions(JSClosureCompilerWrapper.java:529)org.apache.royale.compiler.utils.JSClosureCompilerWrapper.<init>(JSClosureCompilerWrapper.java:77)org.apache.royale.compiler.internal.codegen.mxml.royale.MXMLRoyalePublisher.publish(MXMLRoyalePublisher.java:395)org.apache.royale.compiler.clients.M
I don't think I am using this option correctly.
.....
On Tue, Jan 4, 2022 at 8:44 AM Alex Harui <ah...@adobe.com>> wrote:
I found some time to investigate. The -externs-report option is mostly working correctly, but other compiler changes are needed to try to avoid duplicate code in the module. I might have time to investigate more this coming weekend. It does appear that if we can correctly reference the app’s class from the module that it will work. The Closure Compiler let me compile the module after I externalize and avoid requires on everything in the main app’s externs report and -js link report, but the references in the module have collapsed packages which is either incorrect or aliases need to be created.
However I think this new approach has a better chance of working than trying to match renaming tables.
-Alex
From: Alex Harui <ah...@adobe.com>>
Reply-To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Date: Monday, January 3, 2022 at 2:30 PM
To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Subject: Re: Compiling Modules (was Re: Load time is very slow)
The -externs-report option should be similar to the -link-report option. It takes a filename. The compiler should output the classes used in the JS compile into that file. To use externs, I think you don’t need to prevent renaming in the application as long as public variables are exported. I think you specify -externs-report when compiling the application.
You may also need to output a -link-report from the application as well.
I think you then specify the externs-report file as an -externs for the -js-compiler-options when compiling the module. And maybe also specify the -link-report output as a -load-externs in the same way it was used when compiling Flex modules. The goal for the module is, like Flex, to not have any classes in the module that exist in the main app. Then it doesn’t matter about class renaming within the release-mode JS file.
HTH,
-Alex
From: Roman Isitua <ro...@gmail.com>>
Reply-To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Date: Monday, January 3, 2022 at 12:37 PM
To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Subject: Re: Compiling Modules (was Re: Load time is very slow)
I can confirm that classes are being renamed in both files.
I have attempted your suggestion i.e. removing variable maps and property maps then use
-externs-report;-export-public-symbols=true;-prevent-rename-public-symbols=true;
I get the below error
command line Error: configuration variable 'externs-report' expected 1 argument(s), got 0.
I cannot find any documentation on how to use the -externs-report argument. What does it do ? and what are the acceptable values ?
Regards,
On Sun, Jan 2, 2022 at 9:06 AM Alex Harui <ah...@adobe.com>> wrote:
Hi Roman,
It might be more complicated. The settings are probably doing something since you reported that the error occurred in the app vs the module depending on the settings.
I went back and looked at the original module example in examples/royale/ModuleExample and was surprised there weren’t more compiler settings. I thought we’d found a way to externalize the main app’s code for the module. Because if both the app and module have a copy of SimpleCSSValuesImpl or any other class that both JS files use, there could be issues as to which one gets loaded (maybe both) and what export aliases are pointing to. Sounds like changing settings affected whether the aliases pointed at module code vs app code.
I thought we were using similar settings to what we used for SWF where the module would not contain a copy of SimpleCSSValuesImpl so it would use the one loaded by the main app, but I didn’t see those settings. We might need to make that work because otherwise I think static initializations won’t do the right thing. Or maybe we’ve figured out that it is simpler just to write defensive code that doesn’t get broken. But also, if the module has its own copy of code already loaded by the main app, that’s sort of a waste of bytes. Maybe there was a minification issue with not having the module link in classes already linked into the main app. I see an -externs-report option in the compiler but the example doesn’t seem to use it.
You should be able to scan the JS files and see if a class is in both module and app and if it is getting renamed.
I don’t know if I will have time to investigate further. The currently recommended options for modules involving variable maps and property maps may need to be abandoned in favor of externs and preventing renames.
-Alex
From: Roman Isitua <ro...@gmail.com>>
Reply-To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Date: Saturday, January 1, 2022 at 3:02 AM
To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Subject: Re: Compiling Modules (was Re: Load time is very slow)
Alex, thank you for your detailed analysis of the error log.
I agree with you that the best strategy is to prevent renaming of public/exports used by the module. I have tried different options to prevent renaming
It appears none of them stops this. From my observation, it appears that this default options below
-export-public-symbols=true;-prevent-rename-public-symbols=true;-prevent-rename-public-instance-accessors=true;
Only seem to affect the main application (main module) but have no effect on the other modules even though I ensured they were applied in their respective module pom. I came to this conclusion when I decided to turn set -prevent-rename-public-symbols=false
I noticed that I got the same error but this time around in the main module.
Uncaught TypeError: this.rb[(intermediate value).Kd(...)] is not a function
at HN.iI.send (FrontEnd.js:970)
at nI.EH.Ea (FrontEnd.js:880)
at ON.q6 (FrontEnd.js:1815)
at TN.L2 (FrontEnd.js:2034)
at hF.Xf (FrontEnd.js:2063)
at lF.kb (FrontEnd.js:1233)
at lF.Vf (FrontEnd.js:1224)
at cF.O (FrontEnd.js:659)
at cF.M.w (FrontEnd.js:661)
at gQ.mA.M (FrontEnd.js:241)
FrontEnd.js maps to FrontEnd.as in my application and is the entry point of the application. This confirms that -prevent-rename-public-symbols=false has
an effect on the main module but no effect on other modules even though they were applied in the respective module pom's.
Maybe there are other options I am overlooking.
On Sat, Jan 1, 2022 at 9:31 AM Alex Harui <ah...@adobe.com>> wrote:
In case it helps, the minification (variable renaming) mechanism is essentially guaranteed to cause problems in modules. The Closure Compiler basically takes variables, sees if it is worth renaming it, then gives it the name ‘a’, then ‘b’, and so-on, (it skips a few letters, IIRC), then moves on to ‘aa’, and ‘ab’, etc. The odds that the compiler will encounter the same variables in the same order when compiling an app and one or more modules is close to zero.
I did some work to try to dump the mapping of the renamed variables in the main app and use that when compiling the modules. It was working for a while, then some code was added to the framework that started fooling the Closure Compiler. I spent some time trying to fix the Closure Compiler, but ran out of time. Meanwhile, Josh was adding more control over renaming so I moved on to other things.
IMO, the best strategy to take would be to try to control what gets renamed. All public/exports from the app that are used by the module should not be renamed. That will definitely make the app and modules bigger, but unless the Closure Compiler folks become interested in runtime-loaded modules, it is challenging for the Royale compiler to allow aggressive renaming.
I think what is going on with the exceptions below is that exporting doesn’t really prevent renaming. It only sets up an externally-visible alias to a renamed variable. Especially for static members. So it isn’t sufficient to export public variables, the code within the module must not let the Closure Compiler think that the intra-module references can be renamed, in this case, from SimpleCSSValuesImpl to QI
I don’t know the renaming options we’ve added to the Royale Compiler, so I don’t know if there is an option to control that. I think there is a way to convince the Closure Compiler to not rename SimpleCSSValuesImpl because I’ve seen other class names not get renamed.
HTH,
-Alex
From: Roman Isitua <ro...@gmail.com>>
Reply-To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Date: Friday, December 31, 2021 at 10:42 AM
To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Subject: Re: Compiling Modules (was Re: Load time is very slow)
I have tested on both. The error log is the same.
I don't understand your second question. Kindly clarify ?
I followed strictly the approach used for loading modules here in this example.
This is the only method I know for loading modules. If there is another method please share.
https://royale.apache.org/dividing-an-apache-royale-application-with-modules/<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Froyale.apache.org%2Fdividing-an-apache-royale-application-with-modules%2F&data=04%7C01%7Caharui%40adobe.com%7Cd9296373d0a54715ebd308d9cfb657e3%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637769204353922251%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=bWmWpvsfHZqNMRgLfO1DRGJOIFi0YkUEGl5y1ouP%2BzE%3D&reserved=0>
On Fri, 31 Dec 2021, 19:14 Maria Jose Esteve, <mj...@iest.com>> wrote:
@Roman, which branch did you compile the SDK from, ROYALE_INTERFACE_INFO or develop?
Could you pass the Overview.mxml view to the main application? (to rule it out)
Hiedra
De: Roman Isitua <ro...@gmail.com>>
Enviado el: viernes, 31 de diciembre de 2021 17:56
Para: users@royale.apache.org<ma...@royale.apache.org>
Asunto: Re: Compiling Modules (was Re: Load time is very slow)
I have tried tracing where the errors are happening whenever I test the release version
Uncaught TypeError: Ql.valuesImpl.init is not a function
at Hr.Cr.um (Overview.js:846)
at Function.ep.generateMXMLProperties (Overview.js:795)
at Hr.Sp.generateMXMLAttributes (Overview.js:599)
at new Hr (Overview.js:864)
at PN.M.loadHandler (FrontEnd.js:2042)
9Overview.js:173 Uncaught TypeError: this.createElement is not a function
at $B.V (Overview.js:173)
at new $B (FrontEnd.js:2430)
at EP.convert (FrontEnd.js:2430)
at Zy (FrontEnd.js:261)
at HTMLAnchorElement.Uy (FrontEnd.js:121)
at HTMLAnchorElement.Sy.b (FrontEnd.js:117)
The highlighted code in red is declared as follows in the Overview.mxml (maven module)
<j:valuesImpl>
<js:SimpleCSSValuesImpl/>
</j:valuesImpl>
The j:valuesImpl points to the following code in jewel Module.js
/**
* @nocollapse
* @export
* @type {org.apache.royale.core.IValuesImpl}
*/
org.apache.royale.jewel.Module.prototype.valuesImpl;
org.apache.royale.jewel.Module.prototype.set__valuesImpl = function(value) {
org.apache.royale.core.ValuesManager.valuesImpl.init(this);
};
it appears this function is improperly renamed and whenever the app tries to load the module is not able to recognise it as a function.
The same issue of improper function renaming is happening in the second error as well
9Overview.js:173 Uncaught TypeError: this.createElement is not a function
On Thu, Dec 30, 2021 at 10:42 PM Roman Isitua <ro...@gmail.com>> wrote:
I have applied the js compiler option as follows
<additionalCompilerOptions>-source-map=false;-compiler.show-binding-warnings=false;-js-default-initializers=true;-js-dynamic-access-unknown-members=true;
-js-compiler-option=--variable_map_output_file gccvars.txt;-js-compiler-option+=--property_map_output_file gccprops.txt
</additionalCompilerOptions>
I get the same error as before when attempting to launch the jewel module.
Error! Filename not specified.
Same error trace.
Uncaught TypeError: cm.valuesImpl.init is not a function
at Rr.Mr.yl (Overview.js:786)
at Function.iq.generateMXMLProperties (Overview.js:736)
at Rr.hq.generateMXMLAttributes (Overview.js:546)
at new Rr (Overview.js:804)
at LN.J.loadHandler (FrontEnd.js:1967)
FrontEnd.js:1640 Uncaught TypeError: M is not a function
at oM.J.handleMouseOut (FrontEnd.js:1640)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:248)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
FrontEnd.js:1640 Uncaught TypeError: M is not a function
at oM.J.handleMouseOver (FrontEnd.js:1640)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:248)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
FrontEnd.js:1640 Uncaught TypeError: M is not a function
at oM.J.handleMouseOut (FrontEnd.js:1640)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:248)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
FrontEnd.js:1640 Uncaught TypeError: M is not a function
at oM.J.handleMouseOver (FrontEnd.js:1640)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:248)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
FrontEnd.js:1640 Uncaught TypeError: M is not a function
at oM.J.handleMouseOut (FrontEnd.js:1640)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:248)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
FrontEnd.js:1640 Uncaught TypeError: M is not a function
at oM.J.handleMouseOver (FrontEnd.js:1640)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:248)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
FrontEnd.js:1640 Uncaught TypeError: M is not a function
at oM.J.handleMouseOut (FrontEnd.js:1640)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:248)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
3Overview.js:56 Uncaught TypeError: Cannot read properties of undefined (reading 'prototype')
at P (Overview.js:56)
at SG.convert (FrontEnd.js:904)
at ny (FrontEnd.js:248)
at HTMLElement.iy (FrontEnd.js:125)
at HTMLElement.b (FrontEnd.js:121)
On Thu, Dec 30, 2021 at 6:56 PM Harbs <ha...@gmail.com>> wrote:
1. I’d get rid of the agressive minification options. It will likely cause issues. If you get it to work without those options, you can try to add them back in and see if it still works.
2. You seem to be missing the compiler options explained here: https://apache.github.io/royale-docs/features/modules#minification<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapache.github.io%2Froyale-docs%2Ffeatures%2Fmodules%23minification&data=04%7C01%7Caharui%40adobe.com%7Cd9296373d0a54715ebd308d9cfb657e3%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637769204354078474%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=vlbldLMX1Uc3AKtUNheX0JtsMpDqSI5y%2FyDbYXJ%2FQbg%3D&reserved=0>
For a pom, it would look something like this (adjust your paths to match your setup):
Main app:
<additionalCompilerOptions>-source-map=true;-js-compiler-option=--variable_map_output_file gccvars.txt;-js-compiler-option+=--property_map_output_file gccprops.txt</additionalCompilerOptions>
Module:
<additionalCompilerOptions>-source-map=true;-js-compiler-option=--variable_map_input_file ../../../../../MainApp/bin/js-release/gccvars.txt;-js-compiler-option+=--property_map_input_file ../../../../../MainApp/bin/js-release/gccprops.txt</additionalCompilerOptions>
On Dec 30, 2021, at 7:43 PM, Roman Isitua <ro...@gmail.com>> wrote:
I think it will be better for me to share my pom's that way you can see all the compilation options used. The pom for the parent (FmClient2), the MainApp and one module (Overview) have been attached to this email.
On Thu, Dec 30, 2021 at 6:22 PM Harbs <ha...@gmail.com>> wrote:
Roman, can you share your full compiler options?
I decided to remove the below settings completely
-export-public-symbols=false
-prevent-rename-protected-symbols=false
-prevent-rename-public-symbols=false
-prevent-rename-internal-symbols=false
I enabled the below settings
-js-dynamic-access-unknown-members=true;
-js-default-initializers=true
The release version starts up
Hiedra, that’s great!
On Dec 30, 2021, at 7:15 PM, Roman Isitua <ro...@gmail.com>> wrote:
Yes. I am testing with the sdk compiled on branch ROYALE_INTERFACE_INFO
On Thu, Dec 30, 2021 at 6:10 PM Maria Jose Esteve <mj...@iest.com>> wrote:
Roman, are you testing with the SDK compiled from the Harb branches, ROYALE_INTERFACE_INFO, or from develop?
Hiedra
De: Roman Isitua <ro...@gmail.com>>
Enviado el: jueves, 30 de diciembre de 2021 16:52
Para: users@royale.apache.org<ma...@royale.apache.org>
Asunto: Re: Compiling Modules (was Re: Load time is very slow)
I decided to remove the below settings completely
-export-public-symbols=false
-prevent-rename-protected-symbols=false
-prevent-rename-public-symbols=false
-prevent-rename-internal-symbols=false
I enabled the below settings
-js-dynamic-access-unknown-members=true;
-js-default-initializers=true
The release version starts up
<image001.png>
<image002.png>
However, the moment I launch a module. I get the below error
<image003.png>
It appears to be failing when I launch the "Overview" module (by clicking the Overview side menu).
So my current observation is that by retaining only two settings
-js-dynamic-access-unknown-members=true;
-js-default-initializers=true
The release module starts up but the app fails whenever I launch a module.
The smallest size settings in the documentation do not work. The app does not start up.
-export-public-symbols=false
-prevent-rename-protected-symbols=false
-prevent-rename-public-symbols=false
-prevent-rename-internal-symbols=false
The error trace is below
Uncaught TypeError: cm.valuesImpl.init is not a function
at Wr.Rr.pl<https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwr.rr.pl%2F&data=04%7C01%7Caharui%40adobe.com%7Cd9296373d0a54715ebd308d9cfb657e3%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637769204354078474%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=JNjyM3OxSGFq62WT9pyhRnbXVyB5tHgokU5llH2fNgg%3D&reserved=0> (Overview.js:792)
at Function.mq.generateMXMLProperties (Overview.js:743)
at Wr.lq.generateMXMLAttributes (Overview.js:551)
at new Wr (Overview.js:810)
at QN.J.loadHandler (FrontEnd.js:1978)
3Overview.js:56 Uncaught TypeError: Cannot read properties of undefined (reading 'prototype')
at P (Overview.js:56)
at VG.convert (FrontEnd.js:910)
at ny (FrontEnd.js:250)
at HTMLElement.iy (FrontEnd.js:125)
at HTMLElement.b (FrontEnd.js:121)
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOut (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOver (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOver @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOut (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOut @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOver (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOver @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOut (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOut @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOver (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOver @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOut (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOut @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOver (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOver @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOut (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOut @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
On Thu, Dec 30, 2021 at 4:32 PM Roman Isitua <ro...@gmail.com>> wrote:
I get the same error even when I set the -js-dynamic-access-unknown-members=true;
On Thu, Dec 30, 2021 at 4:24 PM Roman Isitua <ro...@gmail.com>> wrote:
Using the below settings,
-export-public-symbols=false
-prevent-rename-protected-symbols=false
-prevent-rename-public-symbols=false
-prevent-rename-internal-symbols=false
-js-dynamic-access-unknown-members=false;
-js-default-initializers=true
Debug version runs fine. The release version does not start up
<image004.png>
I get the below errors
Uncaught TypeError: Cannot read properties of undefined (reading 'apply')
at KE.hm (FrontEnd.js:1600)
at XE.M.Fb (FrontEnd.js:943)
at XE.M.uh (FrontEnd.js:937)
at FE.M.na<https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Ffe.m.na%2F&data=04%7C01%7Caharui%40adobe.com%7Cd9296373d0a54715ebd308d9cfb657e3%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637769204354078474%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=Wq2vDyXAwffeGlagtVN7TXfSL7VdqkVifL%2F1%2FkzTc%2Bs%3D&reserved=0> (FrontEnd.js:497)
at FE.M.v (FrontEnd.js:497)
at dR.M.S (FrontEnd.js:213)
at dR.Nz.S (FrontEnd.js:217)
at dR.M.start (FrontEnd.js:1396)
at index.html:45
:8080/favicon.ico:1 Failed to load resource: the server responded with a status of 404 (Not Found)
FrontEnd.js is the start up class for the application. i.e. It implements the Jewel application class.
On Thu, Dec 30, 2021 at 3:19 PM Roman Isitua <ro...@gmail.com>> wrote:
Hi Harb,
Thanks for your response. I have gone through the documentation. I will do my test again starting with the smallest size option and share my findings.
Regards,
On Thu, Dec 30, 2021 at 10:59 AM Harbs <ha...@gmail.com>> wrote:
Sorry for my deal in responding.
Let’s take a step back.
I’m not sure how you are compiling your modules. I just added some content to the module documentation page which explains what compiler options you need while compiling modules. (It still needs some editing.) https://apache.github.io/royale-docs/features/modules#minification<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapache.github.io%2Froyale-docs%2Ffeatures%2Fmodules%23minification&data=04%7C01%7Caharui%40adobe.com%7Cd9296373d0a54715ebd308d9cfb657e3%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637769204354078474%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=vlbldLMX1Uc3AKtUNheX0JtsMpDqSI5y%2FyDbYXJ%2FQbg%3D&reserved=0>
Are you using those options?
On Dec 29, 2021, at 2:19 AM, Maria Jose Esteve <mj...@iest.com>> wrote:
Hi, Let me join you with these tests....
@Harb, I have compiled the SDK from this branch, feature/ROYALE_INTERFACE_INFO, and when running in debug I get this error:
Message on the PURGE CONSOLE is displayed:
Cannot convert org.apache.royale.reflection.beads.ClassAliasBead to IBead
Message in the IDE Window:
Se produjo una excepción: TypeError: Cannot convert [object Object] to IBead
at App.org.apache.royale.core.ElementWrapper.addBead (http://localhost:8080/WNetSuitePlus/org/apache/royale/core/ElementWrapper.js:114:11)
at App.org.apache.royale.core.HTMLElementWrapper.addBead (http://localhost:8080/WNetSuitePlus/org/apache/royale/core/HTMLElementWrapper.js:43:65)
at App.org.apache.royale.jewel.Application.start (http://localhost:8080/WNetSuitePlus/org/apache/royale/jewel/Application.js:246:10)
at App.App_loadXML (http://localhost:8080/WNetSuitePlus/App.js:1681:25)
at org.apache.royale.net.URLLoader.org.apache.royale.events.EventDispatcher.fireListeners (http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:97:23)
at Function.goog.events.EventTarget.dispatchEventInternal_ (http://localhost:8080/WNetSuitePlus/library/closure/goog/events/eventtarget.js:381:26)
at org.apache.royale.net.URLLoader.org.apache.royale.events.EventDispatcher.dispatchEvent (http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:72:37)
at org.apache.royale.net.URLLoader.jsEventHandler (http://localhost:8080/WNetSuitePlus/org/apache/royale/net/URLLoader.js:169:12)
Call stack:
<image003.png>
[INFO] Executing MXMLC in tool group Royale with args: [
-load-config=D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\compile-app-config.xml,
-js-default-initializers=true,
-source-map=true,
-js-dynamic-access-unknown-members=true,
-keep-as3-metadata+=Inject,Dispatcher,EventHandler,Event,PostConstruct,PreDestroy,ViewAdded,ViewRemoved,Bindable,Transient,
-keep-code-with-metadata=Inject,
-show-binding-warnings=false,
-export-public-symbols=false,
-prevent-rename-protected-symbols=false,
-prevent-rename-internal-symbols=false,
-js-output=D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\javascript,
-compiler.targets=JSRoyale,
D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\src\main\royale\App.mxml
The release execution does not change, the error is the same as before (SDK compilation from the develop branch):
Se produjo una excepción: ReferenceError: Error #1065: Variable com.iest.winplusweb.models.MasterConfigSystemModel is not defined.
at yR (http://localhost:8080/WPWebRelease/App.js:3605:1771)
at Mya (http://localhost:8080/WPWebRelease/App.js:3343:365)
at AR.J.usa (http://localhost:8080/WPWebRelease/App.js:434:441)
at GFa.J.fromTypeDefinition (http://localhost:8080/WPWebRelease/App.js:5706:139)
at Function.YT.getTypeDescriptor (http://localhost:8080/WPWebRelease/App.js:4570:820)
at Function.fX.constructBean (http://localhost:8080/WPWebRelease/App.js:2336:472)
at r$.J.initialize (http://localhost:8080/WPWebRelease/App.js:5041:66)
at OW.J.init (http://localhost:8080/WPWebRelease/App.js:950:452)
at OW.J.u (http://localhost:8080/WPWebRelease/App.js:951:454)
at $$.J.addBead (http://localhost:8080/WPWebRelease/App.js:357:549)
The main difference:
project compiled from "SDK-develop" runs fine in js-debug and gives error in js-release and, compiled from "SDK-ROYALE_INTERFACE_INFO" does not launch because of conversion error.
Hiedra
De: Roman Isitua <ro...@gmail.com>>
Enviado el: martes, 28 de diciembre de 2021 15:55
Para: users@royale.apache.org<ma...@royale.apache.org>
Asunto: Re: Load time is very slow
@Harb
I have checked out the feature/ROYALE_INTERFACE_INFO branch and compiled asjs and compiler. I have rebuilt my application with modules in release mode.
I get the following error when I attempt to launch a module
<image001.png>
The module loads fine in debug mode
<image002.png>
Snippets of the log
Overview.js:786 Uncaught TypeError: cm.valuesImpl.init is not a function
at Rr.Mr.yl (Overview.js:786)
at Function.iq.generateMXMLProperties (Overview.js:736)
at Rr.hq.generateMXMLAttributes (Overview.js:546)
at new Rr (Overview.js:804)
at LN.J.loadHandler (FrontEnd.js:1967)
Mr.yl @ Overview.js:786
iq.generateMXMLProperties @ Overview.js:736
hq.generateMXMLAttributes @ Overview.js:546
Rr @ Overview.js:804
J.loadHandler @ FrontEnd.js:1967
load (async)
LN.loadModule @ FrontEnd.js:1965
dN.loadModule @ FrontEnd.js:2406
LD.Un @ FrontEnd.js:1809
ny @ FrontEnd.js:123
ny @ FrontEnd.js:248
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
I have attached the full log to this email.
On Tue, Dec 28, 2021 at 2:51 PM Roman Isitua <ro...@gmail.com>> wrote:
Hi Maria,
Prior to starting this mail discussion "Load time is very slow". I can confirm I have only been compiling in debug mode. My target\javascript\bin\ only had js-debug. It was after I upgraded my royale sdk from 0.9.7 to 0.9.8 that I compiled in release mode.
On Tue, Dec 28, 2021 at 2:24 PM Maria Jose Esteve <mj...@iest.com>> wrote:
Hi, @Roman, I think you are doing a double compile can it be? My times are the same as yours and I always compile in debug and release.
Look at your target folder " target\javascript\bin\" and if you have two folders: js-debug and js-release you are compiling always double.
In my case, the architecture of my project as well as the Maven compilation files (pom.xml) were provided by an external company (we didn't know anything about Maven or Royale at that time) and I understand that this formula was chosen to show us the options we had.
A priori and without doing any test as Harb has done, I think that modularity gives us the advantage of compiling parts of the code once and not compiling them again if they are not modified. So far WITH MY COMPILATION TIMES, sometimes more than 1 minute, this is fundamental. But of course, now we have the problem of minification of the modules and it is really a serious problem because it is impossible for us to deploy in production.
I will try to separate the compiación realese with a profile and if I succeed I will pass it to you @Roman.
@Harb what do you mean by compiling the ROYALE_INTERFACE_INFO branch?
Hiedra
De: Harbs <ha...@gmail.com>>
Enviado el: lunes, 27 de diciembre de 2021 18:32
Para: users@royale.apache.org<ma...@royale.apache.org>
Asunto: Re: Load time is very slow
That doesn’t sound right.
Are you sure you’re compiling debug and not release? That sounds like release build times.
On Dec 27, 2021, at 3:31 PM, Roman Isitua <ro...@gmail.com>> wrote:
Wow ! You are using a workstation with a bleeding edge processor.
I just compiled my app now. It took 44 seconds. (First compilation after ide start up.) Subsequently compilations are usually 19s to 20s.
My application code base is very very small compared to yours. As we continue to add functionality, I expect the compile times to rise.
<MainApp_pom.xml><Overview_pom.xml><fm_client2_pom.xml>
Re: Compiling Modules (was Re: Load time is very slow)
Posted by Greg Dove <gr...@gmail.com>.
Alex, this is probably more a topic for dev list (and we can definitely
continue it there if need be, I would have done so, but could not figure
out how to link to *this* thread properly in the archives).
When you originally worked on this, did you eliminate using the GCC
approach to creating 'modules' (it used to be called 'modules' in older GCC
apparently, perhaps even the one we are currently locked to, but is now
called 'chunks' in more recent GCC versions) ?
Perhaps there is a technical difference or some other reason (e.g. the
feature may not have been well documented) that meant it could not be used.
However, if that was able to be used for royale modules, it seems like it
would be faster/easier, because it is a single release compilation pass
that splits the release build into multiple files, instead of using
multiple passes. After reading the description for that [1] it does seem
like it does all the hard work of avoiding the issues, in particular
avoiding the need for the various output and input files related for
renaming etc that are needed for multiple passes.
1.
https://github.com/google/closure-compiler/wiki/Chunk-output-for-dynamic-loading
On Wed, Jan 5, 2022 at 6:02 AM Alex Harui <ah...@adobe.com> wrote:
> Essentially, -externs-report is for the Closure (JS) Compiler.
> -link-report and -load-externs (one leading ‘-‘) is for the Royale Compiler
> to tell the Royale Compiler what classes to feed to the Closure Compiler.
> Both contain the same data (the set of classes used in the main app), just
> formatted differently and used differently.
>
>
>
> The –externs option for the Closure Compiler then tells the Closure
> Compiler not to look for classes in the set of files it is supposed to
> minify.
>
>
>
> So, you have the right settings for the main app, but for the module, it
> should be:
>
> *-js-compiler-option=--externs extrep.txt; -load-externs linkrep.txt;*
>
>
>
> However, even that won’t work today, as the Royale Compiler is not
> handling -load-externs on the JS prep for Closure Compiler. I have some
> local changes to the compiler that mixes most of it, but am facing issues
> with how Closure handles package paths. If that can be resolved, then we
> have a good chance of things working.
>
>
>
> -Alex
>
>
>
> *From: *Roman Isitua <ro...@gmail.com>
> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Date: *Tuesday, January 4, 2022 at 12:39 AM
> *To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Subject: *Re: Compiling Modules (was Re: Load time is very slow)
>
>
>
> Thanks for the update.
>
>
>
> I attempted the following:
>
>
>
> 1. In the main application, I use the following setting:
>
> *-externs-report=extrep.txt; -link-report=linkrep.txt;*
>
>
>
> 2. In the module I use the following
>
>
>
> *-js-compiler-option=--externs extrep.txt;
> -js-compiler-option+=--load-externs linkrep.txt;*
>
>
>
> The main application compiles successfully, I get a compilation error with
> the module
>
>
>
> "--load-externs" is not a valid option
> Sample usage: --compilation_level (-O) VAL --externs VAL --js VAL
> --js_output_file VAL --warning_level (-W) [QUIET | DEFAULT
> | VERBOSE]
> Run with --help for all options and details
> Internal error: java.lang.NullPointerException
> com.google.javascript.jscomp.CommandLineRunner.createOptions(CommandLineRunner.java:1809)org.apache.royale.compiler.utils.JSClosureCompilerWrapper$CompilerOptionsParser.getOptions(JSClosureCompilerWrapper.java:529)org.apache.royale.compiler.utils.JSClosureCompilerWrapper.<init>(JSClosureCompilerWrapper.java:77)org.apache.royale.compiler.internal.codegen.mxml.royale.MXMLRoyalePublisher.publish(MXMLRoyalePublisher.java:395)org.apache.royale.compiler.clients.M
>
>
>
>
>
>
>
> I don't think I am using this option correctly.
>
>
>
>
>
>
>
> .....
>
>
>
> On Tue, Jan 4, 2022 at 8:44 AM Alex Harui <ah...@adobe.com> wrote:
>
> I found some time to investigate. The -externs-report option is mostly
> working correctly, but other compiler changes are needed to try to avoid
> duplicate code in the module. I might have time to investigate more this
> coming weekend. It does appear that if we can correctly reference the
> app’s class from the module that it will work. The Closure Compiler let me
> compile the module after I externalize and avoid requires on everything in
> the main app’s externs report and -js link report, but the references in
> the module have collapsed packages which is either incorrect or aliases
> need to be created.
>
>
>
> However I think this new approach has a better chance of working than
> trying to match renaming tables.
>
>
>
> -Alex
>
>
>
> *From: *Alex Harui <ah...@adobe.com>
> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Date: *Monday, January 3, 2022 at 2:30 PM
> *To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Subject: *Re: Compiling Modules (was Re: Load time is very slow)
>
>
>
> The -externs-report option should be similar to the -link-report option.
> It takes a filename. The compiler should output the classes used in the JS
> compile into that file. To use externs, I think you don’t need to prevent
> renaming in the application as long as public variables are exported. I
> think you specify -externs-report when compiling the application.
>
>
>
> You may also need to output a -link-report from the application as well.
>
>
>
> I think you then specify the externs-report file as an -externs for the
> -js-compiler-options when compiling the module. And maybe also specify the
> -link-report output as a -load-externs in the same way it was used when
> compiling Flex modules. The goal for the module is, like Flex, to not have
> any classes in the module that exist in the main app. Then it doesn’t
> matter about class renaming within the release-mode JS file.
>
>
>
> HTH,
>
> -Alex
>
>
>
> *From: *Roman Isitua <ro...@gmail.com>
> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Date: *Monday, January 3, 2022 at 12:37 PM
> *To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Subject: *Re: Compiling Modules (was Re: Load time is very slow)
>
>
>
>
>
> I can confirm that classes are being renamed in both files.
>
>
>
> I have attempted your suggestion i.e. removing variable maps and property
> maps then use
>
> -externs-report;-export-public-symbols=true;-prevent-rename-public-symbols=true;
>
>
>
>
> I get the below error
>
>
>
> command line Error: configuration variable 'externs-report' expected 1
> argument(s), got 0.
>
>
>
> I cannot find any documentation on how to use the -externs-report
> argument. What does it do ? and what are the acceptable values ?
>
>
>
> Regards,
>
>
>
>
>
> On Sun, Jan 2, 2022 at 9:06 AM Alex Harui <ah...@adobe.com> wrote:
>
> Hi Roman,
>
>
>
> It might be more complicated. The settings are probably doing something
> since you reported that the error occurred in the app vs the module
> depending on the settings.
>
>
>
> I went back and looked at the original module example in
> examples/royale/ModuleExample and was surprised there weren’t more compiler
> settings. I thought we’d found a way to externalize the main app’s code
> for the module. Because if both the app and module have a copy of
> SimpleCSSValuesImpl or any other class that both JS files use, there could
> be issues as to which one gets loaded (maybe both) and what export aliases
> are pointing to. Sounds like changing settings affected whether the
> aliases pointed at module code vs app code.
>
>
>
> I thought we were using similar settings to what we used for SWF where the
> module would not contain a copy of SimpleCSSValuesImpl so it would use the
> one loaded by the main app, but I didn’t see those settings. We might need
> to make that work because otherwise I think static initializations won’t do
> the right thing. Or maybe we’ve figured out that it is simpler just to
> write defensive code that doesn’t get broken. But also, if the module has
> its own copy of code already loaded by the main app, that’s sort of a waste
> of bytes. Maybe there was a minification issue with not having the module
> link in classes already linked into the main app. I see an -externs-report
> option in the compiler but the example doesn’t seem to use it.
>
>
>
> You should be able to scan the JS files and see if a class is in both
> module and app and if it is getting renamed.
>
>
>
> I don’t know if I will have time to investigate further. The currently
> recommended options for modules involving variable maps and property maps
> may need to be abandoned in favor of externs and preventing renames.
>
>
>
> -Alex
>
>
>
>
>
> *From: *Roman Isitua <ro...@gmail.com>
> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Date: *Saturday, January 1, 2022 at 3:02 AM
> *To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Subject: *Re: Compiling Modules (was Re: Load time is very slow)
>
>
>
> Alex, thank you for your detailed analysis of the error log.
>
>
>
> I agree with you that the best strategy is to prevent renaming of
> public/exports used by the module. I have tried different options to
> prevent renaming
>
> It appears none of them stops this. From my observation, it appears that
> this default options below
>
>
>
>
> -export-public-symbols=true;-prevent-rename-public-symbols=true;-prevent-rename-public-instance-accessors=true;
>
>
>
> Only seem to affect the main application (main module) but have no effect
> on the other modules even though I ensured they were applied in
> their respective module pom. I came to this conclusion when I decided to
> turn set -prevent-rename-public-symbols=false
>
>
>
> I noticed that I got the same error but this time around in the main
> module.
>
>
>
> Uncaught TypeError: this.rb[(intermediate value).Kd(...)] is not a function
> at HN.iI.send (FrontEnd.js:970)
> at nI.EH.Ea (FrontEnd.js:880)
> at ON.q6 (FrontEnd.js:1815)
> at TN.L2 (FrontEnd.js:2034)
> at hF.Xf (FrontEnd.js:2063)
> at lF.kb (FrontEnd.js:1233)
> at lF.Vf (FrontEnd.js:1224)
> at cF.O (FrontEnd.js:659)
> at cF.M.w (FrontEnd.js:661)
> at gQ.mA.M (FrontEnd.js:241)
>
>
>
> FrontEnd.js maps to FrontEnd.as in my application and is the entry point
> of the application. This confirms that -prevent-rename-public-symbols=false
> has
>
> an effect on the main module but no effect on other modules even though
> they were applied in the respective module pom's.
>
>
>
> Maybe there are other options I am overlooking.
>
>
>
> On Sat, Jan 1, 2022 at 9:31 AM Alex Harui <ah...@adobe.com> wrote:
>
> In case it helps, the minification (variable renaming) mechanism is
> essentially guaranteed to cause problems in modules. The Closure Compiler
> basically takes variables, sees if it is worth renaming it, then gives it
> the name ‘a’, then ‘b’, and so-on, (it skips a few letters, IIRC), then
> moves on to ‘aa’, and ‘ab’, etc. The odds that the compiler will encounter
> the same variables in the same order when compiling an app and one or more
> modules is close to zero.
>
>
>
> I did some work to try to dump the mapping of the renamed variables in the
> main app and use that when compiling the modules. It was working for a
> while, then some code was added to the framework that started fooling the
> Closure Compiler. I spent some time trying to fix the Closure Compiler,
> but ran out of time. Meanwhile, Josh was adding more control over renaming
> so I moved on to other things.
>
>
>
> IMO, the best strategy to take would be to try to control what gets
> renamed. All public/exports from the app that are used by the module
> should not be renamed. That will definitely make the app and modules
> bigger, but unless the Closure Compiler folks become interested in
> runtime-loaded modules, it is challenging for the Royale compiler to allow
> aggressive renaming.
>
>
>
> I think what is going on with the exceptions below is that exporting
> doesn’t really prevent renaming. It only sets up an externally-visible
> alias to a renamed variable. Especially for static members. So it isn’t
> sufficient to export public variables, the code within the module must not
> let the Closure Compiler think that the intra-module references can be
> renamed, in this case, from SimpleCSSValuesImpl to QI
>
>
>
> I don’t know the renaming options we’ve added to the Royale Compiler, so I
> don’t know if there is an option to control that. I think there is a way
> to convince the Closure Compiler to not rename SimpleCSSValuesImpl because
> I’ve seen other class names not get renamed.
>
>
>
> HTH,
>
> -Alex
>
>
>
> *From: *Roman Isitua <ro...@gmail.com>
> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Date: *Friday, December 31, 2021 at 10:42 AM
> *To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Subject: *Re: Compiling Modules (was Re: Load time is very slow)
>
>
>
> I have tested on both. The error log is the same.
>
>
>
> I don't understand your second question. Kindly clarify ?
>
>
>
>
>
> I followed strictly the approach used for loading modules here in this
> example.
>
> This is the only method I know for loading modules. If there is another
> method please share.
>
>
>
>
>
>
> https://royale.apache.org/dividing-an-apache-royale-application-with-modules/
> <https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Froyale.apache.org%2Fdividing-an-apache-royale-application-with-modules%2F&data=04%7C01%7Caharui%40adobe.com%7Ce6e97a72825c47f3cb7408d9cf5dc8e8%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637768823995426307%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=%2FPFnXurq9b33O%2FKKK97kgWf7BIyw36bCqDifUwta%2Bto%3D&reserved=0>
>
>
>
> On Fri, 31 Dec 2021, 19:14 Maria Jose Esteve, <mj...@iest.com> wrote:
>
> @Roman, which branch did you compile the SDK from, ROYALE_INTERFACE_INFO
> or develop?
>
> Could you pass the Overview.mxml view to the main application? (to rule
> it out)
>
>
>
> Hiedra
>
>
>
> *De:* Roman Isitua <ro...@gmail.com>
> *Enviado el:* viernes, 31 de diciembre de 2021 17:56
> *Para:* users@royale.apache.org
> *Asunto:* Re: Compiling Modules (was Re: Load time is very slow)
>
>
>
> I have tried tracing where the errors are happening whenever I test the
> release version
>
> Uncaught TypeError: Ql.valuesImpl.init is not a function
> at Hr.Cr.um (Overview.js:846)
> at Function.ep.generateMXMLProperties (Overview.js:795)
> at Hr.Sp.generateMXMLAttributes (Overview.js:599)
> at new Hr (Overview.js:864)
> at PN.M.loadHandler (FrontEnd.js:2042)
> 9Overview.js:173 Uncaught TypeError: this.createElement is not a function
> at $B.V (Overview.js:173)
> at new $B (FrontEnd.js:2430)
> at EP.convert (FrontEnd.js:2430)
> at Zy (FrontEnd.js:261)
> at HTMLAnchorElement.Uy (FrontEnd.js:121)
> at HTMLAnchorElement.Sy.b (FrontEnd.js:117)
>
>
>
>
>
> The highlighted code in red is declared as follows in the Overview.mxml
> (maven module)
>
>
>
> <j:valuesImpl>
>
> <js:SimpleCSSValuesImpl/>
>
> </j:valuesImpl>
>
>
>
> The j:valuesImpl points to the following code in jewel Module.js
>
>
>
> /**
> * @nocollapse
> * @export
> * @type {org.apache.royale.core.IValuesImpl}
> */
> org.apache.royale.jewel.Module.prototype.valuesImpl;
>
>
> org.apache.royale.jewel.Module.prototype.set__valuesImpl = function(value)
> {
> org.apache.royale.core.ValuesManager.valuesImpl.init(this);
> };
>
>
>
>
>
> it appears this function is improperly renamed and whenever the app tries
> to load the module is not able to recognise it as a function.
>
>
>
> The same issue of improper function renaming is happening in the second
> error as well
>
>
>
> 9Overview.js:173 Uncaught TypeError: this.createElement is not a function
>
>
>
>
>
> On Thu, Dec 30, 2021 at 10:42 PM Roman Isitua <ro...@gmail.com>
> wrote:
>
>
>
> I have applied the js compiler option as follows
>
>
>
>
> <additionalCompilerOptions>-source-map=false;-compiler.show-binding-warnings=false;-js-default-initializers=true;-js-dynamic-access-unknown-members=true;
> -js-compiler-option=--variable_map_output_file
> gccvars.txt;-js-compiler-option+=--property_map_output_file gccprops.txt
> </additionalCompilerOptions>
>
>
>
>
>
> I get the same error as before when attempting to launch the jewel module.
>
>
>
> *Error! Filename not specified.*
>
>
>
>
>
> Same error trace.
>
>
>
> Uncaught TypeError: cm.valuesImpl.init is not a function
> at Rr.Mr.yl (Overview.js:786)
> at Function.iq.generateMXMLProperties (Overview.js:736)
> at Rr.hq.generateMXMLAttributes (Overview.js:546)
> at new Rr (Overview.js:804)
> at LN.J.loadHandler (FrontEnd.js:1967)
> FrontEnd.js:1640 Uncaught TypeError: M is not a function
> at oM.J.handleMouseOut (FrontEnd.js:1640)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:248)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> FrontEnd.js:1640 Uncaught TypeError: M is not a function
> at oM.J.handleMouseOver (FrontEnd.js:1640)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:248)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> FrontEnd.js:1640 Uncaught TypeError: M is not a function
> at oM.J.handleMouseOut (FrontEnd.js:1640)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:248)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> FrontEnd.js:1640 Uncaught TypeError: M is not a function
> at oM.J.handleMouseOver (FrontEnd.js:1640)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:248)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> FrontEnd.js:1640 Uncaught TypeError: M is not a function
> at oM.J.handleMouseOut (FrontEnd.js:1640)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:248)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> FrontEnd.js:1640 Uncaught TypeError: M is not a function
> at oM.J.handleMouseOver (FrontEnd.js:1640)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:248)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> FrontEnd.js:1640 Uncaught TypeError: M is not a function
> at oM.J.handleMouseOut (FrontEnd.js:1640)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:248)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> 3Overview.js:56 Uncaught TypeError: Cannot read properties of undefined
> (reading 'prototype')
> at P (Overview.js:56)
> at SG.convert (FrontEnd.js:904)
> at ny (FrontEnd.js:248)
> at HTMLElement.iy (FrontEnd.js:125)
> at HTMLElement.b (FrontEnd.js:121)
>
>
>
> On Thu, Dec 30, 2021 at 6:56 PM Harbs <ha...@gmail.com> wrote:
>
> 1. I’d get rid of the agressive minification options. It will likely cause
> issues. If you get it to work without those options, you can try to add
> them back in and see if it still works.
>
> 2. You seem to be missing the compiler options explained here:
> https://apache.github.io/royale-docs/features/modules#minification
> <https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapache.github.io%2Froyale-docs%2Ffeatures%2Fmodules%23minification&data=04%7C01%7Caharui%40adobe.com%7Ce6e97a72825c47f3cb7408d9cf5dc8e8%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637768823995426307%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=mJ8hkJKoDX34n8LC3dpENGqf8KObR%2Bn1Gpm1LtBcFeU%3D&reserved=0>
>
>
>
> For a pom, it would look something like this (adjust your paths to match
> your setup):
>
>
>
> Main app:
>
> <additionalCompilerOptions>-source-map=true;-js-compiler-option=--variable_map_output_file
> gccvars.txt;-js-compiler-option+=--property_map_output_file
> gccprops.txt</additionalCompilerOptions>
>
>
>
> Module:
>
> <additionalCompilerOptions>-source-map=true;-js-compiler-option=--variable_map_input_file
> ../../../../../MainApp/bin/js-release/gccvars.txt;-js-compiler-option+=--property_map_input_file
> ../../../../../MainApp/bin/js-release/gccprops.txt</additionalCompilerOptions>
>
>
>
> On Dec 30, 2021, at 7:43 PM, Roman Isitua <ro...@gmail.com> wrote:
>
>
>
> I think it will be better for me to share my pom's that way you can see
> all the compilation options used. The pom for the parent (FmClient2), the
> MainApp and one module (Overview) have been attached to this email.
>
>
>
>
>
> On Thu, Dec 30, 2021 at 6:22 PM Harbs <ha...@gmail.com> wrote:
>
> Roman, can you share your full compiler options?
>
>
>
> I decided to remove the below settings completely
> -export-public-symbols=false
> -prevent-rename-protected-symbols=false
> -prevent-rename-public-symbols=false
> -prevent-rename-internal-symbols=false
>
>
> I enabled the below settings
>
> -js-dynamic-access-unknown-members=true;
> -js-default-initializers=true
>
>
> The release version starts up
>
>
>
> Hiedra, that’s great!
>
>
>
> On Dec 30, 2021, at 7:15 PM, Roman Isitua <ro...@gmail.com> wrote:
>
>
>
>
>
> Yes. I am testing with the sdk compiled on branch ROYALE_INTERFACE_INFO
>
>
>
> On Thu, Dec 30, 2021 at 6:10 PM Maria Jose Esteve <mj...@iest.com>
> wrote:
>
> Roman, are you testing with the SDK compiled from the Harb branches,
> ROYALE_INTERFACE_INFO, or from develop?
>
>
>
> Hiedra
>
>
>
> *De:* Roman Isitua <ro...@gmail.com>
> *Enviado el:* jueves, 30 de diciembre de 2021 16:52
> *Para:* users@royale.apache.org
> *Asunto:* Re: Compiling Modules (was Re: Load time is very slow)
>
>
>
> I decided to remove the below settings completely
> -export-public-symbols=false
> -prevent-rename-protected-symbols=false
> -prevent-rename-public-symbols=false
> -prevent-rename-internal-symbols=false
>
>
> I enabled the below settings
>
> -js-dynamic-access-unknown-members=true;
> -js-default-initializers=true
>
>
> The release version starts up
>
>
>
>
>
>
>
> <image001.png>
>
>
>
>
>
> <image002.png>
>
>
>
> However, the moment I launch a module. I get the below error
>
>
>
> <image003.png>
>
>
>
>
>
> It appears to be failing when I launch the "*Overview*" module
> (by clicking the Overview side menu).
>
>
>
> So my current observation is that by retaining only two settings
>
>
>
> -js-dynamic-access-unknown-members=true;
> -js-default-initializers=true
>
>
>
> The release module starts up but the app fails whenever I launch a module.
>
>
>
> The smallest size settings in the documentation do not work. The app does
> not start up.
>
>
>
> -export-public-symbols=false
> -prevent-rename-protected-symbols=false
> -prevent-rename-public-symbols=false
> -prevent-rename-internal-symbols=false
>
>
>
>
>
>
>
> The error trace is below
>
>
>
>
>
> Uncaught TypeError: cm.valuesImpl.init is not a function
> at Wr.Rr.pl
> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwr.rr.pl%2F&data=04%7C01%7Caharui%40adobe.com%7Ce6e97a72825c47f3cb7408d9cf5dc8e8%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637768823995426307%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=LiGI53vuAFViSnH7BzWC8CjfC%2ByEivVwhCNHGkXecK0%3D&reserved=0>
> (Overview.js:792)
> at Function.mq.generateMXMLProperties (Overview.js:743)
> at Wr.lq.generateMXMLAttributes (Overview.js:551)
> at new Wr (Overview.js:810)
> at QN.J.loadHandler (FrontEnd.js:1978)
> 3Overview.js:56 Uncaught TypeError: Cannot read properties of undefined
> (reading 'prototype')
> at P (Overview.js:56)
> at VG.convert (FrontEnd.js:910)
> at ny (FrontEnd.js:250)
> at HTMLElement.iy (FrontEnd.js:125)
> at HTMLElement.b (FrontEnd.js:121)
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOut (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOver (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOver @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOut (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOut @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOver (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOver @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOut (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOut @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOver (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOver @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOut (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOut @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOver (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOver @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOut (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOut @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
>
>
>
> On Thu, Dec 30, 2021 at 4:32 PM Roman Isitua <ro...@gmail.com>
> wrote:
>
> I get the same error even when I set
> the -js-dynamic-access-unknown-members=true;
>
>
>
> On Thu, Dec 30, 2021 at 4:24 PM Roman Isitua <ro...@gmail.com>
> wrote:
>
>
>
> Using the below settings,
>
> -export-public-symbols=false
> -prevent-rename-protected-symbols=false
> -prevent-rename-public-symbols=false
> -prevent-rename-internal-symbols=false
> -js-dynamic-access-unknown-members=false;
>
> -js-default-initializers=true
>
>
> Debug version runs fine. The release version does not start up
>
> <image004.png>
>
>
> I get the below errors
>
> Uncaught TypeError: Cannot read properties of undefined (reading 'apply')
> at KE.hm (FrontEnd.js:1600)
> at XE.M.Fb (FrontEnd.js:943)
> at XE.M.uh (FrontEnd.js:937)
> at FE.M.na
> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Ffe.m.na%2F&data=04%7C01%7Caharui%40adobe.com%7Ce6e97a72825c47f3cb7408d9cf5dc8e8%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637768823995426307%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=tcMMByIOq69n4rop77jZJxdxDsEStDOp%2FcSfu%2BCqpKc%3D&reserved=0>
> (FrontEnd.js:497)
> at FE.M.v (FrontEnd.js:497)
> at dR.M.S (FrontEnd.js:213)
> at dR.Nz.S (FrontEnd.js:217)
> at dR.M.start (FrontEnd.js:1396)
> at index.html:45
> :8080/favicon.ico:1 Failed to load resource: the server responded with a
> status of 404 (Not Found)
>
>
>
>
>
> FrontEnd.js is the start up class for the application. i.e. It implements
> the Jewel application class.
>
>
>
>
>
>
>
> On Thu, Dec 30, 2021 at 3:19 PM Roman Isitua <ro...@gmail.com>
> wrote:
>
> Hi Harb,
>
>
>
> Thanks for your response. I have gone through the documentation. I will do
> my test again starting with the smallest size option and share my findings.
>
>
>
> Regards,
>
>
>
> On Thu, Dec 30, 2021 at 10:59 AM Harbs <ha...@gmail.com> wrote:
>
> Sorry for my deal in responding.
>
>
>
> Let’s take a step back.
>
>
>
> I’m not sure how you are compiling your modules. I just added some content
> to the module documentation page which explains what compiler options you
> need while compiling modules. (It still needs some editing.)
> https://apache.github.io/royale-docs/features/modules#minification
> <https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapache.github.io%2Froyale-docs%2Ffeatures%2Fmodules%23minification&data=04%7C01%7Caharui%40adobe.com%7Ce6e97a72825c47f3cb7408d9cf5dc8e8%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637768823995426307%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=mJ8hkJKoDX34n8LC3dpENGqf8KObR%2Bn1Gpm1LtBcFeU%3D&reserved=0>
>
>
>
> Are you using those options?
>
>
>
> On Dec 29, 2021, at 2:19 AM, Maria Jose Esteve <mj...@iest.com> wrote:
>
>
>
> Hi, Let me join you with these tests....
>
>
>
> @Harb, I have compiled the SDK from this branch, feature/ROYALE_INTERFACE_INFO,
> and when running in debug I get this error:
>
>
>
> Message on the PURGE CONSOLE is displayed:
>
>
>
> Cannot convert org.apache.royale.reflection.beads.ClassAliasBead to IBead
>
>
>
> Message in the IDE Window:
>
>
>
> Se produjo una excepción: TypeError: Cannot convert [object Object] to
> IBead
>
> at App.org.apache.royale.core.ElementWrapper.addBead (
> http://localhost:8080/WNetSuitePlus/org/apache/royale/core/ElementWrapper.js:114:11
> )
>
> at App.org.apache.royale.core.HTMLElementWrapper.addBead (
> http://localhost:8080/WNetSuitePlus/org/apache/royale/core/HTMLElementWrapper.js:43:65
> )
>
> at App.org.apache.royale.jewel.Application.start (
> http://localhost:8080/WNetSuitePlus/org/apache/royale/jewel/Application.js:246:10
> )
>
> at App.App_loadXML (http://localhost:8080/WNetSuitePlus/App.js:1681:25
> )
>
> at
> org.apache.royale.net.URLLoader.org.apache.royale.events.EventDispatcher.fireListeners
> (
> http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:97:23
> )
>
> at Function.goog.events.EventTarget.dispatchEventInternal_ (
> http://localhost:8080/WNetSuitePlus/library/closure/goog/events/eventtarget.js:381:26
> )
>
> at
> org.apache.royale.net.URLLoader.org.apache.royale.events.EventDispatcher.dispatchEvent
> (
> http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:72:37
> )
>
> at org.apache.royale.net.URLLoader.jsEventHandler (
> http://localhost:8080/WNetSuitePlus/org/apache/royale/net/URLLoader.js:169:12
> )
>
>
>
> Call stack:
>
>
>
> <image003.png>
>
>
>
> [INFO] Executing MXMLC in tool group Royale with args: [
>
>
> -load-config=D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\compile-app-config.xml,
>
> -js-default-initializers=true,
>
> -source-map=true,
>
> -js-dynamic-access-unknown-members=true,
>
>
> -keep-as3-metadata+=Inject,Dispatcher,EventHandler,Event,PostConstruct,PreDestroy,ViewAdded,ViewRemoved,Bindable,Transient,
>
> -keep-code-with-metadata=Inject,
>
> -show-binding-warnings=false,
>
> -export-public-symbols=false,
>
> -prevent-rename-protected-symbols=false,
>
> -prevent-rename-internal-symbols=false,
>
>
> -js-output=D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\javascript,
>
> -compiler.targets=JSRoyale,
>
>
> D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\src\main\royale\App.mxml
>
>
>
>
>
> The release execution does not change, the error is the same as before
> (SDK compilation from the develop branch):
>
>
>
> Se produjo una excepción: ReferenceError: Error #1065: Variable
> com.iest.winplusweb.models.MasterConfigSystemModel is not defined.
>
> at yR (http://localhost:8080/WPWebRelease/App.js:3605:1771)
>
> at Mya (http://localhost:8080/WPWebRelease/App.js:3343:365)
>
> at AR.J.usa (http://localhost:8080/WPWebRelease/App.js:434:441)
>
> at GFa.J.fromTypeDefinition (
> http://localhost:8080/WPWebRelease/App.js:5706:139)
>
> at Function.YT.getTypeDescriptor (
> http://localhost:8080/WPWebRelease/App.js:4570:820)
>
> at Function.fX.constructBean (
> http://localhost:8080/WPWebRelease/App.js:2336:472)
>
> at r$.J.initialize (http://localhost:8080/WPWebRelease/App.js:5041:66)
>
> at OW.J.init (http://localhost:8080/WPWebRelease/App.js:950:452)
>
> at OW.J.u (http://localhost:8080/WPWebRelease/App.js:951:454)
>
> at $$.J.addBead (http://localhost:8080/WPWebRelease/App.js:357:549)
>
>
>
> The main difference:
>
> project compiled from "SDK-develop" runs fine in js-debug and gives error
> in js-release and, compiled from "SDK-ROYALE_INTERFACE_INFO" does not
> launch because of conversion error.
>
>
>
> Hiedra
>
>
>
> *De:* Roman Isitua <ro...@gmail.com>
> *Enviado el:* martes, 28 de diciembre de 2021 15:55
> *Para:* users@royale.apache.org
> *Asunto:* Re: Load time is very slow
>
>
>
> @Harb
>
>
>
> I have checked out the feature/ROYALE_INTERFACE_INFO branch and compiled
> asjs and compiler. I have rebuilt my application with modules in release
> mode.
>
>
>
> I get the following error when I attempt to launch a module
>
>
>
>
>
> <image001.png>
>
>
>
>
>
> The module loads fine in debug mode
>
>
>
> <image002.png>
>
>
>
>
>
> Snippets of the log
>
>
>
> Overview.js:786 Uncaught TypeError: cm.valuesImpl.init is not a function
> at Rr.Mr.yl (Overview.js:786)
> at Function.iq.generateMXMLProperties (Overview.js:736)
> at Rr.hq.generateMXMLAttributes (Overview.js:546)
> at new Rr (Overview.js:804)
> at LN.J.loadHandler (FrontEnd.js:1967)
> Mr.yl @ Overview.js:786
> iq.generateMXMLProperties @ Overview.js:736
> hq.generateMXMLAttributes @ Overview.js:546
> Rr @ Overview.js:804
> J.loadHandler @ FrontEnd.js:1967
> load (async)
> LN.loadModule @ FrontEnd.js:1965
> dN.loadModule @ FrontEnd.js:2406
> LD.Un @ FrontEnd.js:1809
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:248
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
>
>
>
>
>
> I have attached the full log to this email.
>
>
>
>
>
>
>
>
>
> On Tue, Dec 28, 2021 at 2:51 PM Roman Isitua <ro...@gmail.com>
> wrote:
>
> Hi Maria,
>
>
>
> Prior to starting this mail discussion "Load time is very slow". I can
> confirm I have only been compiling in debug mode. My target\javascript\bin\
> only had js-debug. It was after I upgraded my royale sdk from 0.9.7 to
> 0.9.8 that I compiled in release mode.
>
>
>
>
>
>
>
> On Tue, Dec 28, 2021 at 2:24 PM Maria Jose Esteve <mj...@iest.com>
> wrote:
>
> Hi, @Roman, I think you are doing a double compile can it be? My times are
> the same as yours and I always compile in debug and release.
>
>
>
> Look at your target folder " target\javascript\bin\" and if you have two
> folders: js-debug and js-release you are compiling always double.
>
>
>
> In my case, the architecture of my project as well as the Maven
> compilation files (pom.xml) were provided by an external company (we didn't
> know anything about Maven or Royale at that time) and I understand that
> this formula was chosen to show us the options we had.
>
>
>
> A priori and without doing any test as Harb has done, I think that
> modularity gives us the advantage of compiling parts of the code once and
> not compiling them again if they are not modified. So far WITH MY
> COMPILATION TIMES, sometimes more than 1 minute, this is fundamental. But
> of course, now we have the problem of minification of the modules and it is
> really a serious problem because it is impossible for us to deploy in
> production.
>
>
>
> I will try to separate the compiación realese with a profile and if I
> succeed I will pass it to you @Roman.
>
>
>
> @Harb what do you mean by compiling the ROYALE_INTERFACE_INFO branch?
>
>
>
> Hiedra
>
>
>
> *De:* Harbs <ha...@gmail.com>
> *Enviado el:* lunes, 27 de diciembre de 2021 18:32
> *Para:* users@royale.apache.org
> *Asunto:* Re: Load time is very slow
>
>
>
> That doesn’t sound right.
>
>
>
> Are you sure you’re compiling debug and not release? That sounds like
> release build times.
>
>
>
> On Dec 27, 2021, at 3:31 PM, Roman Isitua <ro...@gmail.com> wrote:
>
>
>
> Wow ! You are using a workstation with a bleeding edge processor.
>
>
>
> I just compiled my app now. It took 44 seconds. (First compilation after
> ide start up.) Subsequently compilations are usually 19s to 20s.
>
>
>
> My application code base is very very small compared to yours. As we
> continue to add functionality, I expect the compile times to rise.
>
>
>
>
>
>
>
>
>
> <MainApp_pom.xml><Overview_pom.xml><fm_client2_pom.xml>
>
>
>
>
Re: Compiling Modules (was Re: Load time is very slow)
Posted by Harbs <ha...@gmail.com>.
OK.
> On Jan 13, 2022, at 12:37 AM, Alex Harui <ah...@adobe.com> wrote:
>
> The problem is that some output might look like this:
>
> bar.Foo.prototype.ROYALE_CLASS_INFO = { name: “Foo”. qName: “bar.Foo” };
>
> And the minifier will rename qName in the output differently in the main app vs the module:
>
> In the main app:
> bar.Foo..prototype.ROYALE_CLASS_INFO = { name: “Foo”. a: “bar.Foo” };
>
> In a module:
> bar.Baz..prototype.ROYALE_CLASS_INFO = { name: “Baz”. c: “bar.Baz” };
>
> Code that accesses someObj.ROYALE_CLASS_INFO.qName in the main app will do:
>
> Var qName = someObj.ROYALE_CLASS_INFO.a;
>
> And that won’t work for objects in the module that are using ‘c’ for QName.
>
> If you turn on -js-dynamic-access-unknown-members when building the SWCs, then these patterns in the SWC will look like:
>
> bar.Foo.prototype.ROYALE_CLASS_INFO = { name: “Foo”. ‘qName’: “bar.Foo” };
>
> But then every user of the SWC will never get qName renamed, which wastes bytes. So I think we want to not use -js-dynamic-access-unknown-members when building SWCs.
>
> So the -prevent-rename-object-keys option I added is only turned on for certain keys when building a module or a main app that loads a module. For the simple Module example, we only needed to prevent renaming of the following keys:
> cssData, _bindings, ROYALE_CLASS_INFO, superClass_, qName
>
> The Royale compiler copies JS files from the SWCs to bin/js-debug. What this option does is filter each file as it is copied, modifying the code for the keys. We’re already scanning every line in those files anyway in GoogDepsWriter. That way folks not building apps with modules get maximum renaming and only those needing to prevent renaming in their output can prevent that renaming.
>
> We’ll see if that holds up well for Roman. There was some additional hacking in the compiler since superclass_ is in base.js and not in our SWCs, so that file and key was special cased. Will there be more? Also I special cased Language.is/as/closure <http://language.is/as/closure> as they are not unknown members but are not exported and can be renamed in most apps but need to not be renamed for module and apps loading modules.
>
> You might find it useful to shave off a few bytes in your app where you don’t really want ALL unknown members to not be renamed. This option can let you specify just the list of members that matter.
>
> HTH,
> -Alex
>
>
> From: Harbs <ha...@gmail.com>
> Reply-To: "users@royale.apache.org" <us...@royale.apache.org>
> Date: Wednesday, January 12, 2022 at 2:13 PM
> To: "users@royale.apache.org" <us...@royale.apache.org>
> Subject: Re: Compiling Modules (was Re: Load time is very slow)
>
> Didn’t totally grok what you said.
>
> Can you give a practical difference in when it would be used?
>
>
>> On Jan 12, 2022, at 7:39 PM, Alex Harui <aharui@adobe.com <ma...@adobe.com>> wrote:
>>
>> The option I added takes a list of members and post-processes. I think all other options change what is output during the compilation and -js-dynamic-access-unknown-members doesn’t take a list of members.
>>
>> -Alex
>>
>> From: Harbs <harbs.lists@gmail.com <ma...@gmail.com>>
>> Reply-To: "users@royale.apache.org <ma...@royale.apache.org>" <users@royale.apache.org <ma...@royale.apache.org>>
>> Date: Wednesday, January 12, 2022 at 2:30 AM
>> To: "users@royale.apache.org <ma...@royale.apache.org>" <users@royale.apache.org <ma...@royale.apache.org>>
>> Subject: Re: Compiling Modules (was Re: Load time is very slow)
>>
>> How is this different than -js-dynamic-access-unknown-members?
>>
>>
>>
>>> On Jan 12, 2022, at 10:04 AM, Alex Harui <aharui@adobe.com <ma...@adobe.com>> wrote:
>>>
>>> I added a -prevent-rename-object-keys compiler option that works as a post-processor. It scans the js files being copied into bin/js-debug and adds quotes around things.
Re: Compiling Modules (was Re: Load time is very slow)
Posted by Alex Harui <ah...@adobe.com>.
The problem is that some output might look like this:
bar.Foo.prototype.ROYALE_CLASS_INFO = { name: “Foo”. qName: “bar.Foo” };
And the minifier will rename qName in the output differently in the main app vs the module:
In the main app:
bar.Foo..prototype.ROYALE_CLASS_INFO = { name: “Foo”. a: “bar.Foo” };
In a module:
bar.Baz..prototype.ROYALE_CLASS_INFO = { name: “Baz”. c: “bar.Baz” };
Code that accesses someObj.ROYALE_CLASS_INFO.qName in the main app will do:
Var qName = someObj.ROYALE_CLASS_INFO.a;
And that won’t work for objects in the module that are using ‘c’ for QName.
If you turn on -js-dynamic-access-unknown-members when building the SWCs, then these patterns in the SWC will look like:
bar.Foo.prototype.ROYALE_CLASS_INFO = { name: “Foo”. ‘qName’: “bar.Foo” };
But then every user of the SWC will never get qName renamed, which wastes bytes. So I think we want to not use -js-dynamic-access-unknown-members when building SWCs.
So the -prevent-rename-object-keys option I added is only turned on for certain keys when building a module or a main app that loads a module. For the simple Module example, we only needed to prevent renaming of the following keys:
cssData, _bindings, ROYALE_CLASS_INFO, superClass_, qName
The Royale compiler copies JS files from the SWCs to bin/js-debug. What this option does is filter each file as it is copied, modifying the code for the keys. We’re already scanning every line in those files anyway in GoogDepsWriter. That way folks not building apps with modules get maximum renaming and only those needing to prevent renaming in their output can prevent that renaming.
We’ll see if that holds up well for Roman. There was some additional hacking in the compiler since superclass_ is in base.js and not in our SWCs, so that file and key was special cased. Will there be more? Also I special cased Language.is/as/closure as they are not unknown members but are not exported and can be renamed in most apps but need to not be renamed for module and apps loading modules.
You might find it useful to shave off a few bytes in your app where you don’t really want ALL unknown members to not be renamed. This option can let you specify just the list of members that matter.
HTH,
-Alex
From: Harbs <ha...@gmail.com>
Reply-To: "users@royale.apache.org" <us...@royale.apache.org>
Date: Wednesday, January 12, 2022 at 2:13 PM
To: "users@royale.apache.org" <us...@royale.apache.org>
Subject: Re: Compiling Modules (was Re: Load time is very slow)
Didn’t totally grok what you said.
Can you give a practical difference in when it would be used?
On Jan 12, 2022, at 7:39 PM, Alex Harui <ah...@adobe.com>> wrote:
The option I added takes a list of members and post-processes. I think all other options change what is output during the compilation and -js-dynamic-access-unknown-members doesn’t take a list of members.
-Alex
From: Harbs <ha...@gmail.com>>
Reply-To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Date: Wednesday, January 12, 2022 at 2:30 AM
To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Subject: Re: Compiling Modules (was Re: Load time is very slow)
How is this different than -js-dynamic-access-unknown-members?
On Jan 12, 2022, at 10:04 AM, Alex Harui <ah...@adobe.com>> wrote:
I added a -prevent-rename-object-keys compiler option that works as a post-processor. It scans the js files being copied into bin/js-debug and adds quotes around things.
Re: Compiling Modules (was Re: Load time is very slow)
Posted by Harbs <ha...@gmail.com>.
Didn’t totally grok what you said.
Can you give a practical difference in when it would be used?
> On Jan 12, 2022, at 7:39 PM, Alex Harui <ah...@adobe.com> wrote:
>
> The option I added takes a list of members and post-processes. I think all other options change what is output during the compilation and -js-dynamic-access-unknown-members doesn’t take a list of members.
>
> -Alex
>
> From: Harbs <ha...@gmail.com>
> Reply-To: "users@royale.apache.org" <us...@royale.apache.org>
> Date: Wednesday, January 12, 2022 at 2:30 AM
> To: "users@royale.apache.org" <us...@royale.apache.org>
> Subject: Re: Compiling Modules (was Re: Load time is very slow)
>
> How is this different than -js-dynamic-access-unknown-members?
>
>
>> On Jan 12, 2022, at 10:04 AM, Alex Harui <aharui@adobe.com <ma...@adobe.com>> wrote:
>>
>> I added a -prevent-rename-object-keys compiler option that works as a post-processor. It scans the js files being copied into bin/js-debug and adds quotes around things.
Re: Compiling Modules (was Re: Load time is very slow)
Posted by Alex Harui <ah...@adobe.com>.
The option I added takes a list of members and post-processes. I think all other options change what is output during the compilation and -js-dynamic-access-unknown-members doesn’t take a list of members.
-Alex
From: Harbs <ha...@gmail.com>
Reply-To: "users@royale.apache.org" <us...@royale.apache.org>
Date: Wednesday, January 12, 2022 at 2:30 AM
To: "users@royale.apache.org" <us...@royale.apache.org>
Subject: Re: Compiling Modules (was Re: Load time is very slow)
How is this different than -js-dynamic-access-unknown-members?
On Jan 12, 2022, at 10:04 AM, Alex Harui <ah...@adobe.com>> wrote:
I added a -prevent-rename-object-keys compiler option that works as a post-processor. It scans the js files being copied into bin/js-debug and adds quotes around things.
Re: Compiling Modules (was Re: Load time is very slow)
Posted by Harbs <ha...@gmail.com>.
How is this different than -js-dynamic-access-unknown-members?
> On Jan 12, 2022, at 10:04 AM, Alex Harui <ah...@adobe.com> wrote:
>
> I added a -prevent-rename-object-keys compiler option that works as a post-processor. It scans the js files being copied into bin/js-debug and adds quotes around things.
Re: Compiling Modules (was Re: Load time is very slow)
Posted by Greg Dove <gr...@gmail.com>.
Sounds great Alex!
I will try to check it out early next week.
I especially like this:
"Another difference is that the new compiler strategy doesn’t use custom
overrides of Closure Compiler passes which was fragile and will make it
easier to upgrade to newer versions of Closure Compiler."
I tried and failed at one point to figure out how to migrate that stuff to
a more recent version.
On Wed, Jan 12, 2022 at 9:04 PM Alex Harui <ah...@adobe.com> wrote:
> I pushed a ReleaseModules branch in royale-compiler and royale-asjs.
>
>
>
> These changes cause the royale-asjs/examples/royale/ModuleExample release
> version to work.
>
>
>
> The big challenge is that it turned out there is a fair amount of
> infrastructure that is not exported/public. The Language utilities,
> ROYALE_CLASS_INFO, the superclass_ property, cssData and others are going
> to get renamed. And thus renamed differently in the main app vs the module.
>
>
>
> That’s why the current compiler’s strategy was to try to copy the renaming
> map from the main app to the module, but it didn’t always work. There
> seems to be a bug in the Closure Compiler that a set of externs causes the
> compiler to mis-handle package-paths. Also, it meant that the module
> contained its own copy of most of the infrastructure
>
>
>
> The new compiler strategy is a bit more like the old Flex module
> strategy. The module tries to not contain a copy of code that already
> exists in the main app. Some of the goog/base.js stuff still gets copied
> though. Then because we avoid renaming more things, the module can
> reference the shared infrastructure in the main app.
>
>
>
> The new compiler detects if what is being compiled is a loader of modules
> (because it is generating an externs-report) or is a Module and prevents
> renaming of Language APIs, modified base.js to not rename the superClass_
> property used for calling super() and a few other things. In addition, I
> added a -prevent-rename-object-keys compiler option that works as a
> post-processor. It scans the js files being copied into bin/js-debug and
> adds quotes around things.
>
>
>
> By making these changes, I was able to get the closure compiler to
> mis-handle the packages in a more predictable way, so another thing the new
> compiler does is post-process the output file to remove the incorrect
> package code. The incorrect code would re-init package paths like “org” or
> “org.apache.royale”.
>
>
>
> Anyway, give it a try and see if it works. Probably we’ll find out there
> is more infrastructure that needs to not be renamed, but I think this has a
> better chance of working as we aren’t blocked by the compiler outputting
> bad code. Many months ago I tried to understand how why the Closure
> Compiler output bad code, but ran out of time.
>
>
>
> Another difference is that the new compiler strategy doesn’t use custom
> overrides of Closure Compiler passes which was fragile and will make it
> easier to upgrade to newer versions of Closure Compiler.
>
>
>
> HTH,
>
> -Alex
>
>
>
> *From: *Alex Harui <ah...@adobe.com>
> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Date: *Wednesday, January 5, 2022 at 9:53 AM
> *To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Subject: *Re: Compiling Modules (was Re: Load time is very slow)
>
>
>
> I probably won’t have time to really dig into this until the weekend. It
> is looking like the Closure Compiler gets confused when presented with
> externs for the same package tree that the module is generating new classes
> for.
>
>
>
> -Alex
>
>
>
> *From: *Roman Isitua <ro...@gmail.com>
> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Date: *Tuesday, January 4, 2022 at 1:57 PM
> *To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Subject: *Re: Compiling Modules (was Re: Load time is very slow)
>
>
>
> Okay. I knew I was missing something.
>
>
>
> I will test again when the update for load-externs is available.
>
>
>
> On Tue, Jan 4, 2022 at 6:02 PM Alex Harui <ah...@adobe.com> wrote:
>
> Essentially, -externs-report is for the Closure (JS) Compiler.
> -link-report and -load-externs (one leading ‘-‘) is for the Royale Compiler
> to tell the Royale Compiler what classes to feed to the Closure Compiler.
> Both contain the same data (the set of classes used in the main app), just
> formatted differently and used differently.
>
>
>
> The –externs option for the Closure Compiler then tells the Closure
> Compiler not to look for classes in the set of files it is supposed to
> minify.
>
>
>
> So, you have the right settings for the main app, but for the module, it
> should be:
>
> *-js-compiler-option=--externs extrep.txt; -load-externs linkrep.txt;*
>
>
>
> However, even that won’t work today, as the Royale Compiler is not
> handling -load-externs on the JS prep for Closure Compiler. I have some
> local changes to the compiler that mixes most of it, but am facing issues
> with how Closure handles package paths. If that can be resolved, then we
> have a good chance of things working.
>
>
>
> -Alex
>
>
>
> *From: *Roman Isitua <ro...@gmail.com>
> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Date: *Tuesday, January 4, 2022 at 12:39 AM
> *To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Subject: *Re: Compiling Modules (was Re: Load time is very slow)
>
>
>
> Thanks for the update.
>
>
>
> I attempted the following:
>
>
>
> 1. In the main application, I use the following setting:
>
> *-externs-report=extrep.txt; -link-report=linkrep.txt;*
>
>
>
> 2. In the module I use the following
>
>
>
> *-js-compiler-option=--externs extrep.txt;
> -js-compiler-option+=--load-externs linkrep.txt;*
>
>
>
> The main application compiles successfully, I get a compilation error with
> the module
>
>
>
> "--load-externs" is not a valid option
> Sample usage: --compilation_level (-O) VAL --externs VAL --js VAL
> --js_output_file VAL --warning_level (-W) [QUIET | DEFAULT
> | VERBOSE]
> Run with --help for all options and details
> Internal error: java.lang.NullPointerException
> com.google.javascript.jscomp.CommandLineRunner.createOptions(CommandLineRunner.java:1809)org.apache.royale.compiler.utils.JSClosureCompilerWrapper$CompilerOptionsParser.getOptions(JSClosureCompilerWrapper.java:529)org.apache.royale.compiler.utils.JSClosureCompilerWrapper.<init>(JSClosureCompilerWrapper.java:77)org.apache.royale.compiler.internal.codegen.mxml.royale.MXMLRoyalePublisher.publish(MXMLRoyalePublisher.java:395)org.apache.royale.compiler.clients.M
>
>
>
>
>
>
>
> I don't think I am using this option correctly.
>
>
>
>
>
>
>
> .....
>
>
>
> On Tue, Jan 4, 2022 at 8:44 AM Alex Harui <ah...@adobe.com> wrote:
>
> I found some time to investigate. The -externs-report option is mostly
> working correctly, but other compiler changes are needed to try to avoid
> duplicate code in the module. I might have time to investigate more this
> coming weekend. It does appear that if we can correctly reference the
> app’s class from the module that it will work. The Closure Compiler let me
> compile the module after I externalize and avoid requires on everything in
> the main app’s externs report and -js link report, but the references in
> the module have collapsed packages which is either incorrect or aliases
> need to be created.
>
>
>
> However I think this new approach has a better chance of working than
> trying to match renaming tables.
>
>
>
> -Alex
>
>
>
> *From: *Alex Harui <ah...@adobe.com>
> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Date: *Monday, January 3, 2022 at 2:30 PM
> *To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Subject: *Re: Compiling Modules (was Re: Load time is very slow)
>
>
>
> The -externs-report option should be similar to the -link-report option.
> It takes a filename. The compiler should output the classes used in the JS
> compile into that file. To use externs, I think you don’t need to prevent
> renaming in the application as long as public variables are exported. I
> think you specify -externs-report when compiling the application.
>
>
>
> You may also need to output a -link-report from the application as well.
>
>
>
> I think you then specify the externs-report file as an -externs for the
> -js-compiler-options when compiling the module. And maybe also specify the
> -link-report output as a -load-externs in the same way it was used when
> compiling Flex modules. The goal for the module is, like Flex, to not have
> any classes in the module that exist in the main app. Then it doesn’t
> matter about class renaming within the release-mode JS file.
>
>
>
> HTH,
>
> -Alex
>
>
>
> *From: *Roman Isitua <ro...@gmail.com>
> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Date: *Monday, January 3, 2022 at 12:37 PM
> *To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Subject: *Re: Compiling Modules (was Re: Load time is very slow)
>
>
>
>
>
> I can confirm that classes are being renamed in both files.
>
>
>
> I have attempted your suggestion i.e. removing variable maps and property
> maps then use
>
> -externs-report;-export-public-symbols=true;-prevent-rename-public-symbols=true;
>
>
>
>
> I get the below error
>
>
>
> command line Error: configuration variable 'externs-report' expected 1
> argument(s), got 0.
>
>
>
> I cannot find any documentation on how to use the -externs-report
> argument. What does it do ? and what are the acceptable values ?
>
>
>
> Regards,
>
>
>
>
>
> On Sun, Jan 2, 2022 at 9:06 AM Alex Harui <ah...@adobe.com> wrote:
>
> Hi Roman,
>
>
>
> It might be more complicated. The settings are probably doing something
> since you reported that the error occurred in the app vs the module
> depending on the settings.
>
>
>
> I went back and looked at the original module example in
> examples/royale/ModuleExample and was surprised there weren’t more compiler
> settings. I thought we’d found a way to externalize the main app’s code
> for the module. Because if both the app and module have a copy of
> SimpleCSSValuesImpl or any other class that both JS files use, there could
> be issues as to which one gets loaded (maybe both) and what export aliases
> are pointing to. Sounds like changing settings affected whether the
> aliases pointed at module code vs app code.
>
>
>
> I thought we were using similar settings to what we used for SWF where the
> module would not contain a copy of SimpleCSSValuesImpl so it would use the
> one loaded by the main app, but I didn’t see those settings. We might need
> to make that work because otherwise I think static initializations won’t do
> the right thing. Or maybe we’ve figured out that it is simpler just to
> write defensive code that doesn’t get broken. But also, if the module has
> its own copy of code already loaded by the main app, that’s sort of a waste
> of bytes. Maybe there was a minification issue with not having the module
> link in classes already linked into the main app. I see an -externs-report
> option in the compiler but the example doesn’t seem to use it.
>
>
>
> You should be able to scan the JS files and see if a class is in both
> module and app and if it is getting renamed.
>
>
>
> I don’t know if I will have time to investigate further. The currently
> recommended options for modules involving variable maps and property maps
> may need to be abandoned in favor of externs and preventing renames.
>
>
>
> -Alex
>
>
>
>
>
> *From: *Roman Isitua <ro...@gmail.com>
> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Date: *Saturday, January 1, 2022 at 3:02 AM
> *To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Subject: *Re: Compiling Modules (was Re: Load time is very slow)
>
>
>
> Alex, thank you for your detailed analysis of the error log.
>
>
>
> I agree with you that the best strategy is to prevent renaming of
> public/exports used by the module. I have tried different options to
> prevent renaming
>
> It appears none of them stops this. From my observation, it appears that
> this default options below
>
>
>
>
> -export-public-symbols=true;-prevent-rename-public-symbols=true;-prevent-rename-public-instance-accessors=true;
>
>
>
> Only seem to affect the main application (main module) but have no effect
> on the other modules even though I ensured they were applied in
> their respective module pom. I came to this conclusion when I decided to
> turn set -prevent-rename-public-symbols=false
>
>
>
> I noticed that I got the same error but this time around in the main
> module.
>
>
>
> Uncaught TypeError: this.rb[(intermediate value).Kd(...)] is not a function
> at HN.iI.send (FrontEnd.js:970)
> at nI.EH.Ea (FrontEnd.js:880)
> at ON.q6 (FrontEnd.js:1815)
> at TN.L2 (FrontEnd.js:2034)
> at hF.Xf (FrontEnd.js:2063)
> at lF.kb (FrontEnd.js:1233)
> at lF.Vf (FrontEnd.js:1224)
> at cF.O (FrontEnd.js:659)
> at cF.M.w (FrontEnd.js:661)
> at gQ.mA.M (FrontEnd.js:241)
>
>
>
> FrontEnd.js maps to FrontEnd.as in my application and is the entry point
> of the application. This confirms that -prevent-rename-public-symbols=false
> has
>
> an effect on the main module but no effect on other modules even though
> they were applied in the respective module pom's.
>
>
>
> Maybe there are other options I am overlooking.
>
>
>
> On Sat, Jan 1, 2022 at 9:31 AM Alex Harui <ah...@adobe.com> wrote:
>
> In case it helps, the minification (variable renaming) mechanism is
> essentially guaranteed to cause problems in modules. The Closure Compiler
> basically takes variables, sees if it is worth renaming it, then gives it
> the name ‘a’, then ‘b’, and so-on, (it skips a few letters, IIRC), then
> moves on to ‘aa’, and ‘ab’, etc. The odds that the compiler will encounter
> the same variables in the same order when compiling an app and one or more
> modules is close to zero.
>
>
>
> I did some work to try to dump the mapping of the renamed variables in the
> main app and use that when compiling the modules. It was working for a
> while, then some code was added to the framework that started fooling the
> Closure Compiler. I spent some time trying to fix the Closure Compiler,
> but ran out of time. Meanwhile, Josh was adding more control over renaming
> so I moved on to other things.
>
>
>
> IMO, the best strategy to take would be to try to control what gets
> renamed. All public/exports from the app that are used by the module
> should not be renamed. That will definitely make the app and modules
> bigger, but unless the Closure Compiler folks become interested in
> runtime-loaded modules, it is challenging for the Royale compiler to allow
> aggressive renaming.
>
>
>
> I think what is going on with the exceptions below is that exporting
> doesn’t really prevent renaming. It only sets up an externally-visible
> alias to a renamed variable. Especially for static members. So it isn’t
> sufficient to export public variables, the code within the module must not
> let the Closure Compiler think that the intra-module references can be
> renamed, in this case, from SimpleCSSValuesImpl to QI
>
>
>
> I don’t know the renaming options we’ve added to the Royale Compiler, so I
> don’t know if there is an option to control that. I think there is a way
> to convince the Closure Compiler to not rename SimpleCSSValuesImpl because
> I’ve seen other class names not get renamed.
>
>
>
> HTH,
>
> -Alex
>
>
>
> *From: *Roman Isitua <ro...@gmail.com>
> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Date: *Friday, December 31, 2021 at 10:42 AM
> *To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Subject: *Re: Compiling Modules (was Re: Load time is very slow)
>
>
>
> I have tested on both. The error log is the same.
>
>
>
> I don't understand your second question. Kindly clarify ?
>
>
>
>
>
> I followed strictly the approach used for loading modules here in this
> example.
>
> This is the only method I know for loading modules. If there is another
> method please share.
>
>
>
>
>
>
> https://royale.apache.org/dividing-an-apache-royale-application-with-modules/
> <https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Froyale.apache.org%2Fdividing-an-apache-royale-application-with-modules%2F&data=04%7C01%7Caharui%40adobe.com%7Ce0c38cc4559641ff0f2108d9d074405d%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637770019992898481%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=c65JOYsEODcatlGZtwlpe7DOQanC%2BdL3zyGSPWgBYS4%3D&reserved=0>
>
>
>
> On Fri, 31 Dec 2021, 19:14 Maria Jose Esteve, <mj...@iest.com> wrote:
>
> @Roman, which branch did you compile the SDK from, ROYALE_INTERFACE_INFO
> or develop?
>
> Could you pass the Overview.mxml view to the main application? (to rule
> it out)
>
>
>
> Hiedra
>
>
>
> *De:* Roman Isitua <ro...@gmail.com>
> *Enviado el:* viernes, 31 de diciembre de 2021 17:56
> *Para:* users@royale.apache.org
> *Asunto:* Re: Compiling Modules (was Re: Load time is very slow)
>
>
>
> I have tried tracing where the errors are happening whenever I test the
> release version
>
> Uncaught TypeError: Ql.valuesImpl.init is not a function
> at Hr.Cr.um (Overview.js:846)
> at Function.ep.generateMXMLProperties (Overview.js:795)
> at Hr.Sp.generateMXMLAttributes (Overview.js:599)
> at new Hr (Overview.js:864)
> at PN.M.loadHandler (FrontEnd.js:2042)
> 9Overview.js:173 Uncaught TypeError: this.createElement is not a function
> at $B.V (Overview.js:173)
> at new $B (FrontEnd.js:2430)
> at EP.convert (FrontEnd.js:2430)
> at Zy (FrontEnd.js:261)
> at HTMLAnchorElement.Uy (FrontEnd.js:121)
> at HTMLAnchorElement.Sy.b (FrontEnd.js:117)
>
>
>
>
>
> The highlighted code in red is declared as follows in the Overview.mxml
> (maven module)
>
>
>
> <j:valuesImpl>
>
> <js:SimpleCSSValuesImpl/>
>
> </j:valuesImpl>
>
>
>
> The j:valuesImpl points to the following code in jewel Module.js
>
>
>
> /**
> * @nocollapse
> * @export
> * @type {org.apache.royale.core.IValuesImpl}
> */
> org.apache.royale.jewel.Module.prototype.valuesImpl;
>
>
> org.apache.royale.jewel.Module.prototype.set__valuesImpl = function(value)
> {
> org.apache.royale.core.ValuesManager.valuesImpl.init(this);
> };
>
>
>
>
>
> it appears this function is improperly renamed and whenever the app tries
> to load the module is not able to recognise it as a function.
>
>
>
> The same issue of improper function renaming is happening in the second
> error as well
>
>
>
> 9Overview.js:173 Uncaught TypeError: this.createElement is not a function
>
>
>
>
>
> On Thu, Dec 30, 2021 at 10:42 PM Roman Isitua <ro...@gmail.com>
> wrote:
>
>
>
> I have applied the js compiler option as follows
>
>
>
>
> <additionalCompilerOptions>-source-map=false;-compiler.show-binding-warnings=false;-js-default-initializers=true;-js-dynamic-access-unknown-members=true;
> -js-compiler-option=--variable_map_output_file
> gccvars.txt;-js-compiler-option+=--property_map_output_file gccprops.txt
> </additionalCompilerOptions>
>
>
>
>
>
> I get the same error as before when attempting to launch the jewel module.
>
>
>
> *Error! Filename not specified.*
>
>
>
>
>
> Same error trace.
>
>
>
> Uncaught TypeError: cm.valuesImpl.init is not a function
> at Rr.Mr.yl (Overview.js:786)
> at Function.iq.generateMXMLProperties (Overview.js:736)
> at Rr.hq.generateMXMLAttributes (Overview.js:546)
> at new Rr (Overview.js:804)
> at LN.J.loadHandler (FrontEnd.js:1967)
> FrontEnd.js:1640 Uncaught TypeError: M is not a function
> at oM.J.handleMouseOut (FrontEnd.js:1640)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:248)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> FrontEnd.js:1640 Uncaught TypeError: M is not a function
> at oM.J.handleMouseOver (FrontEnd.js:1640)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:248)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> FrontEnd.js:1640 Uncaught TypeError: M is not a function
> at oM.J.handleMouseOut (FrontEnd.js:1640)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:248)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> FrontEnd.js:1640 Uncaught TypeError: M is not a function
> at oM.J.handleMouseOver (FrontEnd.js:1640)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:248)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> FrontEnd.js:1640 Uncaught TypeError: M is not a function
> at oM.J.handleMouseOut (FrontEnd.js:1640)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:248)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> FrontEnd.js:1640 Uncaught TypeError: M is not a function
> at oM.J.handleMouseOver (FrontEnd.js:1640)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:248)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> FrontEnd.js:1640 Uncaught TypeError: M is not a function
> at oM.J.handleMouseOut (FrontEnd.js:1640)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:248)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> 3Overview.js:56 Uncaught TypeError: Cannot read properties of undefined
> (reading 'prototype')
> at P (Overview.js:56)
> at SG.convert (FrontEnd.js:904)
> at ny (FrontEnd.js:248)
> at HTMLElement.iy (FrontEnd.js:125)
> at HTMLElement.b (FrontEnd.js:121)
>
>
>
> On Thu, Dec 30, 2021 at 6:56 PM Harbs <ha...@gmail.com> wrote:
>
> 1. I’d get rid of the agressive minification options. It will likely cause
> issues. If you get it to work without those options, you can try to add
> them back in and see if it still works.
>
> 2. You seem to be missing the compiler options explained here:
> https://apache.github.io/royale-docs/features/modules#minification
> <https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapache.github.io%2Froyale-docs%2Ffeatures%2Fmodules%23minification&data=04%7C01%7Caharui%40adobe.com%7Ce0c38cc4559641ff0f2108d9d074405d%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637770019992898481%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=y2M3Q%2F9KMsGdV2gANubdFhMj3uB5rzUgVxJDbF6wYKI%3D&reserved=0>
>
>
>
> For a pom, it would look something like this (adjust your paths to match
> your setup):
>
>
>
> Main app:
>
> <additionalCompilerOptions>-source-map=true;-js-compiler-option=--variable_map_output_file
> gccvars.txt;-js-compiler-option+=--property_map_output_file
> gccprops.txt</additionalCompilerOptions>
>
>
>
> Module:
>
> <additionalCompilerOptions>-source-map=true;-js-compiler-option=--variable_map_input_file
> ../../../../../MainApp/bin/js-release/gccvars.txt;-js-compiler-option+=--property_map_input_file
> ../../../../../MainApp/bin/js-release/gccprops.txt</additionalCompilerOptions>
>
>
>
> On Dec 30, 2021, at 7:43 PM, Roman Isitua <ro...@gmail.com> wrote:
>
>
>
> I think it will be better for me to share my pom's that way you can see
> all the compilation options used. The pom for the parent (FmClient2), the
> MainApp and one module (Overview) have been attached to this email.
>
>
>
>
>
> On Thu, Dec 30, 2021 at 6:22 PM Harbs <ha...@gmail.com> wrote:
>
> Roman, can you share your full compiler options?
>
>
>
> I decided to remove the below settings completely
> -export-public-symbols=false
> -prevent-rename-protected-symbols=false
> -prevent-rename-public-symbols=false
> -prevent-rename-internal-symbols=false
>
>
> I enabled the below settings
>
> -js-dynamic-access-unknown-members=true;
> -js-default-initializers=true
>
>
> The release version starts up
>
>
>
> Hiedra, that’s great!
>
>
>
> On Dec 30, 2021, at 7:15 PM, Roman Isitua <ro...@gmail.com> wrote:
>
>
>
>
>
> Yes. I am testing with the sdk compiled on branch ROYALE_INTERFACE_INFO
>
>
>
> On Thu, Dec 30, 2021 at 6:10 PM Maria Jose Esteve <mj...@iest.com>
> wrote:
>
> Roman, are you testing with the SDK compiled from the Harb branches,
> ROYALE_INTERFACE_INFO, or from develop?
>
>
>
> Hiedra
>
>
>
> *De:* Roman Isitua <ro...@gmail.com>
> *Enviado el:* jueves, 30 de diciembre de 2021 16:52
> *Para:* users@royale.apache.org
> *Asunto:* Re: Compiling Modules (was Re: Load time is very slow)
>
>
>
> I decided to remove the below settings completely
> -export-public-symbols=false
> -prevent-rename-protected-symbols=false
> -prevent-rename-public-symbols=false
> -prevent-rename-internal-symbols=false
>
>
> I enabled the below settings
>
> -js-dynamic-access-unknown-members=true;
> -js-default-initializers=true
>
>
> The release version starts up
>
>
>
>
>
>
>
> <image001.png>
>
>
>
>
>
> <image002.png>
>
>
>
> However, the moment I launch a module. I get the below error
>
>
>
> <image003.png>
>
>
>
>
>
> It appears to be failing when I launch the "*Overview*" module
> (by clicking the Overview side menu).
>
>
>
> So my current observation is that by retaining only two settings
>
>
>
> -js-dynamic-access-unknown-members=true;
> -js-default-initializers=true
>
>
>
> The release module starts up but the app fails whenever I launch a module.
>
>
>
> The smallest size settings in the documentation do not work. The app does
> not start up.
>
>
>
> -export-public-symbols=false
> -prevent-rename-protected-symbols=false
> -prevent-rename-public-symbols=false
> -prevent-rename-internal-symbols=false
>
>
>
>
>
>
>
> The error trace is below
>
>
>
>
>
> Uncaught TypeError: cm.valuesImpl.init is not a function
> at Wr.Rr.pl
> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwr.rr.pl%2F&data=04%7C01%7Caharui%40adobe.com%7Ce0c38cc4559641ff0f2108d9d074405d%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637770019992898481%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=N4Mx5wcKqYMpOWlu5N7IbWeBmPyhbDkM0OAAnOqjZlI%3D&reserved=0>
> (Overview.js:792)
> at Function.mq.generateMXMLProperties (Overview.js:743)
> at Wr.lq.generateMXMLAttributes (Overview.js:551)
> at new Wr (Overview.js:810)
> at QN.J.loadHandler (FrontEnd.js:1978)
> 3Overview.js:56 Uncaught TypeError: Cannot read properties of undefined
> (reading 'prototype')
> at P (Overview.js:56)
> at VG.convert (FrontEnd.js:910)
> at ny (FrontEnd.js:250)
> at HTMLElement.iy (FrontEnd.js:125)
> at HTMLElement.b (FrontEnd.js:121)
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOut (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOver (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOver @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOut (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOut @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOver (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOver @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOut (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOut @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOver (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOver @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOut (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOut @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOver (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOver @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOut (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOut @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
>
>
>
> On Thu, Dec 30, 2021 at 4:32 PM Roman Isitua <ro...@gmail.com>
> wrote:
>
> I get the same error even when I set
> the -js-dynamic-access-unknown-members=true;
>
>
>
> On Thu, Dec 30, 2021 at 4:24 PM Roman Isitua <ro...@gmail.com>
> wrote:
>
>
>
> Using the below settings,
>
> -export-public-symbols=false
> -prevent-rename-protected-symbols=false
> -prevent-rename-public-symbols=false
> -prevent-rename-internal-symbols=false
> -js-dynamic-access-unknown-members=false;
>
> -js-default-initializers=true
>
>
> Debug version runs fine. The release version does not start up
>
> <image004.png>
>
>
> I get the below errors
>
> Uncaught TypeError: Cannot read properties of undefined (reading 'apply')
> at KE.hm (FrontEnd.js:1600)
> at XE.M.Fb (FrontEnd.js:943)
> at XE.M.uh (FrontEnd.js:937)
> at FE.M.na
> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Ffe.m.na%2F&data=04%7C01%7Caharui%40adobe.com%7Ce0c38cc4559641ff0f2108d9d074405d%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637770019992898481%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=C0z70EcllmVEEFk21%2FuH%2FhC%2Fz8a8hrB7AuxRyMw%2FXn4%3D&reserved=0>
> (FrontEnd.js:497)
> at FE.M.v (FrontEnd.js:497)
> at dR.M.S (FrontEnd.js:213)
> at dR.Nz.S (FrontEnd.js:217)
> at dR.M.start (FrontEnd.js:1396)
> at index.html:45
> :8080/favicon.ico:1 Failed to load resource: the server responded with a
> status of 404 (Not Found)
>
>
>
>
>
> FrontEnd.js is the start up class for the application. i.e. It implements
> the Jewel application class.
>
>
>
>
>
>
>
> On Thu, Dec 30, 2021 at 3:19 PM Roman Isitua <ro...@gmail.com>
> wrote:
>
> Hi Harb,
>
>
>
> Thanks for your response. I have gone through the documentation. I will do
> my test again starting with the smallest size option and share my findings.
>
>
>
> Regards,
>
>
>
> On Thu, Dec 30, 2021 at 10:59 AM Harbs <ha...@gmail.com> wrote:
>
> Sorry for my deal in responding.
>
>
>
> Let’s take a step back.
>
>
>
> I’m not sure how you are compiling your modules. I just added some content
> to the module documentation page which explains what compiler options you
> need while compiling modules. (It still needs some editing.)
> https://apache.github.io/royale-docs/features/modules#minification
> <https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapache.github.io%2Froyale-docs%2Ffeatures%2Fmodules%23minification&data=04%7C01%7Caharui%40adobe.com%7Ce0c38cc4559641ff0f2108d9d074405d%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637770019992898481%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=y2M3Q%2F9KMsGdV2gANubdFhMj3uB5rzUgVxJDbF6wYKI%3D&reserved=0>
>
>
>
> Are you using those options?
>
>
>
> On Dec 29, 2021, at 2:19 AM, Maria Jose Esteve <mj...@iest.com> wrote:
>
>
>
> Hi, Let me join you with these tests....
>
>
>
> @Harb, I have compiled the SDK from this branch, feature/ROYALE_INTERFACE_INFO,
> and when running in debug I get this error:
>
>
>
> Message on the PURGE CONSOLE is displayed:
>
>
>
> Cannot convert org.apache.royale.reflection.beads.ClassAliasBead to IBead
>
>
>
> Message in the IDE Window:
>
>
>
> Se produjo una excepción: TypeError: Cannot convert [object Object] to
> IBead
>
> at App.org.apache.royale.core.ElementWrapper.addBead (
> http://localhost:8080/WNetSuitePlus/org/apache/royale/core/ElementWrapper.js:114:11
> )
>
> at App.org.apache.royale.core.HTMLElementWrapper.addBead (
> http://localhost:8080/WNetSuitePlus/org/apache/royale/core/HTMLElementWrapper.js:43:65
> )
>
> at App.org.apache.royale.jewel.Application.start (
> http://localhost:8080/WNetSuitePlus/org/apache/royale/jewel/Application.js:246:10
> )
>
> at App.App_loadXML (http://localhost:8080/WNetSuitePlus/App.js:1681:25
> )
>
> at
> org.apache.royale.net.URLLoader.org.apache.royale.events.EventDispatcher.fireListeners
> (
> http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:97:23
> )
>
> at Function.goog.events.EventTarget.dispatchEventInternal_ (
> http://localhost:8080/WNetSuitePlus/library/closure/goog/events/eventtarget.js:381:26
> )
>
> at
> org.apache.royale.net.URLLoader.org.apache.royale.events.EventDispatcher.dispatchEvent
> (
> http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:72:37
> )
>
> at org.apache.royale.net.URLLoader.jsEventHandler (
> http://localhost:8080/WNetSuitePlus/org/apache/royale/net/URLLoader.js:169:12
> )
>
>
>
> Call stack:
>
>
>
> <image003.png>
>
>
>
> [INFO] Executing MXMLC in tool group Royale with args: [
>
>
> -load-config=D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\compile-app-config.xml,
>
> -js-default-initializers=true,
>
> -source-map=true,
>
> -js-dynamic-access-unknown-members=true,
>
>
> -keep-as3-metadata+=Inject,Dispatcher,EventHandler,Event,PostConstruct,PreDestroy,ViewAdded,ViewRemoved,Bindable,Transient,
>
> -keep-code-with-metadata=Inject,
>
> -show-binding-warnings=false,
>
> -export-public-symbols=false,
>
> -prevent-rename-protected-symbols=false,
>
> -prevent-rename-internal-symbols=false,
>
>
> -js-output=D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\javascript,
>
> -compiler.targets=JSRoyale,
>
>
> D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\src\main\royale\App.mxml
>
>
>
>
>
> The release execution does not change, the error is the same as before
> (SDK compilation from the develop branch):
>
>
>
> Se produjo una excepción: ReferenceError: Error #1065: Variable
> com.iest.winplusweb.models.MasterConfigSystemModel is not defined.
>
> at yR (http://localhost:8080/WPWebRelease/App.js:3605:1771)
>
> at Mya (http://localhost:8080/WPWebRelease/App.js:3343:365)
>
> at AR.J.usa (http://localhost:8080/WPWebRelease/App.js:434:441)
>
> at GFa.J.fromTypeDefinition (
> http://localhost:8080/WPWebRelease/App.js:5706:139)
>
> at Function.YT.getTypeDescriptor (
> http://localhost:8080/WPWebRelease/App.js:4570:820)
>
> at Function.fX.constructBean (
> http://localhost:8080/WPWebRelease/App.js:2336:472)
>
> at r$.J.initialize (http://localhost:8080/WPWebRelease/App.js:5041:66)
>
> at OW.J.init (http://localhost:8080/WPWebRelease/App.js:950:452)
>
> at OW.J.u (http://localhost:8080/WPWebRelease/App.js:951:454)
>
> at $$.J.addBead (http://localhost:8080/WPWebRelease/App.js:357:549)
>
>
>
> The main difference:
>
> project compiled from "SDK-develop" runs fine in js-debug and gives error
> in js-release and, compiled from "SDK-ROYALE_INTERFACE_INFO" does not
> launch because of conversion error.
>
>
>
> Hiedra
>
>
>
> *De:* Roman Isitua <ro...@gmail.com>
> *Enviado el:* martes, 28 de diciembre de 2021 15:55
> *Para:* users@royale.apache.org
> *Asunto:* Re: Load time is very slow
>
>
>
> @Harb
>
>
>
> I have checked out the feature/ROYALE_INTERFACE_INFO branch and compiled
> asjs and compiler. I have rebuilt my application with modules in release
> mode.
>
>
>
> I get the following error when I attempt to launch a module
>
>
>
>
>
> <image001.png>
>
>
>
>
>
> The module loads fine in debug mode
>
>
>
> <image002.png>
>
>
>
>
>
> Snippets of the log
>
>
>
> Overview.js:786 Uncaught TypeError: cm.valuesImpl.init is not a function
> at Rr.Mr.yl (Overview.js:786)
> at Function.iq.generateMXMLProperties (Overview.js:736)
> at Rr.hq.generateMXMLAttributes (Overview.js:546)
> at new Rr (Overview.js:804)
> at LN.J.loadHandler (FrontEnd.js:1967)
> Mr.yl @ Overview.js:786
> iq.generateMXMLProperties @ Overview.js:736
> hq.generateMXMLAttributes @ Overview.js:546
> Rr @ Overview.js:804
> J.loadHandler @ FrontEnd.js:1967
> load (async)
> LN.loadModule @ FrontEnd.js:1965
> dN.loadModule @ FrontEnd.js:2406
> LD.Un @ FrontEnd.js:1809
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:248
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
>
>
>
>
>
> I have attached the full log to this email.
>
>
>
>
>
>
>
>
>
> On Tue, Dec 28, 2021 at 2:51 PM Roman Isitua <ro...@gmail.com>
> wrote:
>
> Hi Maria,
>
>
>
> Prior to starting this mail discussion "Load time is very slow". I can
> confirm I have only been compiling in debug mode. My target\javascript\bin\
> only had js-debug. It was after I upgraded my royale sdk from 0.9.7 to
> 0.9.8 that I compiled in release mode.
>
>
>
>
>
>
>
> On Tue, Dec 28, 2021 at 2:24 PM Maria Jose Esteve <mj...@iest.com>
> wrote:
>
> Hi, @Roman, I think you are doing a double compile can it be? My times are
> the same as yours and I always compile in debug and release.
>
>
>
> Look at your target folder " target\javascript\bin\" and if you have two
> folders: js-debug and js-release you are compiling always double.
>
>
>
> In my case, the architecture of my project as well as the Maven
> compilation files (pom.xml) were provided by an external company (we didn't
> know anything about Maven or Royale at that time) and I understand that
> this formula was chosen to show us the options we had.
>
>
>
> A priori and without doing any test as Harb has done, I think that
> modularity gives us the advantage of compiling parts of the code once and
> not compiling them again if they are not modified. So far WITH MY
> COMPILATION TIMES, sometimes more than 1 minute, this is fundamental. But
> of course, now we have the problem of minification of the modules and it is
> really a serious problem because it is impossible for us to deploy in
> production.
>
>
>
> I will try to separate the compiación realese with a profile and if I
> succeed I will pass it to you @Roman.
>
>
>
> @Harb what do you mean by compiling the ROYALE_INTERFACE_INFO branch?
>
>
>
> Hiedra
>
>
>
> *De:* Harbs <ha...@gmail.com>
> *Enviado el:* lunes, 27 de diciembre de 2021 18:32
> *Para:* users@royale.apache.org
> *Asunto:* Re: Load time is very slow
>
>
>
> That doesn’t sound right.
>
>
>
> Are you sure you’re compiling debug and not release? That sounds like
> release build times.
>
>
>
> On Dec 27, 2021, at 3:31 PM, Roman Isitua <ro...@gmail.com> wrote:
>
>
>
> Wow ! You are using a workstation with a bleeding edge processor.
>
>
>
> I just compiled my app now. It took 44 seconds. (First compilation after
> ide start up.) Subsequently compilations are usually 19s to 20s.
>
>
>
> My application code base is very very small compared to yours. As we
> continue to add functionality, I expect the compile times to rise.
>
>
>
>
>
>
>
>
>
> <MainApp_pom.xml><Overview_pom.xml><fm_client2_pom.xml>
>
>
>
>
Re: Compiling Modules (was Re: Load time is very slow)
Posted by Alex Harui <ah...@adobe.com>.
The ReleaseModules branch in royale-asjs has the updated compile-app-config.xml that reflect the options passed to the main app and module.
HTH,
-Alex
From: Roman Isitua <ro...@gmail.com>
Reply-To: "users@royale.apache.org" <us...@royale.apache.org>
Date: Wednesday, January 12, 2022 at 3:34 AM
To: "users@royale.apache.org" <us...@royale.apache.org>
Subject: Re: Compiling Modules (was Re: Load time is very slow)
Thanks for the update.
I will pull the release modules branch source, build and test again.
One question what compilation options should be used for this test ? Load externs, externs, link report ?
Which options should be applied for the main and which option should be used for the module ?
From your mail below I can see that a new option have been added so I need clarity on this before I proceed with this test.
On Wed, 12 Jan 2022, 09:04 Alex Harui, <ah...@adobe.com>> wrote:
I pushed a ReleaseModules branch in royale-compiler and royale-asjs.
These changes cause the royale-asjs/examples/royale/ModuleExample release version to work.
The big challenge is that it turned out there is a fair amount of infrastructure that is not exported/public. The Language utilities, ROYALE_CLASS_INFO, the superclass_ property, cssData and others are going to get renamed. And thus renamed differently in the main app vs the module.
That’s why the current compiler’s strategy was to try to copy the renaming map from the main app to the module, but it didn’t always work. There seems to be a bug in the Closure Compiler that a set of externs causes the compiler to mis-handle package-paths. Also, it meant that the module contained its own copy of most of the infrastructure
The new compiler strategy is a bit more like the old Flex module strategy. The module tries to not contain a copy of code that already exists in the main app. Some of the goog/base.js stuff still gets copied though. Then because we avoid renaming more things, the module can reference the shared infrastructure in the main app.
The new compiler detects if what is being compiled is a loader of modules (because it is generating an externs-report) or is a Module and prevents renaming of Language APIs, modified base.js to not rename the superClass_ property used for calling super() and a few other things. In addition, I added a -prevent-rename-object-keys compiler option that works as a post-processor. It scans the js files being copied into bin/js-debug and adds quotes around things.
By making these changes, I was able to get the closure compiler to mis-handle the packages in a more predictable way, so another thing the new compiler does is post-process the output file to remove the incorrect package code. The incorrect code would re-init package paths like “org” or “org.apache.royale”.
Anyway, give it a try and see if it works. Probably we’ll find out there is more infrastructure that needs to not be renamed, but I think this has a better chance of working as we aren’t blocked by the compiler outputting bad code. Many months ago I tried to understand how why the Closure Compiler output bad code, but ran out of time.
Another difference is that the new compiler strategy doesn’t use custom overrides of Closure Compiler passes which was fragile and will make it easier to upgrade to newer versions of Closure Compiler.
HTH,
-Alex
From: Alex Harui <ah...@adobe.com>>
Reply-To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Date: Wednesday, January 5, 2022 at 9:53 AM
To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Subject: Re: Compiling Modules (was Re: Load time is very slow)
I probably won’t have time to really dig into this until the weekend. It is looking like the Closure Compiler gets confused when presented with externs for the same package tree that the module is generating new classes for.
-Alex
From: Roman Isitua <ro...@gmail.com>>
Reply-To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Date: Tuesday, January 4, 2022 at 1:57 PM
To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Subject: Re: Compiling Modules (was Re: Load time is very slow)
Okay. I knew I was missing something.
I will test again when the update for load-externs is available.
On Tue, Jan 4, 2022 at 6:02 PM Alex Harui <ah...@adobe.com>> wrote:
Essentially, -externs-report is for the Closure (JS) Compiler. -link-report and -load-externs (one leading ‘-‘) is for the Royale Compiler to tell the Royale Compiler what classes to feed to the Closure Compiler. Both contain the same data (the set of classes used in the main app), just formatted differently and used differently.
The –externs option for the Closure Compiler then tells the Closure Compiler not to look for classes in the set of files it is supposed to minify.
So, you have the right settings for the main app, but for the module, it should be:
-js-compiler-option=--externs extrep.txt; -load-externs linkrep.txt;
However, even that won’t work today, as the Royale Compiler is not handling -load-externs on the JS prep for Closure Compiler. I have some local changes to the compiler that mixes most of it, but am facing issues with how Closure handles package paths. If that can be resolved, then we have a good chance of things working.
-Alex
From: Roman Isitua <ro...@gmail.com>>
Reply-To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Date: Tuesday, January 4, 2022 at 12:39 AM
To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Subject: Re: Compiling Modules (was Re: Load time is very slow)
Thanks for the update.
I attempted the following:
1. In the main application, I use the following setting:
-externs-report=extrep.txt; -link-report=linkrep.txt;
2. In the module I use the following
-js-compiler-option=--externs extrep.txt; -js-compiler-option+=--load-externs linkrep.txt;
The main application compiles successfully, I get a compilation error with the module
"--load-externs" is not a valid option
Sample usage: --compilation_level (-O) VAL --externs VAL --js VAL --js_output_file VAL --warning_level (-W) [QUIET | DEFAULT
| VERBOSE]
Run with --help for all options and details
Internal error: java.lang.NullPointerException com.google.javascript.jscomp.CommandLineRunner.createOptions(CommandLineRunner.java:1809)org.apache.royale.compiler.utils.JSClosureCompilerWrapper$CompilerOptionsParser.getOptions(JSClosureCompilerWrapper.java:529)org.apache.royale.compiler.utils.JSClosureCompilerWrapper.<init>(JSClosureCompilerWrapper.java:77)org.apache.royale.compiler.internal.codegen.mxml.royale.MXMLRoyalePublisher.publish(MXMLRoyalePublisher.java:395)org.apache.royale.compiler.clients.M
I don't think I am using this option correctly.
.....
On Tue, Jan 4, 2022 at 8:44 AM Alex Harui <ah...@adobe.com>> wrote:
I found some time to investigate. The -externs-report option is mostly working correctly, but other compiler changes are needed to try to avoid duplicate code in the module. I might have time to investigate more this coming weekend. It does appear that if we can correctly reference the app’s class from the module that it will work. The Closure Compiler let me compile the module after I externalize and avoid requires on everything in the main app’s externs report and -js link report, but the references in the module have collapsed packages which is either incorrect or aliases need to be created.
However I think this new approach has a better chance of working than trying to match renaming tables.
-Alex
From: Alex Harui <ah...@adobe.com>>
Reply-To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Date: Monday, January 3, 2022 at 2:30 PM
To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Subject: Re: Compiling Modules (was Re: Load time is very slow)
The -externs-report option should be similar to the -link-report option. It takes a filename. The compiler should output the classes used in the JS compile into that file. To use externs, I think you don’t need to prevent renaming in the application as long as public variables are exported. I think you specify -externs-report when compiling the application.
You may also need to output a -link-report from the application as well.
I think you then specify the externs-report file as an -externs for the -js-compiler-options when compiling the module. And maybe also specify the -link-report output as a -load-externs in the same way it was used when compiling Flex modules. The goal for the module is, like Flex, to not have any classes in the module that exist in the main app. Then it doesn’t matter about class renaming within the release-mode JS file.
HTH,
-Alex
From: Roman Isitua <ro...@gmail.com>>
Reply-To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Date: Monday, January 3, 2022 at 12:37 PM
To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Subject: Re: Compiling Modules (was Re: Load time is very slow)
I can confirm that classes are being renamed in both files.
I have attempted your suggestion i.e. removing variable maps and property maps then use
-externs-report;-export-public-symbols=true;-prevent-rename-public-symbols=true;
I get the below error
command line Error: configuration variable 'externs-report' expected 1 argument(s), got 0.
I cannot find any documentation on how to use the -externs-report argument. What does it do ? and what are the acceptable values ?
Regards,
On Sun, Jan 2, 2022 at 9:06 AM Alex Harui <ah...@adobe.com>> wrote:
Hi Roman,
It might be more complicated. The settings are probably doing something since you reported that the error occurred in the app vs the module depending on the settings.
I went back and looked at the original module example in examples/royale/ModuleExample and was surprised there weren’t more compiler settings. I thought we’d found a way to externalize the main app’s code for the module. Because if both the app and module have a copy of SimpleCSSValuesImpl or any other class that both JS files use, there could be issues as to which one gets loaded (maybe both) and what export aliases are pointing to. Sounds like changing settings affected whether the aliases pointed at module code vs app code.
I thought we were using similar settings to what we used for SWF where the module would not contain a copy of SimpleCSSValuesImpl so it would use the one loaded by the main app, but I didn’t see those settings. We might need to make that work because otherwise I think static initializations won’t do the right thing. Or maybe we’ve figured out that it is simpler just to write defensive code that doesn’t get broken. But also, if the module has its own copy of code already loaded by the main app, that’s sort of a waste of bytes. Maybe there was a minification issue with not having the module link in classes already linked into the main app. I see an -externs-report option in the compiler but the example doesn’t seem to use it.
You should be able to scan the JS files and see if a class is in both module and app and if it is getting renamed.
I don’t know if I will have time to investigate further. The currently recommended options for modules involving variable maps and property maps may need to be abandoned in favor of externs and preventing renames.
-Alex
From: Roman Isitua <ro...@gmail.com>>
Reply-To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Date: Saturday, January 1, 2022 at 3:02 AM
To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Subject: Re: Compiling Modules (was Re: Load time is very slow)
Alex, thank you for your detailed analysis of the error log.
I agree with you that the best strategy is to prevent renaming of public/exports used by the module. I have tried different options to prevent renaming
It appears none of them stops this. From my observation, it appears that this default options below
-export-public-symbols=true;-prevent-rename-public-symbols=true;-prevent-rename-public-instance-accessors=true;
Only seem to affect the main application (main module) but have no effect on the other modules even though I ensured they were applied in their respective module pom. I came to this conclusion when I decided to turn set -prevent-rename-public-symbols=false
I noticed that I got the same error but this time around in the main module.
Uncaught TypeError: this.rb[(intermediate value).Kd(...)] is not a function
at HN.iI.send (FrontEnd.js:970)
at nI.EH.Ea (FrontEnd.js:880)
at ON.q6 (FrontEnd.js:1815)
at TN.L2 (FrontEnd.js:2034)
at hF.Xf (FrontEnd.js:2063)
at lF.kb (FrontEnd.js:1233)
at lF.Vf (FrontEnd.js:1224)
at cF.O (FrontEnd.js:659)
at cF.M.w (FrontEnd.js:661)
at gQ.mA.M (FrontEnd.js:241)
FrontEnd.js maps to FrontEnd.as in my application and is the entry point of the application. This confirms that -prevent-rename-public-symbols=false has
an effect on the main module but no effect on other modules even though they were applied in the respective module pom's.
Maybe there are other options I am overlooking.
On Sat, Jan 1, 2022 at 9:31 AM Alex Harui <ah...@adobe.com>> wrote:
In case it helps, the minification (variable renaming) mechanism is essentially guaranteed to cause problems in modules. The Closure Compiler basically takes variables, sees if it is worth renaming it, then gives it the name ‘a’, then ‘b’, and so-on, (it skips a few letters, IIRC), then moves on to ‘aa’, and ‘ab’, etc. The odds that the compiler will encounter the same variables in the same order when compiling an app and one or more modules is close to zero.
I did some work to try to dump the mapping of the renamed variables in the main app and use that when compiling the modules. It was working for a while, then some code was added to the framework that started fooling the Closure Compiler. I spent some time trying to fix the Closure Compiler, but ran out of time. Meanwhile, Josh was adding more control over renaming so I moved on to other things.
IMO, the best strategy to take would be to try to control what gets renamed. All public/exports from the app that are used by the module should not be renamed. That will definitely make the app and modules bigger, but unless the Closure Compiler folks become interested in runtime-loaded modules, it is challenging for the Royale compiler to allow aggressive renaming.
I think what is going on with the exceptions below is that exporting doesn’t really prevent renaming. It only sets up an externally-visible alias to a renamed variable. Especially for static members. So it isn’t sufficient to export public variables, the code within the module must not let the Closure Compiler think that the intra-module references can be renamed, in this case, from SimpleCSSValuesImpl to QI
I don’t know the renaming options we’ve added to the Royale Compiler, so I don’t know if there is an option to control that. I think there is a way to convince the Closure Compiler to not rename SimpleCSSValuesImpl because I’ve seen other class names not get renamed.
HTH,
-Alex
From: Roman Isitua <ro...@gmail.com>>
Reply-To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Date: Friday, December 31, 2021 at 10:42 AM
To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Subject: Re: Compiling Modules (was Re: Load time is very slow)
I have tested on both. The error log is the same.
I don't understand your second question. Kindly clarify ?
I followed strictly the approach used for loading modules here in this example.
This is the only method I know for loading modules. If there is another method please share.
https://royale.apache.org/dividing-an-apache-royale-application-with-modules/<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Froyale.apache.org%2Fdividing-an-apache-royale-application-with-modules%2F&data=04%7C01%7Caharui%40adobe.com%7C7257e725e84041d9316608d9d5bf8ddf%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637775840991832997%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=0gKZSkUNBpKKrAQlOeavs0GteymqvydE%2BGWxVv79Ej0%3D&reserved=0>
On Fri, 31 Dec 2021, 19:14 Maria Jose Esteve, <mj...@iest.com>> wrote:
@Roman, which branch did you compile the SDK from, ROYALE_INTERFACE_INFO or develop?
Could you pass the Overview.mxml view to the main application? (to rule it out)
Hiedra
De: Roman Isitua <ro...@gmail.com>>
Enviado el: viernes, 31 de diciembre de 2021 17:56
Para: users@royale.apache.org<ma...@royale.apache.org>
Asunto: Re: Compiling Modules (was Re: Load time is very slow)
I have tried tracing where the errors are happening whenever I test the release version
Uncaught TypeError: Ql.valuesImpl.init is not a function
at Hr.Cr.um (Overview.js:846)
at Function.ep.generateMXMLProperties (Overview.js:795)
at Hr.Sp.generateMXMLAttributes (Overview.js:599)
at new Hr (Overview.js:864)
at PN.M.loadHandler (FrontEnd.js:2042)
9Overview.js:173 Uncaught TypeError: this.createElement is not a function
at $B.V (Overview.js:173)
at new $B (FrontEnd.js:2430)
at EP.convert (FrontEnd.js:2430)
at Zy (FrontEnd.js:261)
at HTMLAnchorElement.Uy (FrontEnd.js:121)
at HTMLAnchorElement.Sy.b (FrontEnd.js:117)
The highlighted code in red is declared as follows in the Overview.mxml (maven module)
<j:valuesImpl>
<js:SimpleCSSValuesImpl/>
</j:valuesImpl>
The j:valuesImpl points to the following code in jewel Module.js
/**
* @nocollapse
* @export
* @type {org.apache.royale.core.IValuesImpl}
*/
org.apache.royale.jewel.Module.prototype.valuesImpl;
org.apache.royale.jewel.Module.prototype.set__valuesImpl = function(value) {
org.apache.royale.core.ValuesManager.valuesImpl.init(this);
};
it appears this function is improperly renamed and whenever the app tries to load the module is not able to recognise it as a function.
The same issue of improper function renaming is happening in the second error as well
9Overview.js:173 Uncaught TypeError: this.createElement is not a function
On Thu, Dec 30, 2021 at 10:42 PM Roman Isitua <ro...@gmail.com>> wrote:
I have applied the js compiler option as follows
<additionalCompilerOptions>-source-map=false;-compiler.show-binding-warnings=false;-js-default-initializers=true;-js-dynamic-access-unknown-members=true;
-js-compiler-option=--variable_map_output_file gccvars.txt;-js-compiler-option+=--property_map_output_file gccprops.txt
</additionalCompilerOptions>
I get the same error as before when attempting to launch the jewel module.
Error! Filename not specified.
Same error trace.
Uncaught TypeError: cm.valuesImpl.init is not a function
at Rr.Mr.yl (Overview.js:786)
at Function.iq.generateMXMLProperties (Overview.js:736)
at Rr.hq.generateMXMLAttributes (Overview.js:546)
at new Rr (Overview.js:804)
at LN.J.loadHandler (FrontEnd.js:1967)
FrontEnd.js:1640 Uncaught TypeError: M is not a function
at oM.J.handleMouseOut (FrontEnd.js:1640)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:248)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
FrontEnd.js:1640 Uncaught TypeError: M is not a function
at oM.J.handleMouseOver (FrontEnd.js:1640)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:248)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
FrontEnd.js:1640 Uncaught TypeError: M is not a function
at oM.J.handleMouseOut (FrontEnd.js:1640)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:248)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
FrontEnd.js:1640 Uncaught TypeError: M is not a function
at oM.J.handleMouseOver (FrontEnd.js:1640)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:248)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
FrontEnd.js:1640 Uncaught TypeError: M is not a function
at oM.J.handleMouseOut (FrontEnd.js:1640)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:248)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
FrontEnd.js:1640 Uncaught TypeError: M is not a function
at oM.J.handleMouseOver (FrontEnd.js:1640)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:248)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
FrontEnd.js:1640 Uncaught TypeError: M is not a function
at oM.J.handleMouseOut (FrontEnd.js:1640)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:248)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
3Overview.js:56 Uncaught TypeError: Cannot read properties of undefined (reading 'prototype')
at P (Overview.js:56)
at SG.convert (FrontEnd.js:904)
at ny (FrontEnd.js:248)
at HTMLElement.iy (FrontEnd.js:125)
at HTMLElement.b (FrontEnd.js:121)
On Thu, Dec 30, 2021 at 6:56 PM Harbs <ha...@gmail.com>> wrote:
1. I’d get rid of the agressive minification options. It will likely cause issues. If you get it to work without those options, you can try to add them back in and see if it still works.
2. You seem to be missing the compiler options explained here: https://apache.github.io/royale-docs/features/modules#minification<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapache.github.io%2Froyale-docs%2Ffeatures%2Fmodules%23minification&data=04%7C01%7Caharui%40adobe.com%7C7257e725e84041d9316608d9d5bf8ddf%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637775840991832997%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=79ZeCI4lvg5ymS2lKny1C1H7tAotWo%2BFC19zWM4poAY%3D&reserved=0>
For a pom, it would look something like this (adjust your paths to match your setup):
Main app:
<additionalCompilerOptions>-source-map=true;-js-compiler-option=--variable_map_output_file gccvars.txt;-js-compiler-option+=--property_map_output_file gccprops.txt</additionalCompilerOptions>
Module:
<additionalCompilerOptions>-source-map=true;-js-compiler-option=--variable_map_input_file ../../../../../MainApp/bin/js-release/gccvars.txt;-js-compiler-option+=--property_map_input_file ../../../../../MainApp/bin/js-release/gccprops.txt</additionalCompilerOptions>
On Dec 30, 2021, at 7:43 PM, Roman Isitua <ro...@gmail.com>> wrote:
I think it will be better for me to share my pom's that way you can see all the compilation options used. The pom for the parent (FmClient2), the MainApp and one module (Overview) have been attached to this email.
On Thu, Dec 30, 2021 at 6:22 PM Harbs <ha...@gmail.com>> wrote:
Roman, can you share your full compiler options?
I decided to remove the below settings completely
-export-public-symbols=false
-prevent-rename-protected-symbols=false
-prevent-rename-public-symbols=false
-prevent-rename-internal-symbols=false
I enabled the below settings
-js-dynamic-access-unknown-members=true;
-js-default-initializers=true
The release version starts up
Hiedra, that’s great!
On Dec 30, 2021, at 7:15 PM, Roman Isitua <ro...@gmail.com>> wrote:
Yes. I am testing with the sdk compiled on branch ROYALE_INTERFACE_INFO
On Thu, Dec 30, 2021 at 6:10 PM Maria Jose Esteve <mj...@iest.com>> wrote:
Roman, are you testing with the SDK compiled from the Harb branches, ROYALE_INTERFACE_INFO, or from develop?
Hiedra
De: Roman Isitua <ro...@gmail.com>>
Enviado el: jueves, 30 de diciembre de 2021 16:52
Para: users@royale.apache.org<ma...@royale.apache.org>
Asunto: Re: Compiling Modules (was Re: Load time is very slow)
I decided to remove the below settings completely
-export-public-symbols=false
-prevent-rename-protected-symbols=false
-prevent-rename-public-symbols=false
-prevent-rename-internal-symbols=false
I enabled the below settings
-js-dynamic-access-unknown-members=true;
-js-default-initializers=true
The release version starts up
<image001.png>
<image002.png>
However, the moment I launch a module. I get the below error
<image003.png>
It appears to be failing when I launch the "Overview" module (by clicking the Overview side menu).
So my current observation is that by retaining only two settings
-js-dynamic-access-unknown-members=true;
-js-default-initializers=true
The release module starts up but the app fails whenever I launch a module.
The smallest size settings in the documentation do not work. The app does not start up.
-export-public-symbols=false
-prevent-rename-protected-symbols=false
-prevent-rename-public-symbols=false
-prevent-rename-internal-symbols=false
The error trace is below
Uncaught TypeError: cm.valuesImpl.init is not a function
at Wr.Rr.pl<https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwr.rr.pl%2F&data=04%7C01%7Caharui%40adobe.com%7C7257e725e84041d9316608d9d5bf8ddf%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637775840991832997%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=d93y5OySrCkC22NaXRiIa5miQW5FpS5F%2B8OkgAZhKl0%3D&reserved=0> (Overview.js:792)
at Function.mq.generateMXMLProperties (Overview.js:743)
at Wr.lq.generateMXMLAttributes (Overview.js:551)
at new Wr (Overview.js:810)
at QN.J.loadHandler (FrontEnd.js:1978)
3Overview.js:56 Uncaught TypeError: Cannot read properties of undefined (reading 'prototype')
at P (Overview.js:56)
at VG.convert (FrontEnd.js:910)
at ny (FrontEnd.js:250)
at HTMLElement.iy (FrontEnd.js:125)
at HTMLElement.b (FrontEnd.js:121)
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOut (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOver (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOver @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOut (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOut @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOver (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOver @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOut (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOut @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOver (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOver @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOut (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOut @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOver (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOver @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOut (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOut @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
On Thu, Dec 30, 2021 at 4:32 PM Roman Isitua <ro...@gmail.com>> wrote:
I get the same error even when I set the -js-dynamic-access-unknown-members=true;
On Thu, Dec 30, 2021 at 4:24 PM Roman Isitua <ro...@gmail.com>> wrote:
Using the below settings,
-export-public-symbols=false
-prevent-rename-protected-symbols=false
-prevent-rename-public-symbols=false
-prevent-rename-internal-symbols=false
-js-dynamic-access-unknown-members=false;
-js-default-initializers=true
Debug version runs fine. The release version does not start up
<image004.png>
I get the below errors
Uncaught TypeError: Cannot read properties of undefined (reading 'apply')
at KE.hm (FrontEnd.js:1600)
at XE.M.Fb (FrontEnd.js:943)
at XE.M.uh (FrontEnd.js:937)
at FE.M.na<https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Ffe.m.na%2F&data=04%7C01%7Caharui%40adobe.com%7C7257e725e84041d9316608d9d5bf8ddf%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637775840991832997%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=n2CnWtbBZ2XGB0upwvczdWXu3kHQD%2FNCTQKEHbWzx8I%3D&reserved=0> (FrontEnd.js:497)
at FE.M.v (FrontEnd.js:497)
at dR.M.S (FrontEnd.js:213)
at dR.Nz.S (FrontEnd.js:217)
at dR.M.start (FrontEnd.js:1396)
at index.html:45
:8080/favicon.ico:1 Failed to load resource: the server responded with a status of 404 (Not Found)
FrontEnd.js is the start up class for the application. i.e. It implements the Jewel application class.
On Thu, Dec 30, 2021 at 3:19 PM Roman Isitua <ro...@gmail.com>> wrote:
Hi Harb,
Thanks for your response. I have gone through the documentation. I will do my test again starting with the smallest size option and share my findings.
Regards,
On Thu, Dec 30, 2021 at 10:59 AM Harbs <ha...@gmail.com>> wrote:
Sorry for my deal in responding.
Let’s take a step back.
I’m not sure how you are compiling your modules. I just added some content to the module documentation page which explains what compiler options you need while compiling modules. (It still needs some editing.) https://apache.github.io/royale-docs/features/modules#minification<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapache.github.io%2Froyale-docs%2Ffeatures%2Fmodules%23minification&data=04%7C01%7Caharui%40adobe.com%7C7257e725e84041d9316608d9d5bf8ddf%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637775840991832997%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=79ZeCI4lvg5ymS2lKny1C1H7tAotWo%2BFC19zWM4poAY%3D&reserved=0>
Are you using those options?
On Dec 29, 2021, at 2:19 AM, Maria Jose Esteve <mj...@iest.com>> wrote:
Hi, Let me join you with these tests....
@Harb, I have compiled the SDK from this branch, feature/ROYALE_INTERFACE_INFO, and when running in debug I get this error:
Message on the PURGE CONSOLE is displayed:
Cannot convert org.apache.royale.reflection.beads.ClassAliasBead to IBead
Message in the IDE Window:
Se produjo una excepción: TypeError: Cannot convert [object Object] to IBead
at App.org.apache.royale.core.ElementWrapper.addBead (http://localhost:8080/WNetSuitePlus/org/apache/royale/core/ElementWrapper.js:114:11)
at App.org.apache.royale.core.HTMLElementWrapper.addBead (http://localhost:8080/WNetSuitePlus/org/apache/royale/core/HTMLElementWrapper.js:43:65)
at App.org.apache.royale.jewel.Application.start (http://localhost:8080/WNetSuitePlus/org/apache/royale/jewel/Application.js:246:10)
at App.App_loadXML (http://localhost:8080/WNetSuitePlus/App.js:1681:25)
at org.apache.royale.net.URLLoader.org.apache.royale.events.EventDispatcher.fireListeners (http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:97:23)
at Function.goog.events.EventTarget.dispatchEventInternal_ (http://localhost:8080/WNetSuitePlus/library/closure/goog/events/eventtarget.js:381:26)
at org.apache.royale.net.URLLoader.org.apache.royale.events.EventDispatcher.dispatchEvent (http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:72:37)
at org.apache.royale.net.URLLoader.jsEventHandler (http://localhost:8080/WNetSuitePlus/org/apache/royale/net/URLLoader.js:169:12)
Call stack:
<image003.png>
[INFO] Executing MXMLC in tool group Royale with args: [
-load-config=D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\compile-app-config.xml,
-js-default-initializers=true,
-source-map=true,
-js-dynamic-access-unknown-members=true,
-keep-as3-metadata+=Inject,Dispatcher,EventHandler,Event,PostConstruct,PreDestroy,ViewAdded,ViewRemoved,Bindable,Transient,
-keep-code-with-metadata=Inject,
-show-binding-warnings=false,
-export-public-symbols=false,
-prevent-rename-protected-symbols=false,
-prevent-rename-internal-symbols=false,
-js-output=D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\javascript,
-compiler.targets=JSRoyale,
D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\src\main\royale\App.mxml
The release execution does not change, the error is the same as before (SDK compilation from the develop branch):
Se produjo una excepción: ReferenceError: Error #1065: Variable com.iest.winplusweb.models.MasterConfigSystemModel is not defined.
at yR (http://localhost:8080/WPWebRelease/App.js:3605:1771)
at Mya (http://localhost:8080/WPWebRelease/App.js:3343:365)
at AR.J.usa (http://localhost:8080/WPWebRelease/App.js:434:441)
at GFa.J.fromTypeDefinition (http://localhost:8080/WPWebRelease/App.js:5706:139)
at Function.YT.getTypeDescriptor (http://localhost:8080/WPWebRelease/App.js:4570:820)
at Function.fX.constructBean (http://localhost:8080/WPWebRelease/App.js:2336:472)
at r$.J.initialize (http://localhost:8080/WPWebRelease/App.js:5041:66)
at OW.J.init (http://localhost:8080/WPWebRelease/App.js:950:452)
at OW.J.u (http://localhost:8080/WPWebRelease/App.js:951:454)
at $$.J.addBead (http://localhost:8080/WPWebRelease/App.js:357:549)
The main difference:
project compiled from "SDK-develop" runs fine in js-debug and gives error in js-release and, compiled from "SDK-ROYALE_INTERFACE_INFO" does not launch because of conversion error.
Hiedra
De: Roman Isitua <ro...@gmail.com>>
Enviado el: martes, 28 de diciembre de 2021 15:55
Para: users@royale.apache.org<ma...@royale.apache.org>
Asunto: Re: Load time is very slow
@Harb
I have checked out the feature/ROYALE_INTERFACE_INFO branch and compiled asjs and compiler. I have rebuilt my application with modules in release mode.
I get the following error when I attempt to launch a module
<image001.png>
The module loads fine in debug mode
<image002.png>
Snippets of the log
Overview.js:786 Uncaught TypeError: cm.valuesImpl.init is not a function
at Rr.Mr.yl (Overview.js:786)
at Function.iq.generateMXMLProperties (Overview.js:736)
at Rr.hq.generateMXMLAttributes (Overview.js:546)
at new Rr (Overview.js:804)
at LN.J.loadHandler (FrontEnd.js:1967)
Mr.yl @ Overview.js:786
iq.generateMXMLProperties @ Overview.js:736
hq.generateMXMLAttributes @ Overview.js:546
Rr @ Overview.js:804
J.loadHandler @ FrontEnd.js:1967
load (async)
LN.loadModule @ FrontEnd.js:1965
dN.loadModule @ FrontEnd.js:2406
LD.Un @ FrontEnd.js:1809
ny @ FrontEnd.js:123
ny @ FrontEnd.js:248
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
I have attached the full log to this email.
On Tue, Dec 28, 2021 at 2:51 PM Roman Isitua <ro...@gmail.com>> wrote:
Hi Maria,
Prior to starting this mail discussion "Load time is very slow". I can confirm I have only been compiling in debug mode. My target\javascript\bin\ only had js-debug. It was after I upgraded my royale sdk from 0.9.7 to 0.9.8 that I compiled in release mode.
On Tue, Dec 28, 2021 at 2:24 PM Maria Jose Esteve <mj...@iest.com>> wrote:
Hi, @Roman, I think you are doing a double compile can it be? My times are the same as yours and I always compile in debug and release.
Look at your target folder " target\javascript\bin\" and if you have two folders: js-debug and js-release you are compiling always double.
In my case, the architecture of my project as well as the Maven compilation files (pom.xml) were provided by an external company (we didn't know anything about Maven or Royale at that time) and I understand that this formula was chosen to show us the options we had.
A priori and without doing any test as Harb has done, I think that modularity gives us the advantage of compiling parts of the code once and not compiling them again if they are not modified. So far WITH MY COMPILATION TIMES, sometimes more than 1 minute, this is fundamental. But of course, now we have the problem of minification of the modules and it is really a serious problem because it is impossible for us to deploy in production.
I will try to separate the compiación realese with a profile and if I succeed I will pass it to you @Roman.
@Harb what do you mean by compiling the ROYALE_INTERFACE_INFO branch?
Hiedra
De: Harbs <ha...@gmail.com>>
Enviado el: lunes, 27 de diciembre de 2021 18:32
Para: users@royale.apache.org<ma...@royale.apache.org>
Asunto: Re: Load time is very slow
That doesn’t sound right.
Are you sure you’re compiling debug and not release? That sounds like release build times.
On Dec 27, 2021, at 3:31 PM, Roman Isitua <ro...@gmail.com>> wrote:
Wow ! You are using a workstation with a bleeding edge processor.
I just compiled my app now. It took 44 seconds. (First compilation after ide start up.) Subsequently compilations are usually 19s to 20s.
My application code base is very very small compared to yours. As we continue to add functionality, I expect the compile times to rise.
<MainApp_pom.xml><Overview_pom.xml><fm_client2_pom.xml>
Re: Compiling Modules (was Re: Load time is very slow)
Posted by Roman Isitua <ro...@gmail.com>.
Thanks for the update.
I will pull the release modules branch source, build and test again.
One question what compilation options should be used for this test ? Load
externs, externs, link report ?
Which options should be applied for the main and which option should be
used for the module ?
From your mail below I can see that a new option have been added so I need
clarity on this before I proceed with this test.
On Wed, 12 Jan 2022, 09:04 Alex Harui, <ah...@adobe.com> wrote:
> I pushed a ReleaseModules branch in royale-compiler and royale-asjs.
>
>
>
> These changes cause the royale-asjs/examples/royale/ModuleExample release
> version to work.
>
>
>
> The big challenge is that it turned out there is a fair amount of
> infrastructure that is not exported/public. The Language utilities,
> ROYALE_CLASS_INFO, the superclass_ property, cssData and others are going
> to get renamed. And thus renamed differently in the main app vs the module.
>
>
>
> That’s why the current compiler’s strategy was to try to copy the renaming
> map from the main app to the module, but it didn’t always work. There
> seems to be a bug in the Closure Compiler that a set of externs causes the
> compiler to mis-handle package-paths. Also, it meant that the module
> contained its own copy of most of the infrastructure
>
>
>
> The new compiler strategy is a bit more like the old Flex module
> strategy. The module tries to not contain a copy of code that already
> exists in the main app. Some of the goog/base.js stuff still gets copied
> though. Then because we avoid renaming more things, the module can
> reference the shared infrastructure in the main app.
>
>
>
> The new compiler detects if what is being compiled is a loader of modules
> (because it is generating an externs-report) or is a Module and prevents
> renaming of Language APIs, modified base.js to not rename the superClass_
> property used for calling super() and a few other things. In addition, I
> added a -prevent-rename-object-keys compiler option that works as a
> post-processor. It scans the js files being copied into bin/js-debug and
> adds quotes around things.
>
>
>
> By making these changes, I was able to get the closure compiler to
> mis-handle the packages in a more predictable way, so another thing the new
> compiler does is post-process the output file to remove the incorrect
> package code. The incorrect code would re-init package paths like “org” or
> “org.apache.royale”.
>
>
>
> Anyway, give it a try and see if it works. Probably we’ll find out there
> is more infrastructure that needs to not be renamed, but I think this has a
> better chance of working as we aren’t blocked by the compiler outputting
> bad code. Many months ago I tried to understand how why the Closure
> Compiler output bad code, but ran out of time.
>
>
>
> Another difference is that the new compiler strategy doesn’t use custom
> overrides of Closure Compiler passes which was fragile and will make it
> easier to upgrade to newer versions of Closure Compiler.
>
>
>
> HTH,
>
> -Alex
>
>
>
> *From: *Alex Harui <ah...@adobe.com>
> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Date: *Wednesday, January 5, 2022 at 9:53 AM
> *To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Subject: *Re: Compiling Modules (was Re: Load time is very slow)
>
>
>
> I probably won’t have time to really dig into this until the weekend. It
> is looking like the Closure Compiler gets confused when presented with
> externs for the same package tree that the module is generating new classes
> for.
>
>
>
> -Alex
>
>
>
> *From: *Roman Isitua <ro...@gmail.com>
> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Date: *Tuesday, January 4, 2022 at 1:57 PM
> *To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Subject: *Re: Compiling Modules (was Re: Load time is very slow)
>
>
>
> Okay. I knew I was missing something.
>
>
>
> I will test again when the update for load-externs is available.
>
>
>
> On Tue, Jan 4, 2022 at 6:02 PM Alex Harui <ah...@adobe.com> wrote:
>
> Essentially, -externs-report is for the Closure (JS) Compiler.
> -link-report and -load-externs (one leading ‘-‘) is for the Royale Compiler
> to tell the Royale Compiler what classes to feed to the Closure Compiler.
> Both contain the same data (the set of classes used in the main app), just
> formatted differently and used differently.
>
>
>
> The –externs option for the Closure Compiler then tells the Closure
> Compiler not to look for classes in the set of files it is supposed to
> minify.
>
>
>
> So, you have the right settings for the main app, but for the module, it
> should be:
>
> *-js-compiler-option=--externs extrep.txt; -load-externs linkrep.txt;*
>
>
>
> However, even that won’t work today, as the Royale Compiler is not
> handling -load-externs on the JS prep for Closure Compiler. I have some
> local changes to the compiler that mixes most of it, but am facing issues
> with how Closure handles package paths. If that can be resolved, then we
> have a good chance of things working.
>
>
>
> -Alex
>
>
>
> *From: *Roman Isitua <ro...@gmail.com>
> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Date: *Tuesday, January 4, 2022 at 12:39 AM
> *To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Subject: *Re: Compiling Modules (was Re: Load time is very slow)
>
>
>
> Thanks for the update.
>
>
>
> I attempted the following:
>
>
>
> 1. In the main application, I use the following setting:
>
> *-externs-report=extrep.txt; -link-report=linkrep.txt;*
>
>
>
> 2. In the module I use the following
>
>
>
> *-js-compiler-option=--externs extrep.txt;
> -js-compiler-option+=--load-externs linkrep.txt;*
>
>
>
> The main application compiles successfully, I get a compilation error with
> the module
>
>
>
> "--load-externs" is not a valid option
> Sample usage: --compilation_level (-O) VAL --externs VAL --js VAL
> --js_output_file VAL --warning_level (-W) [QUIET | DEFAULT
> | VERBOSE]
> Run with --help for all options and details
> Internal error: java.lang.NullPointerException
> com.google.javascript.jscomp.CommandLineRunner.createOptions(CommandLineRunner.java:1809)org.apache.royale.compiler.utils.JSClosureCompilerWrapper$CompilerOptionsParser.getOptions(JSClosureCompilerWrapper.java:529)org.apache.royale.compiler.utils.JSClosureCompilerWrapper.<init>(JSClosureCompilerWrapper.java:77)org.apache.royale.compiler.internal.codegen.mxml.royale.MXMLRoyalePublisher.publish(MXMLRoyalePublisher.java:395)org.apache.royale.compiler.clients.M
>
>
>
>
>
>
>
> I don't think I am using this option correctly.
>
>
>
>
>
>
>
> .....
>
>
>
> On Tue, Jan 4, 2022 at 8:44 AM Alex Harui <ah...@adobe.com> wrote:
>
> I found some time to investigate. The -externs-report option is mostly
> working correctly, but other compiler changes are needed to try to avoid
> duplicate code in the module. I might have time to investigate more this
> coming weekend. It does appear that if we can correctly reference the
> app’s class from the module that it will work. The Closure Compiler let me
> compile the module after I externalize and avoid requires on everything in
> the main app’s externs report and -js link report, but the references in
> the module have collapsed packages which is either incorrect or aliases
> need to be created.
>
>
>
> However I think this new approach has a better chance of working than
> trying to match renaming tables.
>
>
>
> -Alex
>
>
>
> *From: *Alex Harui <ah...@adobe.com>
> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Date: *Monday, January 3, 2022 at 2:30 PM
> *To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Subject: *Re: Compiling Modules (was Re: Load time is very slow)
>
>
>
> The -externs-report option should be similar to the -link-report option.
> It takes a filename. The compiler should output the classes used in the JS
> compile into that file. To use externs, I think you don’t need to prevent
> renaming in the application as long as public variables are exported. I
> think you specify -externs-report when compiling the application.
>
>
>
> You may also need to output a -link-report from the application as well.
>
>
>
> I think you then specify the externs-report file as an -externs for the
> -js-compiler-options when compiling the module. And maybe also specify the
> -link-report output as a -load-externs in the same way it was used when
> compiling Flex modules. The goal for the module is, like Flex, to not have
> any classes in the module that exist in the main app. Then it doesn’t
> matter about class renaming within the release-mode JS file.
>
>
>
> HTH,
>
> -Alex
>
>
>
> *From: *Roman Isitua <ro...@gmail.com>
> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Date: *Monday, January 3, 2022 at 12:37 PM
> *To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Subject: *Re: Compiling Modules (was Re: Load time is very slow)
>
>
>
>
>
> I can confirm that classes are being renamed in both files.
>
>
>
> I have attempted your suggestion i.e. removing variable maps and property
> maps then use
>
> -externs-report;-export-public-symbols=true;-prevent-rename-public-symbols=true;
>
>
>
>
> I get the below error
>
>
>
> command line Error: configuration variable 'externs-report' expected 1
> argument(s), got 0.
>
>
>
> I cannot find any documentation on how to use the -externs-report
> argument. What does it do ? and what are the acceptable values ?
>
>
>
> Regards,
>
>
>
>
>
> On Sun, Jan 2, 2022 at 9:06 AM Alex Harui <ah...@adobe.com> wrote:
>
> Hi Roman,
>
>
>
> It might be more complicated. The settings are probably doing something
> since you reported that the error occurred in the app vs the module
> depending on the settings.
>
>
>
> I went back and looked at the original module example in
> examples/royale/ModuleExample and was surprised there weren’t more compiler
> settings. I thought we’d found a way to externalize the main app’s code
> for the module. Because if both the app and module have a copy of
> SimpleCSSValuesImpl or any other class that both JS files use, there could
> be issues as to which one gets loaded (maybe both) and what export aliases
> are pointing to. Sounds like changing settings affected whether the
> aliases pointed at module code vs app code.
>
>
>
> I thought we were using similar settings to what we used for SWF where the
> module would not contain a copy of SimpleCSSValuesImpl so it would use the
> one loaded by the main app, but I didn’t see those settings. We might need
> to make that work because otherwise I think static initializations won’t do
> the right thing. Or maybe we’ve figured out that it is simpler just to
> write defensive code that doesn’t get broken. But also, if the module has
> its own copy of code already loaded by the main app, that’s sort of a waste
> of bytes. Maybe there was a minification issue with not having the module
> link in classes already linked into the main app. I see an -externs-report
> option in the compiler but the example doesn’t seem to use it.
>
>
>
> You should be able to scan the JS files and see if a class is in both
> module and app and if it is getting renamed.
>
>
>
> I don’t know if I will have time to investigate further. The currently
> recommended options for modules involving variable maps and property maps
> may need to be abandoned in favor of externs and preventing renames.
>
>
>
> -Alex
>
>
>
>
>
> *From: *Roman Isitua <ro...@gmail.com>
> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Date: *Saturday, January 1, 2022 at 3:02 AM
> *To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Subject: *Re: Compiling Modules (was Re: Load time is very slow)
>
>
>
> Alex, thank you for your detailed analysis of the error log.
>
>
>
> I agree with you that the best strategy is to prevent renaming of
> public/exports used by the module. I have tried different options to
> prevent renaming
>
> It appears none of them stops this. From my observation, it appears that
> this default options below
>
>
>
>
> -export-public-symbols=true;-prevent-rename-public-symbols=true;-prevent-rename-public-instance-accessors=true;
>
>
>
> Only seem to affect the main application (main module) but have no effect
> on the other modules even though I ensured they were applied in
> their respective module pom. I came to this conclusion when I decided to
> turn set -prevent-rename-public-symbols=false
>
>
>
> I noticed that I got the same error but this time around in the main
> module.
>
>
>
> Uncaught TypeError: this.rb[(intermediate value).Kd(...)] is not a function
> at HN.iI.send (FrontEnd.js:970)
> at nI.EH.Ea (FrontEnd.js:880)
> at ON.q6 (FrontEnd.js:1815)
> at TN.L2 (FrontEnd.js:2034)
> at hF.Xf (FrontEnd.js:2063)
> at lF.kb (FrontEnd.js:1233)
> at lF.Vf (FrontEnd.js:1224)
> at cF.O (FrontEnd.js:659)
> at cF.M.w (FrontEnd.js:661)
> at gQ.mA.M (FrontEnd.js:241)
>
>
>
> FrontEnd.js maps to FrontEnd.as in my application and is the entry point
> of the application. This confirms that -prevent-rename-public-symbols=false
> has
>
> an effect on the main module but no effect on other modules even though
> they were applied in the respective module pom's.
>
>
>
> Maybe there are other options I am overlooking.
>
>
>
> On Sat, Jan 1, 2022 at 9:31 AM Alex Harui <ah...@adobe.com> wrote:
>
> In case it helps, the minification (variable renaming) mechanism is
> essentially guaranteed to cause problems in modules. The Closure Compiler
> basically takes variables, sees if it is worth renaming it, then gives it
> the name ‘a’, then ‘b’, and so-on, (it skips a few letters, IIRC), then
> moves on to ‘aa’, and ‘ab’, etc. The odds that the compiler will encounter
> the same variables in the same order when compiling an app and one or more
> modules is close to zero.
>
>
>
> I did some work to try to dump the mapping of the renamed variables in the
> main app and use that when compiling the modules. It was working for a
> while, then some code was added to the framework that started fooling the
> Closure Compiler. I spent some time trying to fix the Closure Compiler,
> but ran out of time. Meanwhile, Josh was adding more control over renaming
> so I moved on to other things.
>
>
>
> IMO, the best strategy to take would be to try to control what gets
> renamed. All public/exports from the app that are used by the module
> should not be renamed. That will definitely make the app and modules
> bigger, but unless the Closure Compiler folks become interested in
> runtime-loaded modules, it is challenging for the Royale compiler to allow
> aggressive renaming.
>
>
>
> I think what is going on with the exceptions below is that exporting
> doesn’t really prevent renaming. It only sets up an externally-visible
> alias to a renamed variable. Especially for static members. So it isn’t
> sufficient to export public variables, the code within the module must not
> let the Closure Compiler think that the intra-module references can be
> renamed, in this case, from SimpleCSSValuesImpl to QI
>
>
>
> I don’t know the renaming options we’ve added to the Royale Compiler, so I
> don’t know if there is an option to control that. I think there is a way
> to convince the Closure Compiler to not rename SimpleCSSValuesImpl because
> I’ve seen other class names not get renamed.
>
>
>
> HTH,
>
> -Alex
>
>
>
> *From: *Roman Isitua <ro...@gmail.com>
> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Date: *Friday, December 31, 2021 at 10:42 AM
> *To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Subject: *Re: Compiling Modules (was Re: Load time is very slow)
>
>
>
> I have tested on both. The error log is the same.
>
>
>
> I don't understand your second question. Kindly clarify ?
>
>
>
>
>
> I followed strictly the approach used for loading modules here in this
> example.
>
> This is the only method I know for loading modules. If there is another
> method please share.
>
>
>
>
>
>
> https://royale.apache.org/dividing-an-apache-royale-application-with-modules/
> <https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Froyale.apache.org%2Fdividing-an-apache-royale-application-with-modules%2F&data=04%7C01%7Caharui%40adobe.com%7Ce0c38cc4559641ff0f2108d9d074405d%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637770019992898481%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=c65JOYsEODcatlGZtwlpe7DOQanC%2BdL3zyGSPWgBYS4%3D&reserved=0>
>
>
>
> On Fri, 31 Dec 2021, 19:14 Maria Jose Esteve, <mj...@iest.com> wrote:
>
> @Roman, which branch did you compile the SDK from, ROYALE_INTERFACE_INFO
> or develop?
>
> Could you pass the Overview.mxml view to the main application? (to rule
> it out)
>
>
>
> Hiedra
>
>
>
> *De:* Roman Isitua <ro...@gmail.com>
> *Enviado el:* viernes, 31 de diciembre de 2021 17:56
> *Para:* users@royale.apache.org
> *Asunto:* Re: Compiling Modules (was Re: Load time is very slow)
>
>
>
> I have tried tracing where the errors are happening whenever I test the
> release version
>
> Uncaught TypeError: Ql.valuesImpl.init is not a function
> at Hr.Cr.um (Overview.js:846)
> at Function.ep.generateMXMLProperties (Overview.js:795)
> at Hr.Sp.generateMXMLAttributes (Overview.js:599)
> at new Hr (Overview.js:864)
> at PN.M.loadHandler (FrontEnd.js:2042)
> 9Overview.js:173 Uncaught TypeError: this.createElement is not a function
> at $B.V (Overview.js:173)
> at new $B (FrontEnd.js:2430)
> at EP.convert (FrontEnd.js:2430)
> at Zy (FrontEnd.js:261)
> at HTMLAnchorElement.Uy (FrontEnd.js:121)
> at HTMLAnchorElement.Sy.b (FrontEnd.js:117)
>
>
>
>
>
> The highlighted code in red is declared as follows in the Overview.mxml
> (maven module)
>
>
>
> <j:valuesImpl>
>
> <js:SimpleCSSValuesImpl/>
>
> </j:valuesImpl>
>
>
>
> The j:valuesImpl points to the following code in jewel Module.js
>
>
>
> /**
> * @nocollapse
> * @export
> * @type {org.apache.royale.core.IValuesImpl}
> */
> org.apache.royale.jewel.Module.prototype.valuesImpl;
>
>
> org.apache.royale.jewel.Module.prototype.set__valuesImpl = function(value)
> {
> org.apache.royale.core.ValuesManager.valuesImpl.init(this);
> };
>
>
>
>
>
> it appears this function is improperly renamed and whenever the app tries
> to load the module is not able to recognise it as a function.
>
>
>
> The same issue of improper function renaming is happening in the second
> error as well
>
>
>
> 9Overview.js:173 Uncaught TypeError: this.createElement is not a function
>
>
>
>
>
> On Thu, Dec 30, 2021 at 10:42 PM Roman Isitua <ro...@gmail.com>
> wrote:
>
>
>
> I have applied the js compiler option as follows
>
>
>
>
> <additionalCompilerOptions>-source-map=false;-compiler.show-binding-warnings=false;-js-default-initializers=true;-js-dynamic-access-unknown-members=true;
> -js-compiler-option=--variable_map_output_file
> gccvars.txt;-js-compiler-option+=--property_map_output_file gccprops.txt
> </additionalCompilerOptions>
>
>
>
>
>
> I get the same error as before when attempting to launch the jewel module.
>
>
>
> *Error! Filename not specified.*
>
>
>
>
>
> Same error trace.
>
>
>
> Uncaught TypeError: cm.valuesImpl.init is not a function
> at Rr.Mr.yl (Overview.js:786)
> at Function.iq.generateMXMLProperties (Overview.js:736)
> at Rr.hq.generateMXMLAttributes (Overview.js:546)
> at new Rr (Overview.js:804)
> at LN.J.loadHandler (FrontEnd.js:1967)
> FrontEnd.js:1640 Uncaught TypeError: M is not a function
> at oM.J.handleMouseOut (FrontEnd.js:1640)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:248)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> FrontEnd.js:1640 Uncaught TypeError: M is not a function
> at oM.J.handleMouseOver (FrontEnd.js:1640)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:248)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> FrontEnd.js:1640 Uncaught TypeError: M is not a function
> at oM.J.handleMouseOut (FrontEnd.js:1640)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:248)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> FrontEnd.js:1640 Uncaught TypeError: M is not a function
> at oM.J.handleMouseOver (FrontEnd.js:1640)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:248)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> FrontEnd.js:1640 Uncaught TypeError: M is not a function
> at oM.J.handleMouseOut (FrontEnd.js:1640)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:248)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> FrontEnd.js:1640 Uncaught TypeError: M is not a function
> at oM.J.handleMouseOver (FrontEnd.js:1640)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:248)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> FrontEnd.js:1640 Uncaught TypeError: M is not a function
> at oM.J.handleMouseOut (FrontEnd.js:1640)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:248)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> 3Overview.js:56 Uncaught TypeError: Cannot read properties of undefined
> (reading 'prototype')
> at P (Overview.js:56)
> at SG.convert (FrontEnd.js:904)
> at ny (FrontEnd.js:248)
> at HTMLElement.iy (FrontEnd.js:125)
> at HTMLElement.b (FrontEnd.js:121)
>
>
>
> On Thu, Dec 30, 2021 at 6:56 PM Harbs <ha...@gmail.com> wrote:
>
> 1. I’d get rid of the agressive minification options. It will likely cause
> issues. If you get it to work without those options, you can try to add
> them back in and see if it still works.
>
> 2. You seem to be missing the compiler options explained here:
> https://apache.github.io/royale-docs/features/modules#minification
> <https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapache.github.io%2Froyale-docs%2Ffeatures%2Fmodules%23minification&data=04%7C01%7Caharui%40adobe.com%7Ce0c38cc4559641ff0f2108d9d074405d%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637770019992898481%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=y2M3Q%2F9KMsGdV2gANubdFhMj3uB5rzUgVxJDbF6wYKI%3D&reserved=0>
>
>
>
> For a pom, it would look something like this (adjust your paths to match
> your setup):
>
>
>
> Main app:
>
> <additionalCompilerOptions>-source-map=true;-js-compiler-option=--variable_map_output_file
> gccvars.txt;-js-compiler-option+=--property_map_output_file
> gccprops.txt</additionalCompilerOptions>
>
>
>
> Module:
>
> <additionalCompilerOptions>-source-map=true;-js-compiler-option=--variable_map_input_file
> ../../../../../MainApp/bin/js-release/gccvars.txt;-js-compiler-option+=--property_map_input_file
> ../../../../../MainApp/bin/js-release/gccprops.txt</additionalCompilerOptions>
>
>
>
> On Dec 30, 2021, at 7:43 PM, Roman Isitua <ro...@gmail.com> wrote:
>
>
>
> I think it will be better for me to share my pom's that way you can see
> all the compilation options used. The pom for the parent (FmClient2), the
> MainApp and one module (Overview) have been attached to this email.
>
>
>
>
>
> On Thu, Dec 30, 2021 at 6:22 PM Harbs <ha...@gmail.com> wrote:
>
> Roman, can you share your full compiler options?
>
>
>
> I decided to remove the below settings completely
> -export-public-symbols=false
> -prevent-rename-protected-symbols=false
> -prevent-rename-public-symbols=false
> -prevent-rename-internal-symbols=false
>
>
> I enabled the below settings
>
> -js-dynamic-access-unknown-members=true;
> -js-default-initializers=true
>
>
> The release version starts up
>
>
>
> Hiedra, that’s great!
>
>
>
> On Dec 30, 2021, at 7:15 PM, Roman Isitua <ro...@gmail.com> wrote:
>
>
>
>
>
> Yes. I am testing with the sdk compiled on branch ROYALE_INTERFACE_INFO
>
>
>
> On Thu, Dec 30, 2021 at 6:10 PM Maria Jose Esteve <mj...@iest.com>
> wrote:
>
> Roman, are you testing with the SDK compiled from the Harb branches,
> ROYALE_INTERFACE_INFO, or from develop?
>
>
>
> Hiedra
>
>
>
> *De:* Roman Isitua <ro...@gmail.com>
> *Enviado el:* jueves, 30 de diciembre de 2021 16:52
> *Para:* users@royale.apache.org
> *Asunto:* Re: Compiling Modules (was Re: Load time is very slow)
>
>
>
> I decided to remove the below settings completely
> -export-public-symbols=false
> -prevent-rename-protected-symbols=false
> -prevent-rename-public-symbols=false
> -prevent-rename-internal-symbols=false
>
>
> I enabled the below settings
>
> -js-dynamic-access-unknown-members=true;
> -js-default-initializers=true
>
>
> The release version starts up
>
>
>
>
>
>
>
> <image001.png>
>
>
>
>
>
> <image002.png>
>
>
>
> However, the moment I launch a module. I get the below error
>
>
>
> <image003.png>
>
>
>
>
>
> It appears to be failing when I launch the "*Overview*" module
> (by clicking the Overview side menu).
>
>
>
> So my current observation is that by retaining only two settings
>
>
>
> -js-dynamic-access-unknown-members=true;
> -js-default-initializers=true
>
>
>
> The release module starts up but the app fails whenever I launch a module.
>
>
>
> The smallest size settings in the documentation do not work. The app does
> not start up.
>
>
>
> -export-public-symbols=false
> -prevent-rename-protected-symbols=false
> -prevent-rename-public-symbols=false
> -prevent-rename-internal-symbols=false
>
>
>
>
>
>
>
> The error trace is below
>
>
>
>
>
> Uncaught TypeError: cm.valuesImpl.init is not a function
> at Wr.Rr.pl
> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwr.rr.pl%2F&data=04%7C01%7Caharui%40adobe.com%7Ce0c38cc4559641ff0f2108d9d074405d%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637770019992898481%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=N4Mx5wcKqYMpOWlu5N7IbWeBmPyhbDkM0OAAnOqjZlI%3D&reserved=0>
> (Overview.js:792)
> at Function.mq.generateMXMLProperties (Overview.js:743)
> at Wr.lq.generateMXMLAttributes (Overview.js:551)
> at new Wr (Overview.js:810)
> at QN.J.loadHandler (FrontEnd.js:1978)
> 3Overview.js:56 Uncaught TypeError: Cannot read properties of undefined
> (reading 'prototype')
> at P (Overview.js:56)
> at VG.convert (FrontEnd.js:910)
> at ny (FrontEnd.js:250)
> at HTMLElement.iy (FrontEnd.js:125)
> at HTMLElement.b (FrontEnd.js:121)
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOut (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOver (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOver @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOut (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOut @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOver (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOver @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOut (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOut @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOver (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOver @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOut (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOut @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOver (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOver @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOut (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOut @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
>
>
>
> On Thu, Dec 30, 2021 at 4:32 PM Roman Isitua <ro...@gmail.com>
> wrote:
>
> I get the same error even when I set
> the -js-dynamic-access-unknown-members=true;
>
>
>
> On Thu, Dec 30, 2021 at 4:24 PM Roman Isitua <ro...@gmail.com>
> wrote:
>
>
>
> Using the below settings,
>
> -export-public-symbols=false
> -prevent-rename-protected-symbols=false
> -prevent-rename-public-symbols=false
> -prevent-rename-internal-symbols=false
> -js-dynamic-access-unknown-members=false;
>
> -js-default-initializers=true
>
>
> Debug version runs fine. The release version does not start up
>
> <image004.png>
>
>
> I get the below errors
>
> Uncaught TypeError: Cannot read properties of undefined (reading 'apply')
> at KE.hm (FrontEnd.js:1600)
> at XE.M.Fb (FrontEnd.js:943)
> at XE.M.uh (FrontEnd.js:937)
> at FE.M.na
> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Ffe.m.na%2F&data=04%7C01%7Caharui%40adobe.com%7Ce0c38cc4559641ff0f2108d9d074405d%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637770019992898481%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=C0z70EcllmVEEFk21%2FuH%2FhC%2Fz8a8hrB7AuxRyMw%2FXn4%3D&reserved=0>
> (FrontEnd.js:497)
> at FE.M.v (FrontEnd.js:497)
> at dR.M.S (FrontEnd.js:213)
> at dR.Nz.S (FrontEnd.js:217)
> at dR.M.start (FrontEnd.js:1396)
> at index.html:45
> :8080/favicon.ico:1 Failed to load resource: the server responded with a
> status of 404 (Not Found)
>
>
>
>
>
> FrontEnd.js is the start up class for the application. i.e. It implements
> the Jewel application class.
>
>
>
>
>
>
>
> On Thu, Dec 30, 2021 at 3:19 PM Roman Isitua <ro...@gmail.com>
> wrote:
>
> Hi Harb,
>
>
>
> Thanks for your response. I have gone through the documentation. I will do
> my test again starting with the smallest size option and share my findings.
>
>
>
> Regards,
>
>
>
> On Thu, Dec 30, 2021 at 10:59 AM Harbs <ha...@gmail.com> wrote:
>
> Sorry for my deal in responding.
>
>
>
> Let’s take a step back.
>
>
>
> I’m not sure how you are compiling your modules. I just added some content
> to the module documentation page which explains what compiler options you
> need while compiling modules. (It still needs some editing.)
> https://apache.github.io/royale-docs/features/modules#minification
> <https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapache.github.io%2Froyale-docs%2Ffeatures%2Fmodules%23minification&data=04%7C01%7Caharui%40adobe.com%7Ce0c38cc4559641ff0f2108d9d074405d%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637770019992898481%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=y2M3Q%2F9KMsGdV2gANubdFhMj3uB5rzUgVxJDbF6wYKI%3D&reserved=0>
>
>
>
> Are you using those options?
>
>
>
> On Dec 29, 2021, at 2:19 AM, Maria Jose Esteve <mj...@iest.com> wrote:
>
>
>
> Hi, Let me join you with these tests....
>
>
>
> @Harb, I have compiled the SDK from this branch, feature/ROYALE_INTERFACE_INFO,
> and when running in debug I get this error:
>
>
>
> Message on the PURGE CONSOLE is displayed:
>
>
>
> Cannot convert org.apache.royale.reflection.beads.ClassAliasBead to IBead
>
>
>
> Message in the IDE Window:
>
>
>
> Se produjo una excepción: TypeError: Cannot convert [object Object] to
> IBead
>
> at App.org.apache.royale.core.ElementWrapper.addBead (
> http://localhost:8080/WNetSuitePlus/org/apache/royale/core/ElementWrapper.js:114:11
> )
>
> at App.org.apache.royale.core.HTMLElementWrapper.addBead (
> http://localhost:8080/WNetSuitePlus/org/apache/royale/core/HTMLElementWrapper.js:43:65
> )
>
> at App.org.apache.royale.jewel.Application.start (
> http://localhost:8080/WNetSuitePlus/org/apache/royale/jewel/Application.js:246:10
> )
>
> at App.App_loadXML (http://localhost:8080/WNetSuitePlus/App.js:1681:25
> )
>
> at
> org.apache.royale.net.URLLoader.org.apache.royale.events.EventDispatcher.fireListeners
> (
> http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:97:23
> )
>
> at Function.goog.events.EventTarget.dispatchEventInternal_ (
> http://localhost:8080/WNetSuitePlus/library/closure/goog/events/eventtarget.js:381:26
> )
>
> at
> org.apache.royale.net.URLLoader.org.apache.royale.events.EventDispatcher.dispatchEvent
> (
> http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:72:37
> )
>
> at org.apache.royale.net.URLLoader.jsEventHandler (
> http://localhost:8080/WNetSuitePlus/org/apache/royale/net/URLLoader.js:169:12
> )
>
>
>
> Call stack:
>
>
>
> <image003.png>
>
>
>
> [INFO] Executing MXMLC in tool group Royale with args: [
>
>
> -load-config=D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\compile-app-config.xml,
>
> -js-default-initializers=true,
>
> -source-map=true,
>
> -js-dynamic-access-unknown-members=true,
>
>
> -keep-as3-metadata+=Inject,Dispatcher,EventHandler,Event,PostConstruct,PreDestroy,ViewAdded,ViewRemoved,Bindable,Transient,
>
> -keep-code-with-metadata=Inject,
>
> -show-binding-warnings=false,
>
> -export-public-symbols=false,
>
> -prevent-rename-protected-symbols=false,
>
> -prevent-rename-internal-symbols=false,
>
>
> -js-output=D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\javascript,
>
> -compiler.targets=JSRoyale,
>
>
> D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\src\main\royale\App.mxml
>
>
>
>
>
> The release execution does not change, the error is the same as before
> (SDK compilation from the develop branch):
>
>
>
> Se produjo una excepción: ReferenceError: Error #1065: Variable
> com.iest.winplusweb.models.MasterConfigSystemModel is not defined.
>
> at yR (http://localhost:8080/WPWebRelease/App.js:3605:1771)
>
> at Mya (http://localhost:8080/WPWebRelease/App.js:3343:365)
>
> at AR.J.usa (http://localhost:8080/WPWebRelease/App.js:434:441)
>
> at GFa.J.fromTypeDefinition (
> http://localhost:8080/WPWebRelease/App.js:5706:139)
>
> at Function.YT.getTypeDescriptor (
> http://localhost:8080/WPWebRelease/App.js:4570:820)
>
> at Function.fX.constructBean (
> http://localhost:8080/WPWebRelease/App.js:2336:472)
>
> at r$.J.initialize (http://localhost:8080/WPWebRelease/App.js:5041:66)
>
> at OW.J.init (http://localhost:8080/WPWebRelease/App.js:950:452)
>
> at OW.J.u (http://localhost:8080/WPWebRelease/App.js:951:454)
>
> at $$.J.addBead (http://localhost:8080/WPWebRelease/App.js:357:549)
>
>
>
> The main difference:
>
> project compiled from "SDK-develop" runs fine in js-debug and gives error
> in js-release and, compiled from "SDK-ROYALE_INTERFACE_INFO" does not
> launch because of conversion error.
>
>
>
> Hiedra
>
>
>
> *De:* Roman Isitua <ro...@gmail.com>
> *Enviado el:* martes, 28 de diciembre de 2021 15:55
> *Para:* users@royale.apache.org
> *Asunto:* Re: Load time is very slow
>
>
>
> @Harb
>
>
>
> I have checked out the feature/ROYALE_INTERFACE_INFO branch and compiled
> asjs and compiler. I have rebuilt my application with modules in release
> mode.
>
>
>
> I get the following error when I attempt to launch a module
>
>
>
>
>
> <image001.png>
>
>
>
>
>
> The module loads fine in debug mode
>
>
>
> <image002.png>
>
>
>
>
>
> Snippets of the log
>
>
>
> Overview.js:786 Uncaught TypeError: cm.valuesImpl.init is not a function
> at Rr.Mr.yl (Overview.js:786)
> at Function.iq.generateMXMLProperties (Overview.js:736)
> at Rr.hq.generateMXMLAttributes (Overview.js:546)
> at new Rr (Overview.js:804)
> at LN.J.loadHandler (FrontEnd.js:1967)
> Mr.yl @ Overview.js:786
> iq.generateMXMLProperties @ Overview.js:736
> hq.generateMXMLAttributes @ Overview.js:546
> Rr @ Overview.js:804
> J.loadHandler @ FrontEnd.js:1967
> load (async)
> LN.loadModule @ FrontEnd.js:1965
> dN.loadModule @ FrontEnd.js:2406
> LD.Un @ FrontEnd.js:1809
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:248
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
>
>
>
>
>
> I have attached the full log to this email.
>
>
>
>
>
>
>
>
>
> On Tue, Dec 28, 2021 at 2:51 PM Roman Isitua <ro...@gmail.com>
> wrote:
>
> Hi Maria,
>
>
>
> Prior to starting this mail discussion "Load time is very slow". I can
> confirm I have only been compiling in debug mode. My target\javascript\bin\
> only had js-debug. It was after I upgraded my royale sdk from 0.9.7 to
> 0.9.8 that I compiled in release mode.
>
>
>
>
>
>
>
> On Tue, Dec 28, 2021 at 2:24 PM Maria Jose Esteve <mj...@iest.com>
> wrote:
>
> Hi, @Roman, I think you are doing a double compile can it be? My times are
> the same as yours and I always compile in debug and release.
>
>
>
> Look at your target folder " target\javascript\bin\" and if you have two
> folders: js-debug and js-release you are compiling always double.
>
>
>
> In my case, the architecture of my project as well as the Maven
> compilation files (pom.xml) were provided by an external company (we didn't
> know anything about Maven or Royale at that time) and I understand that
> this formula was chosen to show us the options we had.
>
>
>
> A priori and without doing any test as Harb has done, I think that
> modularity gives us the advantage of compiling parts of the code once and
> not compiling them again if they are not modified. So far WITH MY
> COMPILATION TIMES, sometimes more than 1 minute, this is fundamental. But
> of course, now we have the problem of minification of the modules and it is
> really a serious problem because it is impossible for us to deploy in
> production.
>
>
>
> I will try to separate the compiación realese with a profile and if I
> succeed I will pass it to you @Roman.
>
>
>
> @Harb what do you mean by compiling the ROYALE_INTERFACE_INFO branch?
>
>
>
> Hiedra
>
>
>
> *De:* Harbs <ha...@gmail.com>
> *Enviado el:* lunes, 27 de diciembre de 2021 18:32
> *Para:* users@royale.apache.org
> *Asunto:* Re: Load time is very slow
>
>
>
> That doesn’t sound right.
>
>
>
> Are you sure you’re compiling debug and not release? That sounds like
> release build times.
>
>
>
> On Dec 27, 2021, at 3:31 PM, Roman Isitua <ro...@gmail.com> wrote:
>
>
>
> Wow ! You are using a workstation with a bleeding edge processor.
>
>
>
> I just compiled my app now. It took 44 seconds. (First compilation after
> ide start up.) Subsequently compilations are usually 19s to 20s.
>
>
>
> My application code base is very very small compared to yours. As we
> continue to add functionality, I expect the compile times to rise.
>
>
>
>
>
>
>
>
>
> <MainApp_pom.xml><Overview_pom.xml><fm_client2_pom.xml>
>
>
>
>
Re: Compiling Modules (was Re: Load time is very slow)
Posted by Alex Harui <ah...@adobe.com>.
Hi Roman,
That’s good news. So now on to your app. The reason it made a difference to run Maven from ModuleExample instead of ModuleExample/MainApp and ModuleExample/Module is because we need to use relative paths in the examples so they compile on everyone’s machines.
For your app, you might want to specify absolute paths so you can run from the subfolders and build them at different times. See if you can get a clean compile where Module finds the outputs from MainApp. Then if the results to not run for you it is time to dig deeper into the output.
Thanks,
-Alex
From: Roman Isitua <ro...@gmail.com>
Reply-To: "users@royale.apache.org" <us...@royale.apache.org>
Date: Tuesday, January 25, 2022 at 4:40 AM
To: "users@royale.apache.org" <us...@royale.apache.org>
Subject: Re: Compiling Modules (was Re: Load time is very slow)
I have built the ModuleExample project using mvn clean install. The release mode runs successfully. I can see the appexterns and applinkreport-js files in the ModuleExample folder.
On Mon, Jan 24, 2022 at 6:59 AM Alex Harui <ah...@adobe.com>> wrote:
HI Roman,
Let’s get the example to work first, then try your app.
Set the current directory to examples/royale/ModuleExample. Then run “mvn clean install”.
The appexterns.js file should end up in examples/royale/ModuleExample.
HTH,
-Alex
From: Roman Isitua <ro...@gmail.com>>
Reply-To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Date: Sunday, January 23, 2022 at 2:38 AM
To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Subject: Re: Compiling Modules (was Re: Load time is very slow)
I pulled the latest changes to ReleaseModules branch and compiled the royale compiler and asjs respectively.
I have attempted compiling the project. The module compilation fails. The reason for the failure is that the appexterns.js file does not exist.
Troubleshooting further (I compiled the ModuleExample to check.) I realized that MainApp (i.e the main application does not produce appextern.js file. It only produces applinkreport-js.)
I am still troubleshooting why MainApp is not producing the appexterns.js file.
I copied the following settings from the ModuleExample and applied them to my pom.
<additionalCompilerOptions>-export-public-symbols=true;-externs-report=appexterns.js;-link-report=applinkreport.xml;-prevent-rename-object-keys=cssData,_bindings,ROYALE_CLASS_INFO,superClass_,qName</additionalCompilerOptions>
I have attached my MainApp.pom xml file.
On Sun, Jan 23, 2022 at 7:50 AM Alex Harui <ah...@adobe.com>> wrote:
I updated the royale-compiler and royale-asjs ReleaseModules branches. The examples/royale/ModuleExample now works for me in both Ant and Maven.
HTH,
-Alex
From: Alex Harui <ah...@adobe.com>>
Reply-To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Date: Friday, January 14, 2022 at 10:05 AM
To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Subject: Re: Compiling Modules (was Re: Load time is very slow)
Hi Roman,
I saw this and similar entries in the MainApp.xml that was attached:
<royale.export-public-symbols>-export-public-symbols=false;</royale.export-public-symbols>
It’s been a while since I used Maven, but we don’t want these options to be false.
I thought Maven picked up settings from src/main/config/compile-app-config.xml, but I guess not, so you’ll have to make the changes I made to the example’s src/main/config/compile-app-config.xml files in MainApp and Module in your pom.xml files.
I don’t know if I’ll have time this weekend to update the pom.xml files in the branch and test on Maven so hopefully you can figure it out.
Then, if it still doesn’t work, post the updated target/compile-app-config.xml files and figure out how to make the .JS files accessible so I can look at them.
Good luck, hope it works,
-Alex
From: Roman Isitua <ro...@gmail.com>>
Reply-To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Date: Friday, January 14, 2022 at 6:30 AM
To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Subject: Re: Compiling Modules (was Re: Load time is very slow)
Find my responses to your questions below
On Fri, Jan 14, 2022 at 12:19 AM Alex Harui <ah...@adobe.com>> wrote:
Hi Roman,
All prevent-rename options should be set to true or left to their default values. Looks like they are false in the main app.
I ensured that they are left to their defaults. They are not specified in the respective pom's for main app and module.
Please post the contents of the compile-app-config.xml files.
I have attached the compile-app-config.xml files for mainApp and module to this email.
Also, please make sure the bin/js-debug folders have been deleted before compiling.
I can confirm that this is always the case.
The compile-app-config.xml files contain the prevent-rename-object-keys setting in the example. You can specify it for your app in compile-app-config.xml as well.
I don't see this key setting applied in the compile-app-config.xml. I guess something is wrong. (See the attached files). I copied these files from the target folders that are generated after a successful build of main app and module respectively.
Then if it still doesn’t work, I’ll want to see the bin/js-release folders. You can attach them to a Git Issue if it doesn’t contain sensitive information or we can discuss other ways.
Please, what is the purpose of compile-app-config.xml ? I am just discovering that I have it in the MainApp project. it is located in src\main\config. I don't have it for the module.
I am using maven to build the project.
-Alex
From: Roman Isitua <ro...@gmail.com>>
Reply-To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Date: Thursday, January 13, 2022 at 2:50 PM
To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Subject: Re: Compiling Modules (was Re: Load time is very slow)
I have performed the test.
- I created a new branch locally called ReleaseModules for compiler and asjs respectively. (git branch ReleaseModules)
- check out to ReleaseModules for compiler and asjs respectively. (git checkout ReleaseModules)
- Then pulled from ReleaseModules. (git pull origin ReleaseModules) for compiler and asjs respectively.
- Then built the compiler and asjs respectively. (mvn clean install)
I am still unable to load the module. However the error is different from the previous test.
[cid:17e9139bb38cb971f161]
The error log
Failed to load resource: the server responded with a status of 404 (Not Found)
Overview.js:1270 Uncaught TypeError: Cannot read properties of undefined (reading 'init')
at A_Aeh.A_A.g.h.v.$d.Qo (Overview.js:1270:627)
at Function.A_A.g.h.i.Ua.generateMXMLProperties (Overview.js:1196:316)
at A_Aeh.A_A.g.h.v.qc.generateMXMLAttributes (Overview.js:930:358)
at new A_Aeh (Overview.js:1296:431)
at MN.J.loadHandler (FrontEnd.js:1963:188)
Let me also share the compilation settings used. (correct me if I am wrong)
for main app
--- royale-maven-plugin:0.9.9-SNAPSHOT:compile-app (default-compile-app) @ MainApp ---
[INFO] Executing MXMLC in tool group Royale with args: [-load-config=C:\Users\nyemi\git\SpacioFM2\SpacioFM2\FmClient2\MainApp\target\compile-app-config.xml, -compiler.show-binding-warnings=false, -source-map=false, -js-default-initializers=true, -js-dynamic-access-unknown-members=true, -keep-as3-metadata+=Inject,Dispatcher,EventHandler,PostConstruct,PreDestroy,ViewAdded,ViewRemoved,Bindable,Transient, -js-output=C:\Users\nyemi\git\SpacioFM2\SpacioFM2\FmClient2\MainApp\target\javascript, -compiler.targets=JSRoyale, C:\Users\nyemi\git\SpacioFM2\SpacioFM2\FmClient2\MainApp\src\main\royale\FrontEnd.mxml]
for the module
[INFO] --- royale-maven-plugin:0.9.9-SNAPSHOT:compile-app (default-compile-app) @ Overview ---
[INFO] Executing MXMLC in tool group Royale with args: [-load-config=C:\Users\nyemi\git\SpacioFM2\SpacioFM2\FmClient2\Overview\target\compile-app-config.xml, -compiler.show-binding-warnings=false, -source-map=false, -js-default-initializers=true, -js-dynamic-access-unknown-members=true, -js-output=C:\Users\nyemi\git\SpacioFM2\SpacioFM2\FmClient2\Overview\target\javascript, -compiler.targets=JSRoyale, C:\Users\nyemi\git\SpacioFM2\SpacioFM2\FmClient2\Overview\src\main\royale\Overview.mxml]
I can't see the -prevent-rename-object-keys you mentioned being supplied automatically.
I have attached the pom's for the maven project so you can inspect the settings I used. I am not sure that I am applying them correctly.
MainApp.xml is the Main application. Overview.xml is the module. FmClient2.xml is the parent project.
Regards,
On Wed, Jan 12, 2022 at 9:04 AM Alex Harui <ah...@adobe.com>> wrote:
I pushed a ReleaseModules branch in royale-compiler and royale-asjs.
These changes cause the royale-asjs/examples/royale/ModuleExample release version to work.
The big challenge is that it turned out there is a fair amount of infrastructure that is not exported/public. The Language utilities, ROYALE_CLASS_INFO, the superclass_ property, cssData and others are going to get renamed. And thus renamed differently in the main app vs the module.
That’s why the current compiler’s strategy was to try to copy the renaming map from the main app to the module, but it didn’t always work. There seems to be a bug in the Closure Compiler that a set of externs causes the compiler to mis-handle package-paths. Also, it meant that the module contained its own copy of most of the infrastructure
The new compiler strategy is a bit more like the old Flex module strategy. The module tries to not contain a copy of code that already exists in the main app. Some of the goog/base.js stuff still gets copied though. Then because we avoid renaming more things, the module can reference the shared infrastructure in the main app.
The new compiler detects if what is being compiled is a loader of modules (because it is generating an externs-report) or is a Module and prevents renaming of Language APIs, modified base.js to not rename the superClass_ property used for calling super() and a few other things. In addition, I added a -prevent-rename-object-keys compiler option that works as a post-processor. It scans the js files being copied into bin/js-debug and adds quotes around things.
By making these changes, I was able to get the closure compiler to mis-handle the packages in a more predictable way, so another thing the new compiler does is post-process the output file to remove the incorrect package code. The incorrect code would re-init package paths like “org” or “org.apache.royale”.
Anyway, give it a try and see if it works. Probably we’ll find out there is more infrastructure that needs to not be renamed, but I think this has a better chance of working as we aren’t blocked by the compiler outputting bad code. Many months ago I tried to understand how why the Closure Compiler output bad code, but ran out of time.
Another difference is that the new compiler strategy doesn’t use custom overrides of Closure Compiler passes which was fragile and will make it easier to upgrade to newer versions of Closure Compiler.
HTH,
-Alex
From: Alex Harui <ah...@adobe.com>>
Reply-To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Date: Wednesday, January 5, 2022 at 9:53 AM
To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Subject: Re: Compiling Modules (was Re: Load time is very slow)
I probably won’t have time to really dig into this until the weekend. It is looking like the Closure Compiler gets confused when presented with externs for the same package tree that the module is generating new classes for.
-Alex
From: Roman Isitua <ro...@gmail.com>>
Reply-To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Date: Tuesday, January 4, 2022 at 1:57 PM
To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Subject: Re: Compiling Modules (was Re: Load time is very slow)
Okay. I knew I was missing something.
I will test again when the update for load-externs is available.
On Tue, Jan 4, 2022 at 6:02 PM Alex Harui <ah...@adobe.com>> wrote:
Essentially, -externs-report is for the Closure (JS) Compiler. -link-report and -load-externs (one leading ‘-‘) is for the Royale Compiler to tell the Royale Compiler what classes to feed to the Closure Compiler. Both contain the same data (the set of classes used in the main app), just formatted differently and used differently.
The –externs option for the Closure Compiler then tells the Closure Compiler not to look for classes in the set of files it is supposed to minify.
So, you have the right settings for the main app, but for the module, it should be:
-js-compiler-option=--externs extrep.txt; -load-externs linkrep.txt;
However, even that won’t work today, as the Royale Compiler is not handling -load-externs on the JS prep for Closure Compiler. I have some local changes to the compiler that mixes most of it, but am facing issues with how Closure handles package paths. If that can be resolved, then we have a good chance of things working.
-Alex
From: Roman Isitua <ro...@gmail.com>>
Reply-To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Date: Tuesday, January 4, 2022 at 12:39 AM
To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Subject: Re: Compiling Modules (was Re: Load time is very slow)
Thanks for the update.
I attempted the following:
1. In the main application, I use the following setting:
-externs-report=extrep.txt; -link-report=linkrep.txt;
2. In the module I use the following
-js-compiler-option=--externs extrep.txt; -js-compiler-option+=--load-externs linkrep.txt;
The main application compiles successfully, I get a compilation error with the module
"--load-externs" is not a valid option
Sample usage: --compilation_level (-O) VAL --externs VAL --js VAL --js_output_file VAL --warning_level (-W) [QUIET | DEFAULT
| VERBOSE]
Run with --help for all options and details
Internal error: java.lang.NullPointerException com.google.javascript.jscomp.CommandLineRunner.createOptions(CommandLineRunner.java:1809)org.apache.royale.compiler.utils.JSClosureCompilerWrapper$CompilerOptionsParser.getOptions(JSClosureCompilerWrapper.java:529)org.apache.royale.compiler.utils.JSClosureCompilerWrapper.<init>(JSClosureCompilerWrapper.java:77)org.apache.royale.compiler.internal.codegen.mxml.royale.MXMLRoyalePublisher.publish(MXMLRoyalePublisher.java:395)org.apache.royale.compiler.clients.M
I don't think I am using this option correctly.
.....
On Tue, Jan 4, 2022 at 8:44 AM Alex Harui <ah...@adobe.com>> wrote:
I found some time to investigate. The -externs-report option is mostly working correctly, but other compiler changes are needed to try to avoid duplicate code in the module. I might have time to investigate more this coming weekend. It does appear that if we can correctly reference the app’s class from the module that it will work. The Closure Compiler let me compile the module after I externalize and avoid requires on everything in the main app’s externs report and -js link report, but the references in the module have collapsed packages which is either incorrect or aliases need to be created.
However I think this new approach has a better chance of working than trying to match renaming tables.
-Alex
From: Alex Harui <ah...@adobe.com>>
Reply-To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Date: Monday, January 3, 2022 at 2:30 PM
To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Subject: Re: Compiling Modules (was Re: Load time is very slow)
The -externs-report option should be similar to the -link-report option. It takes a filename. The compiler should output the classes used in the JS compile into that file. To use externs, I think you don’t need to prevent renaming in the application as long as public variables are exported. I think you specify -externs-report when compiling the application.
You may also need to output a -link-report from the application as well.
I think you then specify the externs-report file as an -externs for the -js-compiler-options when compiling the module. And maybe also specify the -link-report output as a -load-externs in the same way it was used when compiling Flex modules. The goal for the module is, like Flex, to not have any classes in the module that exist in the main app. Then it doesn’t matter about class renaming within the release-mode JS file.
HTH,
-Alex
From: Roman Isitua <ro...@gmail.com>>
Reply-To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Date: Monday, January 3, 2022 at 12:37 PM
To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Subject: Re: Compiling Modules (was Re: Load time is very slow)
I can confirm that classes are being renamed in both files.
I have attempted your suggestion i.e. removing variable maps and property maps then use
-externs-report;-export-public-symbols=true;-prevent-rename-public-symbols=true;
I get the below error
command line Error: configuration variable 'externs-report' expected 1 argument(s), got 0.
I cannot find any documentation on how to use the -externs-report argument. What does it do ? and what are the acceptable values ?
Regards,
On Sun, Jan 2, 2022 at 9:06 AM Alex Harui <ah...@adobe.com>> wrote:
Hi Roman,
It might be more complicated. The settings are probably doing something since you reported that the error occurred in the app vs the module depending on the settings.
I went back and looked at the original module example in examples/royale/ModuleExample and was surprised there weren’t more compiler settings. I thought we’d found a way to externalize the main app’s code for the module. Because if both the app and module have a copy of SimpleCSSValuesImpl or any other class that both JS files use, there could be issues as to which one gets loaded (maybe both) and what export aliases are pointing to. Sounds like changing settings affected whether the aliases pointed at module code vs app code.
I thought we were using similar settings to what we used for SWF where the module would not contain a copy of SimpleCSSValuesImpl so it would use the one loaded by the main app, but I didn’t see those settings. We might need to make that work because otherwise I think static initializations won’t do the right thing. Or maybe we’ve figured out that it is simpler just to write defensive code that doesn’t get broken. But also, if the module has its own copy of code already loaded by the main app, that’s sort of a waste of bytes. Maybe there was a minification issue with not having the module link in classes already linked into the main app. I see an -externs-report option in the compiler but the example doesn’t seem to use it.
You should be able to scan the JS files and see if a class is in both module and app and if it is getting renamed.
I don’t know if I will have time to investigate further. The currently recommended options for modules involving variable maps and property maps may need to be abandoned in favor of externs and preventing renames.
-Alex
From: Roman Isitua <ro...@gmail.com>>
Reply-To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Date: Saturday, January 1, 2022 at 3:02 AM
To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Subject: Re: Compiling Modules (was Re: Load time is very slow)
Alex, thank you for your detailed analysis of the error log.
I agree with you that the best strategy is to prevent renaming of public/exports used by the module. I have tried different options to prevent renaming
It appears none of them stops this. From my observation, it appears that this default options below
-export-public-symbols=true;-prevent-rename-public-symbols=true;-prevent-rename-public-instance-accessors=true;
Only seem to affect the main application (main module) but have no effect on the other modules even though I ensured they were applied in their respective module pom. I came to this conclusion when I decided to turn set -prevent-rename-public-symbols=false
I noticed that I got the same error but this time around in the main module.
Uncaught TypeError: this.rb[(intermediate value).Kd(...)] is not a function
at HN.iI.send (FrontEnd.js:970)
at nI.EH.Ea (FrontEnd.js:880)
at ON.q6 (FrontEnd.js:1815)
at TN.L2 (FrontEnd.js:2034)
at hF.Xf (FrontEnd.js:2063)
at lF.kb (FrontEnd.js:1233)
at lF.Vf (FrontEnd.js:1224)
at cF.O (FrontEnd.js:659)
at cF.M.w (FrontEnd.js:661)
at gQ.mA.M (FrontEnd.js:241)
FrontEnd.js maps to FrontEnd.as in my application and is the entry point of the application. This confirms that -prevent-rename-public-symbols=false has
an effect on the main module but no effect on other modules even though they were applied in the respective module pom's.
Maybe there are other options I am overlooking.
On Sat, Jan 1, 2022 at 9:31 AM Alex Harui <ah...@adobe.com>> wrote:
In case it helps, the minification (variable renaming) mechanism is essentially guaranteed to cause problems in modules. The Closure Compiler basically takes variables, sees if it is worth renaming it, then gives it the name ‘a’, then ‘b’, and so-on, (it skips a few letters, IIRC), then moves on to ‘aa’, and ‘ab’, etc. The odds that the compiler will encounter the same variables in the same order when compiling an app and one or more modules is close to zero.
I did some work to try to dump the mapping of the renamed variables in the main app and use that when compiling the modules. It was working for a while, then some code was added to the framework that started fooling the Closure Compiler. I spent some time trying to fix the Closure Compiler, but ran out of time. Meanwhile, Josh was adding more control over renaming so I moved on to other things.
IMO, the best strategy to take would be to try to control what gets renamed. All public/exports from the app that are used by the module should not be renamed. That will definitely make the app and modules bigger, but unless the Closure Compiler folks become interested in runtime-loaded modules, it is challenging for the Royale compiler to allow aggressive renaming.
I think what is going on with the exceptions below is that exporting doesn’t really prevent renaming. It only sets up an externally-visible alias to a renamed variable. Especially for static members. So it isn’t sufficient to export public variables, the code within the module must not let the Closure Compiler think that the intra-module references can be renamed, in this case, from SimpleCSSValuesImpl to QI
I don’t know the renaming options we’ve added to the Royale Compiler, so I don’t know if there is an option to control that. I think there is a way to convince the Closure Compiler to not rename SimpleCSSValuesImpl because I’ve seen other class names not get renamed.
HTH,
-Alex
From: Roman Isitua <ro...@gmail.com>>
Reply-To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Date: Friday, December 31, 2021 at 10:42 AM
To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Subject: Re: Compiling Modules (was Re: Load time is very slow)
I have tested on both. The error log is the same.
I don't understand your second question. Kindly clarify ?
I followed strictly the approach used for loading modules here in this example.
This is the only method I know for loading modules. If there is another method please share.
https://royale.apache.org/dividing-an-apache-royale-application-with-modules/<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Froyale.apache.org%2Fdividing-an-apache-royale-application-with-modules%2F&data=04%7C01%7Caharui%40adobe.com%7C0f2a4dd71ca3431b2c9f08d9dfffe2af%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637787112404865767%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=abWkC28fPhs1Xi7%2BEWmc1x8BrbX68j6b2qkzNvIyC00%3D&reserved=0>
On Fri, 31 Dec 2021, 19:14 Maria Jose Esteve, <mj...@iest.com>> wrote:
@Roman, which branch did you compile the SDK from, ROYALE_INTERFACE_INFO or develop?
Could you pass the Overview.mxml view to the main application? (to rule it out)
Hiedra
De: Roman Isitua <ro...@gmail.com>>
Enviado el: viernes, 31 de diciembre de 2021 17:56
Para: users@royale.apache.org<ma...@royale.apache.org>
Asunto: Re: Compiling Modules (was Re: Load time is very slow)
I have tried tracing where the errors are happening whenever I test the release version
Uncaught TypeError: Ql.valuesImpl.init is not a function
at Hr.Cr.um (Overview.js:846)
at Function.ep.generateMXMLProperties (Overview.js:795)
at Hr.Sp.generateMXMLAttributes (Overview.js:599)
at new Hr (Overview.js:864)
at PN.M.loadHandler (FrontEnd.js:2042)
9Overview.js:173 Uncaught TypeError: this.createElement is not a function
at $B.V (Overview.js:173)
at new $B (FrontEnd.js:2430)
at EP.convert (FrontEnd.js:2430)
at Zy (FrontEnd.js:261)
at HTMLAnchorElement.Uy (FrontEnd.js:121)
at HTMLAnchorElement.Sy.b (FrontEnd.js:117)
The highlighted code in red is declared as follows in the Overview.mxml (maven module)
<j:valuesImpl>
<js:SimpleCSSValuesImpl/>
</j:valuesImpl>
The j:valuesImpl points to the following code in jewel Module.js
/**
* @nocollapse
* @export
* @type {org.apache.royale.core.IValuesImpl}
*/
org.apache.royale.jewel.Module.prototype.valuesImpl;
org.apache.royale.jewel.Module.prototype.set__valuesImpl = function(value) {
org.apache.royale.core.ValuesManager.valuesImpl.init(this);
};
it appears this function is improperly renamed and whenever the app tries to load the module is not able to recognise it as a function.
The same issue of improper function renaming is happening in the second error as well
9Overview.js:173 Uncaught TypeError: this.createElement is not a function
On Thu, Dec 30, 2021 at 10:42 PM Roman Isitua <ro...@gmail.com>> wrote:
I have applied the js compiler option as follows
<additionalCompilerOptions>-source-map=false;-compiler.show-binding-warnings=false;-js-default-initializers=true;-js-dynamic-access-unknown-members=true;
-js-compiler-option=--variable_map_output_file gccvars.txt;-js-compiler-option+=--property_map_output_file gccprops.txt
</additionalCompilerOptions>
I get the same error as before when attempting to launch the jewel module.
Error! Filename not specified.
Same error trace.
Uncaught TypeError: cm.valuesImpl.init is not a function
at Rr.Mr.yl (Overview.js:786)
at Function.iq.generateMXMLProperties (Overview.js:736)
at Rr.hq.generateMXMLAttributes (Overview.js:546)
at new Rr (Overview.js:804)
at LN.J.loadHandler (FrontEnd.js:1967)
FrontEnd.js:1640 Uncaught TypeError: M is not a function
at oM.J.handleMouseOut (FrontEnd.js:1640)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:248)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
FrontEnd.js:1640 Uncaught TypeError: M is not a function
at oM.J.handleMouseOver (FrontEnd.js:1640)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:248)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
FrontEnd.js:1640 Uncaught TypeError: M is not a function
at oM.J.handleMouseOut (FrontEnd.js:1640)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:248)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
FrontEnd.js:1640 Uncaught TypeError: M is not a function
at oM.J.handleMouseOver (FrontEnd.js:1640)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:248)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
FrontEnd.js:1640 Uncaught TypeError: M is not a function
at oM.J.handleMouseOut (FrontEnd.js:1640)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:248)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
FrontEnd.js:1640 Uncaught TypeError: M is not a function
at oM.J.handleMouseOver (FrontEnd.js:1640)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:248)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
FrontEnd.js:1640 Uncaught TypeError: M is not a function
at oM.J.handleMouseOut (FrontEnd.js:1640)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:248)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
3Overview.js:56 Uncaught TypeError: Cannot read properties of undefined (reading 'prototype')
at P (Overview.js:56)
at SG.convert (FrontEnd.js:904)
at ny (FrontEnd.js:248)
at HTMLElement.iy (FrontEnd.js:125)
at HTMLElement.b (FrontEnd.js:121)
On Thu, Dec 30, 2021 at 6:56 PM Harbs <ha...@gmail.com>> wrote:
1. I’d get rid of the agressive minification options. It will likely cause issues. If you get it to work without those options, you can try to add them back in and see if it still works.
2. You seem to be missing the compiler options explained here: https://apache.github.io/royale-docs/features/modules#minification<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapache.github.io%2Froyale-docs%2Ffeatures%2Fmodules%23minification&data=04%7C01%7Caharui%40adobe.com%7C0f2a4dd71ca3431b2c9f08d9dfffe2af%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637787112404865767%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=d146LssXtltISGnbtw0lL0YxQbO9DwRj2i9Ch2NRYVY%3D&reserved=0>
For a pom, it would look something like this (adjust your paths to match your setup):
Main app:
<additionalCompilerOptions>-source-map=true;-js-compiler-option=--variable_map_output_file gccvars.txt;-js-compiler-option+=--property_map_output_file gccprops.txt</additionalCompilerOptions>
Module:
<additionalCompilerOptions>-source-map=true;-js-compiler-option=--variable_map_input_file ../../../../../MainApp/bin/js-release/gccvars.txt;-js-compiler-option+=--property_map_input_file ../../../../../MainApp/bin/js-release/gccprops.txt</additionalCompilerOptions>
On Dec 30, 2021, at 7:43 PM, Roman Isitua <ro...@gmail.com>> wrote:
I think it will be better for me to share my pom's that way you can see all the compilation options used. The pom for the parent (FmClient2), the MainApp and one module (Overview) have been attached to this email.
On Thu, Dec 30, 2021 at 6:22 PM Harbs <ha...@gmail.com>> wrote:
Roman, can you share your full compiler options?
I decided to remove the below settings completely
-export-public-symbols=false
-prevent-rename-protected-symbols=false
-prevent-rename-public-symbols=false
-prevent-rename-internal-symbols=false
I enabled the below settings
-js-dynamic-access-unknown-members=true;
-js-default-initializers=true
The release version starts up
Hiedra, that’s great!
On Dec 30, 2021, at 7:15 PM, Roman Isitua <ro...@gmail.com>> wrote:
Yes. I am testing with the sdk compiled on branch ROYALE_INTERFACE_INFO
On Thu, Dec 30, 2021 at 6:10 PM Maria Jose Esteve <mj...@iest.com>> wrote:
Roman, are you testing with the SDK compiled from the Harb branches, ROYALE_INTERFACE_INFO, or from develop?
Hiedra
De: Roman Isitua <ro...@gmail.com>>
Enviado el: jueves, 30 de diciembre de 2021 16:52
Para: users@royale.apache.org<ma...@royale.apache.org>
Asunto: Re: Compiling Modules (was Re: Load time is very slow)
I decided to remove the below settings completely
-export-public-symbols=false
-prevent-rename-protected-symbols=false
-prevent-rename-public-symbols=false
-prevent-rename-internal-symbols=false
I enabled the below settings
-js-dynamic-access-unknown-members=true;
-js-default-initializers=true
The release version starts up
<image001.png>
<image002.png>
However, the moment I launch a module. I get the below error
<image003.png>
It appears to be failing when I launch the "Overview" module (by clicking the Overview side menu).
So my current observation is that by retaining only two settings
-js-dynamic-access-unknown-members=true;
-js-default-initializers=true
The release module starts up but the app fails whenever I launch a module.
The smallest size settings in the documentation do not work. The app does not start up.
-export-public-symbols=false
-prevent-rename-protected-symbols=false
-prevent-rename-public-symbols=false
-prevent-rename-internal-symbols=false
The error trace is below
Uncaught TypeError: cm.valuesImpl.init is not a function
at Wr.Rr.pl<https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwr.rr.pl%2F&data=04%7C01%7Caharui%40adobe.com%7C0f2a4dd71ca3431b2c9f08d9dfffe2af%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637787112404865767%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=AzKZBPFcGk%2FHvBXmR%2FxOfi6RPuppAZeuenU5pEpuIxU%3D&reserved=0> (Overview.js:792)
at Function.mq.generateMXMLProperties (Overview.js:743)
at Wr.lq.generateMXMLAttributes (Overview.js:551)
at new Wr (Overview.js:810)
at QN.J.loadHandler (FrontEnd.js:1978)
3Overview.js:56 Uncaught TypeError: Cannot read properties of undefined (reading 'prototype')
at P (Overview.js:56)
at VG.convert (FrontEnd.js:910)
at ny (FrontEnd.js:250)
at HTMLElement.iy (FrontEnd.js:125)
at HTMLElement.b (FrontEnd.js:121)
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOut (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOver (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOver @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOut (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOut @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOver (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOver @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOut (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOut @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOver (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOver @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOut (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOut @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOver (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOver @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOut (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOut @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
On Thu, Dec 30, 2021 at 4:32 PM Roman Isitua <ro...@gmail.com>> wrote:
I get the same error even when I set the -js-dynamic-access-unknown-members=true;
On Thu, Dec 30, 2021 at 4:24 PM Roman Isitua <ro...@gmail.com>> wrote:
Using the below settings,
-export-public-symbols=false
-prevent-rename-protected-symbols=false
-prevent-rename-public-symbols=false
-prevent-rename-internal-symbols=false
-js-dynamic-access-unknown-members=false;
-js-default-initializers=true
Debug version runs fine. The release version does not start up
<image004.png>
I get the below errors
Uncaught TypeError: Cannot read properties of undefined (reading 'apply')
at KE.hm (FrontEnd.js:1600)
at XE.M.Fb (FrontEnd.js:943)
at XE.M.uh (FrontEnd.js:937)
at FE.M.na<https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Ffe.m.na%2F&data=04%7C01%7Caharui%40adobe.com%7C0f2a4dd71ca3431b2c9f08d9dfffe2af%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637787112404865767%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=eHBQuBsxHvrfU3espcRGgnT9BCsUsPqiWoipKz1MVoU%3D&reserved=0> (FrontEnd.js:497)
at FE.M.v (FrontEnd.js:497)
at dR.M.S (FrontEnd.js:213)
at dR.Nz.S (FrontEnd.js:217)
at dR.M.start (FrontEnd.js:1396)
at index.html:45
:8080/favicon.ico:1 Failed to load resource: the server responded with a status of 404 (Not Found)
FrontEnd.js is the start up class for the application. i.e. It implements the Jewel application class.
On Thu, Dec 30, 2021 at 3:19 PM Roman Isitua <ro...@gmail.com>> wrote:
Hi Harb,
Thanks for your response. I have gone through the documentation. I will do my test again starting with the smallest size option and share my findings.
Regards,
On Thu, Dec 30, 2021 at 10:59 AM Harbs <ha...@gmail.com>> wrote:
Sorry for my deal in responding.
Let’s take a step back.
I’m not sure how you are compiling your modules. I just added some content to the module documentation page which explains what compiler options you need while compiling modules. (It still needs some editing.) https://apache.github.io/royale-docs/features/modules#minification<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapache.github.io%2Froyale-docs%2Ffeatures%2Fmodules%23minification&data=04%7C01%7Caharui%40adobe.com%7C0f2a4dd71ca3431b2c9f08d9dfffe2af%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637787112404865767%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=d146LssXtltISGnbtw0lL0YxQbO9DwRj2i9Ch2NRYVY%3D&reserved=0>
Are you using those options?
On Dec 29, 2021, at 2:19 AM, Maria Jose Esteve <mj...@iest.com>> wrote:
Hi, Let me join you with these tests....
@Harb, I have compiled the SDK from this branch, feature/ROYALE_INTERFACE_INFO, and when running in debug I get this error:
Message on the PURGE CONSOLE is displayed:
Cannot convert org.apache.royale.reflection.beads.ClassAliasBead to IBead
Message in the IDE Window:
Se produjo una excepción: TypeError: Cannot convert [object Object] to IBead
at App.org.apache.royale.core.ElementWrapper.addBead (http://localhost:8080/WNetSuitePlus/org/apache/royale/core/ElementWrapper.js:114:11)
at App.org.apache.royale.core.HTMLElementWrapper.addBead (http://localhost:8080/WNetSuitePlus/org/apache/royale/core/HTMLElementWrapper.js:43:65)
at App.org.apache.royale.jewel.Application.start (http://localhost:8080/WNetSuitePlus/org/apache/royale/jewel/Application.js:246:10)
at App.App_loadXML (http://localhost:8080/WNetSuitePlus/App.js:1681:25)
at org.apache.royale.net.URLLoader.org.apache.royale.events.EventDispatcher.fireListeners (http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:97:23)
at Function.goog.events.EventTarget.dispatchEventInternal_ (http://localhost:8080/WNetSuitePlus/library/closure/goog/events/eventtarget.js:381:26)
at org.apache.royale.net.URLLoader.org.apache.royale.events.EventDispatcher.dispatchEvent (http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:72:37)
at org.apache.royale.net.URLLoader.jsEventHandler (http://localhost:8080/WNetSuitePlus/org/apache/royale/net/URLLoader.js:169:12)
Call stack:
<image003.png>
[INFO] Executing MXMLC in tool group Royale with args: [
-load-config=D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\compile-app-config.xml,
-js-default-initializers=true,
-source-map=true,
-js-dynamic-access-unknown-members=true,
-keep-as3-metadata+=Inject,Dispatcher,EventHandler,Event,PostConstruct,PreDestroy,ViewAdded,ViewRemoved,Bindable,Transient,
-keep-code-with-metadata=Inject,
-show-binding-warnings=false,
-export-public-symbols=false,
-prevent-rename-protected-symbols=false,
-prevent-rename-internal-symbols=false,
-js-output=D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\javascript,
-compiler.targets=JSRoyale,
D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\src\main\royale\App.mxml
The release execution does not change, the error is the same as before (SDK compilation from the develop branch):
Se produjo una excepción: ReferenceError: Error #1065: Variable com.iest.winplusweb.models.MasterConfigSystemModel is not defined.
at yR (http://localhost:8080/WPWebRelease/App.js:3605:1771)
at Mya (http://localhost:8080/WPWebRelease/App.js:3343:365)
at AR.J.usa (http://localhost:8080/WPWebRelease/App.js:434:441)
at GFa.J.fromTypeDefinition (http://localhost:8080/WPWebRelease/App.js:5706:139)
at Function.YT.getTypeDescriptor (http://localhost:8080/WPWebRelease/App.js:4570:820)
at Function.fX.constructBean (http://localhost:8080/WPWebRelease/App.js:2336:472)
at r$.J.initialize (http://localhost:8080/WPWebRelease/App.js:5041:66)
at OW.J.init (http://localhost:8080/WPWebRelease/App.js:950:452)
at OW.J.u (http://localhost:8080/WPWebRelease/App.js:951:454)
at $$.J.addBead (http://localhost:8080/WPWebRelease/App.js:357:549)
The main difference:
project compiled from "SDK-develop" runs fine in js-debug and gives error in js-release and, compiled from "SDK-ROYALE_INTERFACE_INFO" does not launch because of conversion error.
Hiedra
De: Roman Isitua <ro...@gmail.com>>
Enviado el: martes, 28 de diciembre de 2021 15:55
Para: users@royale.apache.org<ma...@royale.apache.org>
Asunto: Re: Load time is very slow
@Harb
I have checked out the feature/ROYALE_INTERFACE_INFO branch and compiled asjs and compiler. I have rebuilt my application with modules in release mode.
I get the following error when I attempt to launch a module
<image001.png>
The module loads fine in debug mode
<image002.png>
Snippets of the log
Overview.js:786 Uncaught TypeError: cm.valuesImpl.init is not a function
at Rr.Mr.yl (Overview.js:786)
at Function.iq.generateMXMLProperties (Overview.js:736)
at Rr.hq.generateMXMLAttributes (Overview.js:546)
at new Rr (Overview.js:804)
at LN.J.loadHandler (FrontEnd.js:1967)
Mr.yl @ Overview.js:786
iq.generateMXMLProperties @ Overview.js:736
hq.generateMXMLAttributes @ Overview.js:546
Rr @ Overview.js:804
J.loadHandler @ FrontEnd.js:1967
load (async)
LN.loadModule @ FrontEnd.js:1965
dN.loadModule @ FrontEnd.js:2406
LD.Un @ FrontEnd.js:1809
ny @ FrontEnd.js:123
ny @ FrontEnd.js:248
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
I have attached the full log to this email.
On Tue, Dec 28, 2021 at 2:51 PM Roman Isitua <ro...@gmail.com>> wrote:
Hi Maria,
Prior to starting this mail discussion "Load time is very slow". I can confirm I have only been compiling in debug mode. My target\javascript\bin\ only had js-debug. It was after I upgraded my royale sdk from 0.9.7 to 0.9.8 that I compiled in release mode.
On Tue, Dec 28, 2021 at 2:24 PM Maria Jose Esteve <mj...@iest.com>> wrote:
Hi, @Roman, I think you are doing a double compile can it be? My times are the same as yours and I always compile in debug and release.
Look at your target folder " target\javascript\bin\" and if you have two folders: js-debug and js-release you are compiling always double.
In my case, the architecture of my project as well as the Maven compilation files (pom.xml) were provided by an external company (we didn't know anything about Maven or Royale at that time) and I understand that this formula was chosen to show us the options we had.
A priori and without doing any test as Harb has done, I think that modularity gives us the advantage of compiling parts of the code once and not compiling them again if they are not modified. So far WITH MY COMPILATION TIMES, sometimes more than 1 minute, this is fundamental. But of course, now we have the problem of minification of the modules and it is really a serious problem because it is impossible for us to deploy in production.
I will try to separate the compiación realese with a profile and if I succeed I will pass it to you @Roman.
@Harb what do you mean by compiling the ROYALE_INTERFACE_INFO branch?
Hiedra
De: Harbs <ha...@gmail.com>>
Enviado el: lunes, 27 de diciembre de 2021 18:32
Para: users@royale.apache.org<ma...@royale.apache.org>
Asunto: Re: Load time is very slow
That doesn’t sound right.
Are you sure you’re compiling debug and not release? That sounds like release build times.
On Dec 27, 2021, at 3:31 PM, Roman Isitua <ro...@gmail.com>> wrote:
Wow ! You are using a workstation with a bleeding edge processor.
I just compiled my app now. It took 44 seconds. (First compilation after ide start up.) Subsequently compilations are usually 19s to 20s.
My application code base is very very small compared to yours. As we continue to add functionality, I expect the compile times to rise.
<MainApp_pom.xml><Overview_pom.xml><fm_client2_pom.xml>
Re: Compiling Modules (was Re: Load time is very slow)
Posted by Roman Isitua <ro...@gmail.com>.
I have built the ModuleExample project using mvn clean install. The release
mode runs successfully. I can see the appexterns and applinkreport-js files
in the ModuleExample folder.
On Mon, Jan 24, 2022 at 6:59 AM Alex Harui <ah...@adobe.com> wrote:
> HI Roman,
>
>
>
> Let’s get the example to work first, then try your app.
>
>
>
> Set the current directory to examples/royale/ModuleExample. Then run “mvn
> clean install”.
>
>
>
> The appexterns.js file should end up in examples/royale/ModuleExample.
>
>
>
> HTH,
>
> -Alex
>
>
>
> *From: *Roman Isitua <ro...@gmail.com>
> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Date: *Sunday, January 23, 2022 at 2:38 AM
> *To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Subject: *Re: Compiling Modules (was Re: Load time is very slow)
>
>
>
> I pulled the latest changes to ReleaseModules branch and compiled the
> royale compiler and asjs respectively.
>
>
>
> I have attempted compiling the project. The module compilation fails. The
> reason for the failure is that the appexterns.js file does not exist.
>
> Troubleshooting further (I compiled the ModuleExample to check.) I
> realized that MainApp (i.e the main application does not produce appextern.js
> file. It only produces applinkreport-js.)
>
>
>
> I am still troubleshooting why MainApp is not producing the appexterns.js
> file.
>
>
>
> I copied the following settings from the ModuleExample and applied them to
> my pom.
>
>
>
>
> <additionalCompilerOptions>-export-public-symbols=true;-externs-report=appexterns.js;-link-report=applinkreport.xml;-prevent-rename-object-keys=cssData,_bindings,ROYALE_CLASS_INFO,superClass_,qName</additionalCompilerOptions>
>
>
>
> I have attached my MainApp.pom xml file.
>
>
>
>
>
>
>
>
>
> On Sun, Jan 23, 2022 at 7:50 AM Alex Harui <ah...@adobe.com> wrote:
>
> I updated the royale-compiler and royale-asjs ReleaseModules branches.
> The examples/royale/ModuleExample now works for me in both Ant and Maven.
>
>
>
> HTH,
>
> -Alex
>
>
>
> *From: *Alex Harui <ah...@adobe.com>
> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Date: *Friday, January 14, 2022 at 10:05 AM
> *To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Subject: *Re: Compiling Modules (was Re: Load time is very slow)
>
>
>
> Hi Roman,
>
>
>
> I saw this and similar entries in the MainApp.xml that was attached:
>
> *<royale.export-public-symbols>*-export-public-symbols=false;
> *</royale.export-public-symbols>*
>
>
>
> It’s been a while since I used Maven, but we don’t want these options to
> be false.
>
>
>
> I thought Maven picked up settings from
> src/main/config/compile-app-config.xml, but I guess not, so you’ll have to
> make the changes I made to the example’s
> src/main/config/compile-app-config.xml files in MainApp and Module in your
> pom.xml files.
>
>
>
> I don’t know if I’ll have time this weekend to update the pom.xml files in
> the branch and test on Maven so hopefully you can figure it out.
>
>
>
> Then, if it still doesn’t work, post the updated
> target/compile-app-config.xml files and figure out how to make the .JS
> files accessible so I can look at them.
>
>
>
> Good luck, hope it works,
>
> -Alex
>
>
>
> *From: *Roman Isitua <ro...@gmail.com>
> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Date: *Friday, January 14, 2022 at 6:30 AM
> *To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Subject: *Re: Compiling Modules (was Re: Load time is very slow)
>
>
>
>
>
> Find my responses to your questions below
>
>
>
> On Fri, Jan 14, 2022 at 12:19 AM Alex Harui <ah...@adobe.com> wrote:
>
> Hi Roman,
>
>
>
> All prevent-rename options should be set to true or left to their default
> values. Looks like they are false in the main app.
>
> I ensured that they are left to their defaults. They are not specified
> in the respective pom's for main app and module.
>
>
>
> Please post the contents of the compile-app-config.xml files.
>
> I have attached the compile-app-config.xml files for mainApp and module to
> this email.
>
>
>
> Also, please make sure the bin/js-debug folders have been deleted before
> compiling.
>
> I can confirm that this is always the case.
>
>
>
> The compile-app-config.xml files contain the prevent-rename-object-keys
> setting in the example. You can specify it for your app in
> compile-app-config.xml as well.
>
>
>
> I don't see this key setting applied in the compile-app-config.xml. I
> guess something is wrong. (See the attached files). I copied these files
> from the target folders that are generated after a successful build of main
> app and module respectively.
>
>
>
>
>
> Then if it still doesn’t work, I’ll want to see the bin/js-release
> folders. You can attach them to a Git Issue if it doesn’t contain
> sensitive information or we can discuss other ways.
>
>
>
>
>
> Please, what is the purpose of compile-app-config.xml ? I am just
> discovering that I have it in the MainApp project. it is located in
> src\main\config. I don't have it for the module.
>
> I am using maven to build the project.
>
>
>
>
>
>
>
> -Alex
>
>
>
> *From: *Roman Isitua <ro...@gmail.com>
> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Date: *Thursday, January 13, 2022 at 2:50 PM
> *To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Subject: *Re: Compiling Modules (was Re: Load time is very slow)
>
>
>
>
>
> I have performed the test.
>
> - I created a new branch locally called ReleaseModules for compiler and
> asjs respectively. (git branch ReleaseModules)
>
> - check out to ReleaseModules for compiler and asjs respectively. (git
> checkout ReleaseModules)
> - Then pulled from ReleaseModules. (git pull origin ReleaseModules) for
> compiler and asjs respectively.
> - Then built the compiler and asjs respectively. (mvn clean install)
>
> I am still unable to load the module. However the error is different from
> the previous test.
>
>
>
>
>
>
>
> The error log
>
>
>
> Failed to load resource: the server responded with a status of 404 (Not
> Found)
> Overview.js:1270 Uncaught TypeError: Cannot read properties of undefined
> (reading 'init')
> at A_Aeh.A_A.g.h.v.$d.Qo (Overview.js:1270:627)
> at Function.A_A.g.h.i.Ua.generateMXMLProperties (Overview.js:1196:316)
> at A_Aeh.A_A.g.h.v.qc.generateMXMLAttributes (Overview.js:930:358)
> at new A_Aeh (Overview.js:1296:431)
> at MN.J.loadHandler (FrontEnd.js:1963:188)
>
> Let me also share the compilation settings used. (correct me if I am wrong)
>
>
>
> for main app
>
>
>
> --- royale-maven-plugin:0.9.9-SNAPSHOT:compile-app (default-compile-app) @
> MainApp ---
> [INFO] Executing MXMLC in tool group Royale with args:
> [-load-config=C:\Users\nyemi\git\SpacioFM2\SpacioFM2\FmClient2\MainApp\target\compile-app-config.xml,
> -compiler.show-binding-warnings=false, -source-map=false,
> -js-default-initializers=true, -js-dynamic-access-unknown-members=true,
> -keep-as3-metadata+=Inject,Dispatcher,EventHandler,PostConstruct,PreDestroy,ViewAdded,ViewRemoved,Bindable,Transient,
> -js-output=C:\Users\nyemi\git\SpacioFM2\SpacioFM2\FmClient2\MainApp\target\javascript,
> -compiler.targets=JSRoyale,
> C:\Users\nyemi\git\SpacioFM2\SpacioFM2\FmClient2\MainApp\src\main\royale\FrontEnd.mxml]
>
>
>
>
>
> for the module
>
>
>
> [INFO] --- royale-maven-plugin:0.9.9-SNAPSHOT:compile-app
> (default-compile-app) @ Overview ---
> [INFO] Executing MXMLC in tool group Royale with args:
> [-load-config=C:\Users\nyemi\git\SpacioFM2\SpacioFM2\FmClient2\Overview\target\compile-app-config.xml,
> -compiler.show-binding-warnings=false, -source-map=false,
> -js-default-initializers=true, -js-dynamic-access-unknown-members=true,
> -js-output=C:\Users\nyemi\git\SpacioFM2\SpacioFM2\FmClient2\Overview\target\javascript,
> -compiler.targets=JSRoyale,
> C:\Users\nyemi\git\SpacioFM2\SpacioFM2\FmClient2\Overview\src\main\royale\Overview.mxml]
>
>
>
> I can't see the -prevent-rename-object-keys you mentioned being supplied
> automatically.
>
>
>
> I have attached the pom's for the maven project so you can inspect the
> settings I used. I am not sure that I am applying them correctly.
>
> MainApp.xml is the Main application. Overview.xml is the module.
> FmClient2.xml is the parent project.
>
>
>
> Regards,
>
>
>
>
>
> On Wed, Jan 12, 2022 at 9:04 AM Alex Harui <ah...@adobe.com> wrote:
>
> I pushed a ReleaseModules branch in royale-compiler and royale-asjs.
>
>
>
> These changes cause the royale-asjs/examples/royale/ModuleExample release
> version to work.
>
>
>
> The big challenge is that it turned out there is a fair amount of
> infrastructure that is not exported/public. The Language utilities,
> ROYALE_CLASS_INFO, the superclass_ property, cssData and others are going
> to get renamed. And thus renamed differently in the main app vs the module.
>
>
>
> That’s why the current compiler’s strategy was to try to copy the renaming
> map from the main app to the module, but it didn’t always work. There
> seems to be a bug in the Closure Compiler that a set of externs causes the
> compiler to mis-handle package-paths. Also, it meant that the module
> contained its own copy of most of the infrastructure
>
>
>
> The new compiler strategy is a bit more like the old Flex module
> strategy. The module tries to not contain a copy of code that already
> exists in the main app. Some of the goog/base.js stuff still gets copied
> though. Then because we avoid renaming more things, the module can
> reference the shared infrastructure in the main app.
>
>
>
> The new compiler detects if what is being compiled is a loader of modules
> (because it is generating an externs-report) or is a Module and prevents
> renaming of Language APIs, modified base.js to not rename the superClass_
> property used for calling super() and a few other things. In addition, I
> added a -prevent-rename-object-keys compiler option that works as a
> post-processor. It scans the js files being copied into bin/js-debug and
> adds quotes around things.
>
>
>
> By making these changes, I was able to get the closure compiler to
> mis-handle the packages in a more predictable way, so another thing the new
> compiler does is post-process the output file to remove the incorrect
> package code. The incorrect code would re-init package paths like “org” or
> “org.apache.royale”.
>
>
>
> Anyway, give it a try and see if it works. Probably we’ll find out there
> is more infrastructure that needs to not be renamed, but I think this has a
> better chance of working as we aren’t blocked by the compiler outputting
> bad code. Many months ago I tried to understand how why the Closure
> Compiler output bad code, but ran out of time.
>
>
>
> Another difference is that the new compiler strategy doesn’t use custom
> overrides of Closure Compiler passes which was fragile and will make it
> easier to upgrade to newer versions of Closure Compiler.
>
>
>
> HTH,
>
> -Alex
>
>
>
> *From: *Alex Harui <ah...@adobe.com>
> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Date: *Wednesday, January 5, 2022 at 9:53 AM
> *To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Subject: *Re: Compiling Modules (was Re: Load time is very slow)
>
>
>
> I probably won’t have time to really dig into this until the weekend. It
> is looking like the Closure Compiler gets confused when presented with
> externs for the same package tree that the module is generating new classes
> for.
>
>
>
> -Alex
>
>
>
> *From: *Roman Isitua <ro...@gmail.com>
> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Date: *Tuesday, January 4, 2022 at 1:57 PM
> *To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Subject: *Re: Compiling Modules (was Re: Load time is very slow)
>
>
>
> Okay. I knew I was missing something.
>
>
>
> I will test again when the update for load-externs is available.
>
>
>
> On Tue, Jan 4, 2022 at 6:02 PM Alex Harui <ah...@adobe.com> wrote:
>
> Essentially, -externs-report is for the Closure (JS) Compiler.
> -link-report and -load-externs (one leading ‘-‘) is for the Royale Compiler
> to tell the Royale Compiler what classes to feed to the Closure Compiler.
> Both contain the same data (the set of classes used in the main app), just
> formatted differently and used differently.
>
>
>
> The –externs option for the Closure Compiler then tells the Closure
> Compiler not to look for classes in the set of files it is supposed to
> minify.
>
>
>
> So, you have the right settings for the main app, but for the module, it
> should be:
>
> *-js-compiler-option=--externs extrep.txt; -load-externs linkrep.txt;*
>
>
>
> However, even that won’t work today, as the Royale Compiler is not
> handling -load-externs on the JS prep for Closure Compiler. I have some
> local changes to the compiler that mixes most of it, but am facing issues
> with how Closure handles package paths. If that can be resolved, then we
> have a good chance of things working.
>
>
>
> -Alex
>
>
>
> *From: *Roman Isitua <ro...@gmail.com>
> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Date: *Tuesday, January 4, 2022 at 12:39 AM
> *To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Subject: *Re: Compiling Modules (was Re: Load time is very slow)
>
>
>
> Thanks for the update.
>
>
>
> I attempted the following:
>
>
>
> 1. In the main application, I use the following setting:
>
> *-externs-report=extrep.txt; -link-report=linkrep.txt;*
>
>
>
> 2. In the module I use the following
>
>
>
> *-js-compiler-option=--externs extrep.txt;
> -js-compiler-option+=--load-externs linkrep.txt;*
>
>
>
> The main application compiles successfully, I get a compilation error with
> the module
>
>
>
> "--load-externs" is not a valid option
> Sample usage: --compilation_level (-O) VAL --externs VAL --js VAL
> --js_output_file VAL --warning_level (-W) [QUIET | DEFAULT
> | VERBOSE]
> Run with --help for all options and details
> Internal error: java.lang.NullPointerException
> com.google.javascript.jscomp.CommandLineRunner.createOptions(CommandLineRunner.java:1809)org.apache.royale.compiler.utils.JSClosureCompilerWrapper$CompilerOptionsParser.getOptions(JSClosureCompilerWrapper.java:529)org.apache.royale.compiler.utils.JSClosureCompilerWrapper.<init>(JSClosureCompilerWrapper.java:77)org.apache.royale.compiler.internal.codegen.mxml.royale.MXMLRoyalePublisher.publish(MXMLRoyalePublisher.java:395)org.apache.royale.compiler.clients.M
>
>
>
>
>
>
>
> I don't think I am using this option correctly.
>
>
>
>
>
>
>
> .....
>
>
>
> On Tue, Jan 4, 2022 at 8:44 AM Alex Harui <ah...@adobe.com> wrote:
>
> I found some time to investigate. The -externs-report option is mostly
> working correctly, but other compiler changes are needed to try to avoid
> duplicate code in the module. I might have time to investigate more this
> coming weekend. It does appear that if we can correctly reference the
> app’s class from the module that it will work. The Closure Compiler let me
> compile the module after I externalize and avoid requires on everything in
> the main app’s externs report and -js link report, but the references in
> the module have collapsed packages which is either incorrect or aliases
> need to be created.
>
>
>
> However I think this new approach has a better chance of working than
> trying to match renaming tables.
>
>
>
> -Alex
>
>
>
> *From: *Alex Harui <ah...@adobe.com>
> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Date: *Monday, January 3, 2022 at 2:30 PM
> *To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Subject: *Re: Compiling Modules (was Re: Load time is very slow)
>
>
>
> The -externs-report option should be similar to the -link-report option.
> It takes a filename. The compiler should output the classes used in the JS
> compile into that file. To use externs, I think you don’t need to prevent
> renaming in the application as long as public variables are exported. I
> think you specify -externs-report when compiling the application.
>
>
>
> You may also need to output a -link-report from the application as well.
>
>
>
> I think you then specify the externs-report file as an -externs for the
> -js-compiler-options when compiling the module. And maybe also specify the
> -link-report output as a -load-externs in the same way it was used when
> compiling Flex modules. The goal for the module is, like Flex, to not have
> any classes in the module that exist in the main app. Then it doesn’t
> matter about class renaming within the release-mode JS file.
>
>
>
> HTH,
>
> -Alex
>
>
>
> *From: *Roman Isitua <ro...@gmail.com>
> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Date: *Monday, January 3, 2022 at 12:37 PM
> *To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Subject: *Re: Compiling Modules (was Re: Load time is very slow)
>
>
>
>
>
> I can confirm that classes are being renamed in both files.
>
>
>
> I have attempted your suggestion i.e. removing variable maps and property
> maps then use
>
> -externs-report;-export-public-symbols=true;-prevent-rename-public-symbols=true;
>
>
>
>
> I get the below error
>
>
>
> command line Error: configuration variable 'externs-report' expected 1
> argument(s), got 0.
>
>
>
> I cannot find any documentation on how to use the -externs-report
> argument. What does it do ? and what are the acceptable values ?
>
>
>
> Regards,
>
>
>
>
>
> On Sun, Jan 2, 2022 at 9:06 AM Alex Harui <ah...@adobe.com> wrote:
>
> Hi Roman,
>
>
>
> It might be more complicated. The settings are probably doing something
> since you reported that the error occurred in the app vs the module
> depending on the settings.
>
>
>
> I went back and looked at the original module example in
> examples/royale/ModuleExample and was surprised there weren’t more compiler
> settings. I thought we’d found a way to externalize the main app’s code
> for the module. Because if both the app and module have a copy of
> SimpleCSSValuesImpl or any other class that both JS files use, there could
> be issues as to which one gets loaded (maybe both) and what export aliases
> are pointing to. Sounds like changing settings affected whether the
> aliases pointed at module code vs app code.
>
>
>
> I thought we were using similar settings to what we used for SWF where the
> module would not contain a copy of SimpleCSSValuesImpl so it would use the
> one loaded by the main app, but I didn’t see those settings. We might need
> to make that work because otherwise I think static initializations won’t do
> the right thing. Or maybe we’ve figured out that it is simpler just to
> write defensive code that doesn’t get broken. But also, if the module has
> its own copy of code already loaded by the main app, that’s sort of a waste
> of bytes. Maybe there was a minification issue with not having the module
> link in classes already linked into the main app. I see an -externs-report
> option in the compiler but the example doesn’t seem to use it.
>
>
>
> You should be able to scan the JS files and see if a class is in both
> module and app and if it is getting renamed.
>
>
>
> I don’t know if I will have time to investigate further. The currently
> recommended options for modules involving variable maps and property maps
> may need to be abandoned in favor of externs and preventing renames.
>
>
>
> -Alex
>
>
>
>
>
> *From: *Roman Isitua <ro...@gmail.com>
> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Date: *Saturday, January 1, 2022 at 3:02 AM
> *To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Subject: *Re: Compiling Modules (was Re: Load time is very slow)
>
>
>
> Alex, thank you for your detailed analysis of the error log.
>
>
>
> I agree with you that the best strategy is to prevent renaming of
> public/exports used by the module. I have tried different options to
> prevent renaming
>
> It appears none of them stops this. From my observation, it appears that
> this default options below
>
>
>
>
> -export-public-symbols=true;-prevent-rename-public-symbols=true;-prevent-rename-public-instance-accessors=true;
>
>
>
> Only seem to affect the main application (main module) but have no effect
> on the other modules even though I ensured they were applied in
> their respective module pom. I came to this conclusion when I decided to
> turn set -prevent-rename-public-symbols=false
>
>
>
> I noticed that I got the same error but this time around in the main
> module.
>
>
>
> Uncaught TypeError: this.rb[(intermediate value).Kd(...)] is not a function
> at HN.iI.send (FrontEnd.js:970)
> at nI.EH.Ea (FrontEnd.js:880)
> at ON.q6 (FrontEnd.js:1815)
> at TN.L2 (FrontEnd.js:2034)
> at hF.Xf (FrontEnd.js:2063)
> at lF.kb (FrontEnd.js:1233)
> at lF.Vf (FrontEnd.js:1224)
> at cF.O (FrontEnd.js:659)
> at cF.M.w (FrontEnd.js:661)
> at gQ.mA.M (FrontEnd.js:241)
>
>
>
> FrontEnd.js maps to FrontEnd.as in my application and is the entry point
> of the application. This confirms that -prevent-rename-public-symbols=false
> has
>
> an effect on the main module but no effect on other modules even though
> they were applied in the respective module pom's.
>
>
>
> Maybe there are other options I am overlooking.
>
>
>
> On Sat, Jan 1, 2022 at 9:31 AM Alex Harui <ah...@adobe.com> wrote:
>
> In case it helps, the minification (variable renaming) mechanism is
> essentially guaranteed to cause problems in modules. The Closure Compiler
> basically takes variables, sees if it is worth renaming it, then gives it
> the name ‘a’, then ‘b’, and so-on, (it skips a few letters, IIRC), then
> moves on to ‘aa’, and ‘ab’, etc. The odds that the compiler will encounter
> the same variables in the same order when compiling an app and one or more
> modules is close to zero.
>
>
>
> I did some work to try to dump the mapping of the renamed variables in the
> main app and use that when compiling the modules. It was working for a
> while, then some code was added to the framework that started fooling the
> Closure Compiler. I spent some time trying to fix the Closure Compiler,
> but ran out of time. Meanwhile, Josh was adding more control over renaming
> so I moved on to other things.
>
>
>
> IMO, the best strategy to take would be to try to control what gets
> renamed. All public/exports from the app that are used by the module
> should not be renamed. That will definitely make the app and modules
> bigger, but unless the Closure Compiler folks become interested in
> runtime-loaded modules, it is challenging for the Royale compiler to allow
> aggressive renaming.
>
>
>
> I think what is going on with the exceptions below is that exporting
> doesn’t really prevent renaming. It only sets up an externally-visible
> alias to a renamed variable. Especially for static members. So it isn’t
> sufficient to export public variables, the code within the module must not
> let the Closure Compiler think that the intra-module references can be
> renamed, in this case, from SimpleCSSValuesImpl to QI
>
>
>
> I don’t know the renaming options we’ve added to the Royale Compiler, so I
> don’t know if there is an option to control that. I think there is a way
> to convince the Closure Compiler to not rename SimpleCSSValuesImpl because
> I’ve seen other class names not get renamed.
>
>
>
> HTH,
>
> -Alex
>
>
>
> *From: *Roman Isitua <ro...@gmail.com>
> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Date: *Friday, December 31, 2021 at 10:42 AM
> *To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Subject: *Re: Compiling Modules (was Re: Load time is very slow)
>
>
>
> I have tested on both. The error log is the same.
>
>
>
> I don't understand your second question. Kindly clarify ?
>
>
>
>
>
> I followed strictly the approach used for loading modules here in this
> example.
>
> This is the only method I know for loading modules. If there is another
> method please share.
>
>
>
>
>
>
> https://royale.apache.org/dividing-an-apache-royale-application-with-modules/
> <https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Froyale.apache.org%2Fdividing-an-apache-royale-application-with-modules%2F&data=04%7C01%7Caharui%40adobe.com%7C5c275d9d7520407e7b2008d9de5c6946%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637785311232021006%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=m7NN1lpP2a1My%2FybHDwUMPIRCwZ9OYWuFbFF9y%2B7cGo%3D&reserved=0>
>
>
>
> On Fri, 31 Dec 2021, 19:14 Maria Jose Esteve, <mj...@iest.com> wrote:
>
> @Roman, which branch did you compile the SDK from, ROYALE_INTERFACE_INFO
> or develop?
>
> Could you pass the Overview.mxml view to the main application? (to rule
> it out)
>
>
>
> Hiedra
>
>
>
> *De:* Roman Isitua <ro...@gmail.com>
> *Enviado el:* viernes, 31 de diciembre de 2021 17:56
> *Para:* users@royale.apache.org
> *Asunto:* Re: Compiling Modules (was Re: Load time is very slow)
>
>
>
> I have tried tracing where the errors are happening whenever I test the
> release version
>
> Uncaught TypeError: Ql.valuesImpl.init is not a function
> at Hr.Cr.um (Overview.js:846)
> at Function.ep.generateMXMLProperties (Overview.js:795)
> at Hr.Sp.generateMXMLAttributes (Overview.js:599)
> at new Hr (Overview.js:864)
> at PN.M.loadHandler (FrontEnd.js:2042)
> 9Overview.js:173 Uncaught TypeError: this.createElement is not a function
> at $B.V (Overview.js:173)
> at new $B (FrontEnd.js:2430)
> at EP.convert (FrontEnd.js:2430)
> at Zy (FrontEnd.js:261)
> at HTMLAnchorElement.Uy (FrontEnd.js:121)
> at HTMLAnchorElement.Sy.b (FrontEnd.js:117)
>
>
>
>
>
> The highlighted code in red is declared as follows in the Overview.mxml
> (maven module)
>
>
>
> <j:valuesImpl>
>
> <js:SimpleCSSValuesImpl/>
>
> </j:valuesImpl>
>
>
>
> The j:valuesImpl points to the following code in jewel Module.js
>
>
>
> /**
> * @nocollapse
> * @export
> * @type {org.apache.royale.core.IValuesImpl}
> */
> org.apache.royale.jewel.Module.prototype.valuesImpl;
>
>
> org.apache.royale.jewel.Module.prototype.set__valuesImpl = function(value)
> {
> org.apache.royale.core.ValuesManager.valuesImpl.init(this);
> };
>
>
>
>
>
> it appears this function is improperly renamed and whenever the app tries
> to load the module is not able to recognise it as a function.
>
>
>
> The same issue of improper function renaming is happening in the second
> error as well
>
>
>
> 9Overview.js:173 Uncaught TypeError: this.createElement is not a function
>
>
>
>
>
> On Thu, Dec 30, 2021 at 10:42 PM Roman Isitua <ro...@gmail.com>
> wrote:
>
>
>
> I have applied the js compiler option as follows
>
>
>
>
> <additionalCompilerOptions>-source-map=false;-compiler.show-binding-warnings=false;-js-default-initializers=true;-js-dynamic-access-unknown-members=true;
> -js-compiler-option=--variable_map_output_file
> gccvars.txt;-js-compiler-option+=--property_map_output_file gccprops.txt
> </additionalCompilerOptions>
>
>
>
>
>
> I get the same error as before when attempting to launch the jewel module.
>
>
>
> *Error! Filename not specified.*
>
>
>
>
>
> Same error trace.
>
>
>
> Uncaught TypeError: cm.valuesImpl.init is not a function
> at Rr.Mr.yl (Overview.js:786)
> at Function.iq.generateMXMLProperties (Overview.js:736)
> at Rr.hq.generateMXMLAttributes (Overview.js:546)
> at new Rr (Overview.js:804)
> at LN.J.loadHandler (FrontEnd.js:1967)
> FrontEnd.js:1640 Uncaught TypeError: M is not a function
> at oM.J.handleMouseOut (FrontEnd.js:1640)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:248)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> FrontEnd.js:1640 Uncaught TypeError: M is not a function
> at oM.J.handleMouseOver (FrontEnd.js:1640)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:248)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> FrontEnd.js:1640 Uncaught TypeError: M is not a function
> at oM.J.handleMouseOut (FrontEnd.js:1640)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:248)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> FrontEnd.js:1640 Uncaught TypeError: M is not a function
> at oM.J.handleMouseOver (FrontEnd.js:1640)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:248)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> FrontEnd.js:1640 Uncaught TypeError: M is not a function
> at oM.J.handleMouseOut (FrontEnd.js:1640)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:248)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> FrontEnd.js:1640 Uncaught TypeError: M is not a function
> at oM.J.handleMouseOver (FrontEnd.js:1640)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:248)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> FrontEnd.js:1640 Uncaught TypeError: M is not a function
> at oM.J.handleMouseOut (FrontEnd.js:1640)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:248)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> 3Overview.js:56 Uncaught TypeError: Cannot read properties of undefined
> (reading 'prototype')
> at P (Overview.js:56)
> at SG.convert (FrontEnd.js:904)
> at ny (FrontEnd.js:248)
> at HTMLElement.iy (FrontEnd.js:125)
> at HTMLElement.b (FrontEnd.js:121)
>
>
>
> On Thu, Dec 30, 2021 at 6:56 PM Harbs <ha...@gmail.com> wrote:
>
> 1. I’d get rid of the agressive minification options. It will likely cause
> issues. If you get it to work without those options, you can try to add
> them back in and see if it still works.
>
> 2. You seem to be missing the compiler options explained here:
> https://apache.github.io/royale-docs/features/modules#minification
> <https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapache.github.io%2Froyale-docs%2Ffeatures%2Fmodules%23minification&data=04%7C01%7Caharui%40adobe.com%7C5c275d9d7520407e7b2008d9de5c6946%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637785311232021006%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=sughdTG6l9sKu46%2FBaMb43FNOtVWDnVUrAYX0mN%2ForY%3D&reserved=0>
>
>
>
> For a pom, it would look something like this (adjust your paths to match
> your setup):
>
>
>
> Main app:
>
> <additionalCompilerOptions>-source-map=true;-js-compiler-option=--variable_map_output_file
> gccvars.txt;-js-compiler-option+=--property_map_output_file
> gccprops.txt</additionalCompilerOptions>
>
>
>
> Module:
>
> <additionalCompilerOptions>-source-map=true;-js-compiler-option=--variable_map_input_file
> ../../../../../MainApp/bin/js-release/gccvars.txt;-js-compiler-option+=--property_map_input_file
> ../../../../../MainApp/bin/js-release/gccprops.txt</additionalCompilerOptions>
>
>
>
> On Dec 30, 2021, at 7:43 PM, Roman Isitua <ro...@gmail.com> wrote:
>
>
>
> I think it will be better for me to share my pom's that way you can see
> all the compilation options used. The pom for the parent (FmClient2), the
> MainApp and one module (Overview) have been attached to this email.
>
>
>
>
>
> On Thu, Dec 30, 2021 at 6:22 PM Harbs <ha...@gmail.com> wrote:
>
> Roman, can you share your full compiler options?
>
>
>
> I decided to remove the below settings completely
> -export-public-symbols=false
> -prevent-rename-protected-symbols=false
> -prevent-rename-public-symbols=false
> -prevent-rename-internal-symbols=false
>
>
> I enabled the below settings
>
> -js-dynamic-access-unknown-members=true;
> -js-default-initializers=true
>
>
> The release version starts up
>
>
>
> Hiedra, that’s great!
>
>
>
> On Dec 30, 2021, at 7:15 PM, Roman Isitua <ro...@gmail.com> wrote:
>
>
>
>
>
> Yes. I am testing with the sdk compiled on branch ROYALE_INTERFACE_INFO
>
>
>
> On Thu, Dec 30, 2021 at 6:10 PM Maria Jose Esteve <mj...@iest.com>
> wrote:
>
> Roman, are you testing with the SDK compiled from the Harb branches,
> ROYALE_INTERFACE_INFO, or from develop?
>
>
>
> Hiedra
>
>
>
> *De:* Roman Isitua <ro...@gmail.com>
> *Enviado el:* jueves, 30 de diciembre de 2021 16:52
> *Para:* users@royale.apache.org
> *Asunto:* Re: Compiling Modules (was Re: Load time is very slow)
>
>
>
> I decided to remove the below settings completely
> -export-public-symbols=false
> -prevent-rename-protected-symbols=false
> -prevent-rename-public-symbols=false
> -prevent-rename-internal-symbols=false
>
>
> I enabled the below settings
>
> -js-dynamic-access-unknown-members=true;
> -js-default-initializers=true
>
>
> The release version starts up
>
>
>
>
>
>
>
> <image001.png>
>
>
>
>
>
> <image002.png>
>
>
>
> However, the moment I launch a module. I get the below error
>
>
>
> <image003.png>
>
>
>
>
>
> It appears to be failing when I launch the "*Overview*" module
> (by clicking the Overview side menu).
>
>
>
> So my current observation is that by retaining only two settings
>
>
>
> -js-dynamic-access-unknown-members=true;
> -js-default-initializers=true
>
>
>
> The release module starts up but the app fails whenever I launch a module.
>
>
>
> The smallest size settings in the documentation do not work. The app does
> not start up.
>
>
>
> -export-public-symbols=false
> -prevent-rename-protected-symbols=false
> -prevent-rename-public-symbols=false
> -prevent-rename-internal-symbols=false
>
>
>
>
>
>
>
> The error trace is below
>
>
>
>
>
> Uncaught TypeError: cm.valuesImpl.init is not a function
> at Wr.Rr.pl
> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwr.rr.pl%2F&data=04%7C01%7Caharui%40adobe.com%7C5c275d9d7520407e7b2008d9de5c6946%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637785311232021006%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=4jgUEC3liDgjAmMcQnKCQbIKGJ2AVMQK1KbDziQtULU%3D&reserved=0>
> (Overview.js:792)
> at Function.mq.generateMXMLProperties (Overview.js:743)
> at Wr.lq.generateMXMLAttributes (Overview.js:551)
> at new Wr (Overview.js:810)
> at QN.J.loadHandler (FrontEnd.js:1978)
> 3Overview.js:56 Uncaught TypeError: Cannot read properties of undefined
> (reading 'prototype')
> at P (Overview.js:56)
> at VG.convert (FrontEnd.js:910)
> at ny (FrontEnd.js:250)
> at HTMLElement.iy (FrontEnd.js:125)
> at HTMLElement.b (FrontEnd.js:121)
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOut (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOver (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOver @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOut (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOut @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOver (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOver @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOut (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOut @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOver (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOver @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOut (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOut @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOver (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOver @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOut (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOut @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
>
>
>
> On Thu, Dec 30, 2021 at 4:32 PM Roman Isitua <ro...@gmail.com>
> wrote:
>
> I get the same error even when I set
> the -js-dynamic-access-unknown-members=true;
>
>
>
> On Thu, Dec 30, 2021 at 4:24 PM Roman Isitua <ro...@gmail.com>
> wrote:
>
>
>
> Using the below settings,
>
> -export-public-symbols=false
> -prevent-rename-protected-symbols=false
> -prevent-rename-public-symbols=false
> -prevent-rename-internal-symbols=false
> -js-dynamic-access-unknown-members=false;
>
> -js-default-initializers=true
>
>
> Debug version runs fine. The release version does not start up
>
> <image004.png>
>
>
> I get the below errors
>
> Uncaught TypeError: Cannot read properties of undefined (reading 'apply')
> at KE.hm (FrontEnd.js:1600)
> at XE.M.Fb (FrontEnd.js:943)
> at XE.M.uh (FrontEnd.js:937)
> at FE.M.na
> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Ffe.m.na%2F&data=04%7C01%7Caharui%40adobe.com%7C5c275d9d7520407e7b2008d9de5c6946%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637785311232021006%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=buprASzTR3JHMDxx1PiCleGB3%2Fp13Yzj%2BJuApZ1H6HI%3D&reserved=0>
> (FrontEnd.js:497)
> at FE.M.v (FrontEnd.js:497)
> at dR.M.S (FrontEnd.js:213)
> at dR.Nz.S (FrontEnd.js:217)
> at dR.M.start (FrontEnd.js:1396)
> at index.html:45
> :8080/favicon.ico:1 Failed to load resource: the server responded with a
> status of 404 (Not Found)
>
>
>
>
>
> FrontEnd.js is the start up class for the application. i.e. It implements
> the Jewel application class.
>
>
>
>
>
>
>
> On Thu, Dec 30, 2021 at 3:19 PM Roman Isitua <ro...@gmail.com>
> wrote:
>
> Hi Harb,
>
>
>
> Thanks for your response. I have gone through the documentation. I will do
> my test again starting with the smallest size option and share my findings.
>
>
>
> Regards,
>
>
>
> On Thu, Dec 30, 2021 at 10:59 AM Harbs <ha...@gmail.com> wrote:
>
> Sorry for my deal in responding.
>
>
>
> Let’s take a step back.
>
>
>
> I’m not sure how you are compiling your modules. I just added some content
> to the module documentation page which explains what compiler options you
> need while compiling modules. (It still needs some editing.)
> https://apache.github.io/royale-docs/features/modules#minification
> <https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapache.github.io%2Froyale-docs%2Ffeatures%2Fmodules%23minification&data=04%7C01%7Caharui%40adobe.com%7C5c275d9d7520407e7b2008d9de5c6946%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637785311232021006%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=sughdTG6l9sKu46%2FBaMb43FNOtVWDnVUrAYX0mN%2ForY%3D&reserved=0>
>
>
>
> Are you using those options?
>
>
>
> On Dec 29, 2021, at 2:19 AM, Maria Jose Esteve <mj...@iest.com> wrote:
>
>
>
> Hi, Let me join you with these tests....
>
>
>
> @Harb, I have compiled the SDK from this branch, feature/ROYALE_INTERFACE_INFO,
> and when running in debug I get this error:
>
>
>
> Message on the PURGE CONSOLE is displayed:
>
>
>
> Cannot convert org.apache.royale.reflection.beads.ClassAliasBead to IBead
>
>
>
> Message in the IDE Window:
>
>
>
> Se produjo una excepción: TypeError: Cannot convert [object Object] to
> IBead
>
> at App.org.apache.royale.core.ElementWrapper.addBead (
> http://localhost:8080/WNetSuitePlus/org/apache/royale/core/ElementWrapper.js:114:11
> )
>
> at App.org.apache.royale.core.HTMLElementWrapper.addBead (
> http://localhost:8080/WNetSuitePlus/org/apache/royale/core/HTMLElementWrapper.js:43:65
> )
>
> at App.org.apache.royale.jewel.Application.start (
> http://localhost:8080/WNetSuitePlus/org/apache/royale/jewel/Application.js:246:10
> )
>
> at App.App_loadXML (http://localhost:8080/WNetSuitePlus/App.js:1681:25
> )
>
> at
> org.apache.royale.net.URLLoader.org.apache.royale.events.EventDispatcher.fireListeners
> (
> http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:97:23
> )
>
> at Function.goog.events.EventTarget.dispatchEventInternal_ (
> http://localhost:8080/WNetSuitePlus/library/closure/goog/events/eventtarget.js:381:26
> )
>
> at
> org.apache.royale.net.URLLoader.org.apache.royale.events.EventDispatcher.dispatchEvent
> (
> http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:72:37
> )
>
> at org.apache.royale.net.URLLoader.jsEventHandler (
> http://localhost:8080/WNetSuitePlus/org/apache/royale/net/URLLoader.js:169:12
> )
>
>
>
> Call stack:
>
>
>
> <image003.png>
>
>
>
> [INFO] Executing MXMLC in tool group Royale with args: [
>
>
> -load-config=D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\compile-app-config.xml,
>
> -js-default-initializers=true,
>
> -source-map=true,
>
> -js-dynamic-access-unknown-members=true,
>
>
> -keep-as3-metadata+=Inject,Dispatcher,EventHandler,Event,PostConstruct,PreDestroy,ViewAdded,ViewRemoved,Bindable,Transient,
>
> -keep-code-with-metadata=Inject,
>
> -show-binding-warnings=false,
>
> -export-public-symbols=false,
>
> -prevent-rename-protected-symbols=false,
>
> -prevent-rename-internal-symbols=false,
>
>
> -js-output=D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\javascript,
>
> -compiler.targets=JSRoyale,
>
>
> D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\src\main\royale\App.mxml
>
>
>
>
>
> The release execution does not change, the error is the same as before
> (SDK compilation from the develop branch):
>
>
>
> Se produjo una excepción: ReferenceError: Error #1065: Variable
> com.iest.winplusweb.models.MasterConfigSystemModel is not defined.
>
> at yR (http://localhost:8080/WPWebRelease/App.js:3605:1771)
>
> at Mya (http://localhost:8080/WPWebRelease/App.js:3343:365)
>
> at AR.J.usa (http://localhost:8080/WPWebRelease/App.js:434:441)
>
> at GFa.J.fromTypeDefinition (
> http://localhost:8080/WPWebRelease/App.js:5706:139)
>
> at Function.YT.getTypeDescriptor (
> http://localhost:8080/WPWebRelease/App.js:4570:820)
>
> at Function.fX.constructBean (
> http://localhost:8080/WPWebRelease/App.js:2336:472)
>
> at r$.J.initialize (http://localhost:8080/WPWebRelease/App.js:5041:66)
>
> at OW.J.init (http://localhost:8080/WPWebRelease/App.js:950:452)
>
> at OW.J.u (http://localhost:8080/WPWebRelease/App.js:951:454)
>
> at $$.J.addBead (http://localhost:8080/WPWebRelease/App.js:357:549)
>
>
>
> The main difference:
>
> project compiled from "SDK-develop" runs fine in js-debug and gives error
> in js-release and, compiled from "SDK-ROYALE_INTERFACE_INFO" does not
> launch because of conversion error.
>
>
>
> Hiedra
>
>
>
> *De:* Roman Isitua <ro...@gmail.com>
> *Enviado el:* martes, 28 de diciembre de 2021 15:55
> *Para:* users@royale.apache.org
> *Asunto:* Re: Load time is very slow
>
>
>
> @Harb
>
>
>
> I have checked out the feature/ROYALE_INTERFACE_INFO branch and compiled
> asjs and compiler. I have rebuilt my application with modules in release
> mode.
>
>
>
> I get the following error when I attempt to launch a module
>
>
>
>
>
> <image001.png>
>
>
>
>
>
> The module loads fine in debug mode
>
>
>
> <image002.png>
>
>
>
>
>
> Snippets of the log
>
>
>
> Overview.js:786 Uncaught TypeError: cm.valuesImpl.init is not a function
> at Rr.Mr.yl (Overview.js:786)
> at Function.iq.generateMXMLProperties (Overview.js:736)
> at Rr.hq.generateMXMLAttributes (Overview.js:546)
> at new Rr (Overview.js:804)
> at LN.J.loadHandler (FrontEnd.js:1967)
> Mr.yl @ Overview.js:786
> iq.generateMXMLProperties @ Overview.js:736
> hq.generateMXMLAttributes @ Overview.js:546
> Rr @ Overview.js:804
> J.loadHandler @ FrontEnd.js:1967
> load (async)
> LN.loadModule @ FrontEnd.js:1965
> dN.loadModule @ FrontEnd.js:2406
> LD.Un @ FrontEnd.js:1809
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:248
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
>
>
>
>
>
> I have attached the full log to this email.
>
>
>
>
>
>
>
>
>
> On Tue, Dec 28, 2021 at 2:51 PM Roman Isitua <ro...@gmail.com>
> wrote:
>
> Hi Maria,
>
>
>
> Prior to starting this mail discussion "Load time is very slow". I can
> confirm I have only been compiling in debug mode. My target\javascript\bin\
> only had js-debug. It was after I upgraded my royale sdk from 0.9.7 to
> 0.9.8 that I compiled in release mode.
>
>
>
>
>
>
>
> On Tue, Dec 28, 2021 at 2:24 PM Maria Jose Esteve <mj...@iest.com>
> wrote:
>
> Hi, @Roman, I think you are doing a double compile can it be? My times are
> the same as yours and I always compile in debug and release.
>
>
>
> Look at your target folder " target\javascript\bin\" and if you have two
> folders: js-debug and js-release you are compiling always double.
>
>
>
> In my case, the architecture of my project as well as the Maven
> compilation files (pom.xml) were provided by an external company (we didn't
> know anything about Maven or Royale at that time) and I understand that
> this formula was chosen to show us the options we had.
>
>
>
> A priori and without doing any test as Harb has done, I think that
> modularity gives us the advantage of compiling parts of the code once and
> not compiling them again if they are not modified. So far WITH MY
> COMPILATION TIMES, sometimes more than 1 minute, this is fundamental. But
> of course, now we have the problem of minification of the modules and it is
> really a serious problem because it is impossible for us to deploy in
> production.
>
>
>
> I will try to separate the compiación realese with a profile and if I
> succeed I will pass it to you @Roman.
>
>
>
> @Harb what do you mean by compiling the ROYALE_INTERFACE_INFO branch?
>
>
>
> Hiedra
>
>
>
> *De:* Harbs <ha...@gmail.com>
> *Enviado el:* lunes, 27 de diciembre de 2021 18:32
> *Para:* users@royale.apache.org
> *Asunto:* Re: Load time is very slow
>
>
>
> That doesn’t sound right.
>
>
>
> Are you sure you’re compiling debug and not release? That sounds like
> release build times.
>
>
>
> On Dec 27, 2021, at 3:31 PM, Roman Isitua <ro...@gmail.com> wrote:
>
>
>
> Wow ! You are using a workstation with a bleeding edge processor.
>
>
>
> I just compiled my app now. It took 44 seconds. (First compilation after
> ide start up.) Subsequently compilations are usually 19s to 20s.
>
>
>
> My application code base is very very small compared to yours. As we
> continue to add functionality, I expect the compile times to rise.
>
>
>
>
>
>
>
>
>
> <MainApp_pom.xml><Overview_pom.xml><fm_client2_pom.xml>
>
>
>
>
Re: Compiling Modules (was Re: Load time is very slow)
Posted by Alex Harui <ah...@adobe.com>.
HI Roman,
Let’s get the example to work first, then try your app.
Set the current directory to examples/royale/ModuleExample. Then run “mvn clean install”.
The appexterns.js file should end up in examples/royale/ModuleExample.
HTH,
-Alex
From: Roman Isitua <ro...@gmail.com>
Reply-To: "users@royale.apache.org" <us...@royale.apache.org>
Date: Sunday, January 23, 2022 at 2:38 AM
To: "users@royale.apache.org" <us...@royale.apache.org>
Subject: Re: Compiling Modules (was Re: Load time is very slow)
I pulled the latest changes to ReleaseModules branch and compiled the royale compiler and asjs respectively.
I have attempted compiling the project. The module compilation fails. The reason for the failure is that the appexterns.js file does not exist.
Troubleshooting further (I compiled the ModuleExample to check.) I realized that MainApp (i.e the main application does not produce appextern.js file. It only produces applinkreport-js.)
I am still troubleshooting why MainApp is not producing the appexterns.js file.
I copied the following settings from the ModuleExample and applied them to my pom.
<additionalCompilerOptions>-export-public-symbols=true;-externs-report=appexterns.js;-link-report=applinkreport.xml;-prevent-rename-object-keys=cssData,_bindings,ROYALE_CLASS_INFO,superClass_,qName</additionalCompilerOptions>
I have attached my MainApp.pom xml file.
On Sun, Jan 23, 2022 at 7:50 AM Alex Harui <ah...@adobe.com>> wrote:
I updated the royale-compiler and royale-asjs ReleaseModules branches. The examples/royale/ModuleExample now works for me in both Ant and Maven.
HTH,
-Alex
From: Alex Harui <ah...@adobe.com>>
Reply-To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Date: Friday, January 14, 2022 at 10:05 AM
To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Subject: Re: Compiling Modules (was Re: Load time is very slow)
Hi Roman,
I saw this and similar entries in the MainApp.xml that was attached:
<royale.export-public-symbols>-export-public-symbols=false;</royale.export-public-symbols>
It’s been a while since I used Maven, but we don’t want these options to be false.
I thought Maven picked up settings from src/main/config/compile-app-config.xml, but I guess not, so you’ll have to make the changes I made to the example’s src/main/config/compile-app-config.xml files in MainApp and Module in your pom.xml files.
I don’t know if I’ll have time this weekend to update the pom.xml files in the branch and test on Maven so hopefully you can figure it out.
Then, if it still doesn’t work, post the updated target/compile-app-config.xml files and figure out how to make the .JS files accessible so I can look at them.
Good luck, hope it works,
-Alex
From: Roman Isitua <ro...@gmail.com>>
Reply-To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Date: Friday, January 14, 2022 at 6:30 AM
To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Subject: Re: Compiling Modules (was Re: Load time is very slow)
Find my responses to your questions below
On Fri, Jan 14, 2022 at 12:19 AM Alex Harui <ah...@adobe.com>> wrote:
Hi Roman,
All prevent-rename options should be set to true or left to their default values. Looks like they are false in the main app.
I ensured that they are left to their defaults. They are not specified in the respective pom's for main app and module.
Please post the contents of the compile-app-config.xml files.
I have attached the compile-app-config.xml files for mainApp and module to this email.
Also, please make sure the bin/js-debug folders have been deleted before compiling.
I can confirm that this is always the case.
The compile-app-config.xml files contain the prevent-rename-object-keys setting in the example. You can specify it for your app in compile-app-config.xml as well.
I don't see this key setting applied in the compile-app-config.xml. I guess something is wrong. (See the attached files). I copied these files from the target folders that are generated after a successful build of main app and module respectively.
Then if it still doesn’t work, I’ll want to see the bin/js-release folders. You can attach them to a Git Issue if it doesn’t contain sensitive information or we can discuss other ways.
Please, what is the purpose of compile-app-config.xml ? I am just discovering that I have it in the MainApp project. it is located in src\main\config. I don't have it for the module.
I am using maven to build the project.
-Alex
From: Roman Isitua <ro...@gmail.com>>
Reply-To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Date: Thursday, January 13, 2022 at 2:50 PM
To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Subject: Re: Compiling Modules (was Re: Load time is very slow)
I have performed the test.
- I created a new branch locally called ReleaseModules for compiler and asjs respectively. (git branch ReleaseModules)
- check out to ReleaseModules for compiler and asjs respectively. (git checkout ReleaseModules)
- Then pulled from ReleaseModules. (git pull origin ReleaseModules) for compiler and asjs respectively.
- Then built the compiler and asjs respectively. (mvn clean install)
I am still unable to load the module. However the error is different from the previous test.
[cid:17e8678c227cb971f161]
The error log
Failed to load resource: the server responded with a status of 404 (Not Found)
Overview.js:1270 Uncaught TypeError: Cannot read properties of undefined (reading 'init')
at A_Aeh.A_A.g.h.v.$d.Qo (Overview.js:1270:627)
at Function.A_A.g.h.i.Ua.generateMXMLProperties (Overview.js:1196:316)
at A_Aeh.A_A.g.h.v.qc.generateMXMLAttributes (Overview.js:930:358)
at new A_Aeh (Overview.js:1296:431)
at MN.J.loadHandler (FrontEnd.js:1963:188)
Let me also share the compilation settings used. (correct me if I am wrong)
for main app
--- royale-maven-plugin:0.9.9-SNAPSHOT:compile-app (default-compile-app) @ MainApp ---
[INFO] Executing MXMLC in tool group Royale with args: [-load-config=C:\Users\nyemi\git\SpacioFM2\SpacioFM2\FmClient2\MainApp\target\compile-app-config.xml, -compiler.show-binding-warnings=false, -source-map=false, -js-default-initializers=true, -js-dynamic-access-unknown-members=true, -keep-as3-metadata+=Inject,Dispatcher,EventHandler,PostConstruct,PreDestroy,ViewAdded,ViewRemoved,Bindable,Transient, -js-output=C:\Users\nyemi\git\SpacioFM2\SpacioFM2\FmClient2\MainApp\target\javascript, -compiler.targets=JSRoyale, C:\Users\nyemi\git\SpacioFM2\SpacioFM2\FmClient2\MainApp\src\main\royale\FrontEnd.mxml]
for the module
[INFO] --- royale-maven-plugin:0.9.9-SNAPSHOT:compile-app (default-compile-app) @ Overview ---
[INFO] Executing MXMLC in tool group Royale with args: [-load-config=C:\Users\nyemi\git\SpacioFM2\SpacioFM2\FmClient2\Overview\target\compile-app-config.xml, -compiler.show-binding-warnings=false, -source-map=false, -js-default-initializers=true, -js-dynamic-access-unknown-members=true, -js-output=C:\Users\nyemi\git\SpacioFM2\SpacioFM2\FmClient2\Overview\target\javascript, -compiler.targets=JSRoyale, C:\Users\nyemi\git\SpacioFM2\SpacioFM2\FmClient2\Overview\src\main\royale\Overview.mxml]
I can't see the -prevent-rename-object-keys you mentioned being supplied automatically.
I have attached the pom's for the maven project so you can inspect the settings I used. I am not sure that I am applying them correctly.
MainApp.xml is the Main application. Overview.xml is the module. FmClient2.xml is the parent project.
Regards,
On Wed, Jan 12, 2022 at 9:04 AM Alex Harui <ah...@adobe.com>> wrote:
I pushed a ReleaseModules branch in royale-compiler and royale-asjs.
These changes cause the royale-asjs/examples/royale/ModuleExample release version to work.
The big challenge is that it turned out there is a fair amount of infrastructure that is not exported/public. The Language utilities, ROYALE_CLASS_INFO, the superclass_ property, cssData and others are going to get renamed. And thus renamed differently in the main app vs the module.
That’s why the current compiler’s strategy was to try to copy the renaming map from the main app to the module, but it didn’t always work. There seems to be a bug in the Closure Compiler that a set of externs causes the compiler to mis-handle package-paths. Also, it meant that the module contained its own copy of most of the infrastructure
The new compiler strategy is a bit more like the old Flex module strategy. The module tries to not contain a copy of code that already exists in the main app. Some of the goog/base.js stuff still gets copied though. Then because we avoid renaming more things, the module can reference the shared infrastructure in the main app.
The new compiler detects if what is being compiled is a loader of modules (because it is generating an externs-report) or is a Module and prevents renaming of Language APIs, modified base.js to not rename the superClass_ property used for calling super() and a few other things. In addition, I added a -prevent-rename-object-keys compiler option that works as a post-processor. It scans the js files being copied into bin/js-debug and adds quotes around things.
By making these changes, I was able to get the closure compiler to mis-handle the packages in a more predictable way, so another thing the new compiler does is post-process the output file to remove the incorrect package code. The incorrect code would re-init package paths like “org” or “org.apache.royale”.
Anyway, give it a try and see if it works. Probably we’ll find out there is more infrastructure that needs to not be renamed, but I think this has a better chance of working as we aren’t blocked by the compiler outputting bad code. Many months ago I tried to understand how why the Closure Compiler output bad code, but ran out of time.
Another difference is that the new compiler strategy doesn’t use custom overrides of Closure Compiler passes which was fragile and will make it easier to upgrade to newer versions of Closure Compiler.
HTH,
-Alex
From: Alex Harui <ah...@adobe.com>>
Reply-To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Date: Wednesday, January 5, 2022 at 9:53 AM
To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Subject: Re: Compiling Modules (was Re: Load time is very slow)
I probably won’t have time to really dig into this until the weekend. It is looking like the Closure Compiler gets confused when presented with externs for the same package tree that the module is generating new classes for.
-Alex
From: Roman Isitua <ro...@gmail.com>>
Reply-To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Date: Tuesday, January 4, 2022 at 1:57 PM
To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Subject: Re: Compiling Modules (was Re: Load time is very slow)
Okay. I knew I was missing something.
I will test again when the update for load-externs is available.
On Tue, Jan 4, 2022 at 6:02 PM Alex Harui <ah...@adobe.com>> wrote:
Essentially, -externs-report is for the Closure (JS) Compiler. -link-report and -load-externs (one leading ‘-‘) is for the Royale Compiler to tell the Royale Compiler what classes to feed to the Closure Compiler. Both contain the same data (the set of classes used in the main app), just formatted differently and used differently.
The –externs option for the Closure Compiler then tells the Closure Compiler not to look for classes in the set of files it is supposed to minify.
So, you have the right settings for the main app, but for the module, it should be:
-js-compiler-option=--externs extrep.txt; -load-externs linkrep.txt;
However, even that won’t work today, as the Royale Compiler is not handling -load-externs on the JS prep for Closure Compiler. I have some local changes to the compiler that mixes most of it, but am facing issues with how Closure handles package paths. If that can be resolved, then we have a good chance of things working.
-Alex
From: Roman Isitua <ro...@gmail.com>>
Reply-To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Date: Tuesday, January 4, 2022 at 12:39 AM
To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Subject: Re: Compiling Modules (was Re: Load time is very slow)
Thanks for the update.
I attempted the following:
1. In the main application, I use the following setting:
-externs-report=extrep.txt; -link-report=linkrep.txt;
2. In the module I use the following
-js-compiler-option=--externs extrep.txt; -js-compiler-option+=--load-externs linkrep.txt;
The main application compiles successfully, I get a compilation error with the module
"--load-externs" is not a valid option
Sample usage: --compilation_level (-O) VAL --externs VAL --js VAL --js_output_file VAL --warning_level (-W) [QUIET | DEFAULT
| VERBOSE]
Run with --help for all options and details
Internal error: java.lang.NullPointerException com.google.javascript.jscomp.CommandLineRunner.createOptions(CommandLineRunner.java:1809)org.apache.royale.compiler.utils.JSClosureCompilerWrapper$CompilerOptionsParser.getOptions(JSClosureCompilerWrapper.java:529)org.apache.royale.compiler.utils.JSClosureCompilerWrapper.<init>(JSClosureCompilerWrapper.java:77)org.apache.royale.compiler.internal.codegen.mxml.royale.MXMLRoyalePublisher.publish(MXMLRoyalePublisher.java:395)org.apache.royale.compiler.clients.M
I don't think I am using this option correctly.
.....
On Tue, Jan 4, 2022 at 8:44 AM Alex Harui <ah...@adobe.com>> wrote:
I found some time to investigate. The -externs-report option is mostly working correctly, but other compiler changes are needed to try to avoid duplicate code in the module. I might have time to investigate more this coming weekend. It does appear that if we can correctly reference the app’s class from the module that it will work. The Closure Compiler let me compile the module after I externalize and avoid requires on everything in the main app’s externs report and -js link report, but the references in the module have collapsed packages which is either incorrect or aliases need to be created.
However I think this new approach has a better chance of working than trying to match renaming tables.
-Alex
From: Alex Harui <ah...@adobe.com>>
Reply-To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Date: Monday, January 3, 2022 at 2:30 PM
To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Subject: Re: Compiling Modules (was Re: Load time is very slow)
The -externs-report option should be similar to the -link-report option. It takes a filename. The compiler should output the classes used in the JS compile into that file. To use externs, I think you don’t need to prevent renaming in the application as long as public variables are exported. I think you specify -externs-report when compiling the application.
You may also need to output a -link-report from the application as well.
I think you then specify the externs-report file as an -externs for the -js-compiler-options when compiling the module. And maybe also specify the -link-report output as a -load-externs in the same way it was used when compiling Flex modules. The goal for the module is, like Flex, to not have any classes in the module that exist in the main app. Then it doesn’t matter about class renaming within the release-mode JS file.
HTH,
-Alex
From: Roman Isitua <ro...@gmail.com>>
Reply-To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Date: Monday, January 3, 2022 at 12:37 PM
To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Subject: Re: Compiling Modules (was Re: Load time is very slow)
I can confirm that classes are being renamed in both files.
I have attempted your suggestion i.e. removing variable maps and property maps then use
-externs-report;-export-public-symbols=true;-prevent-rename-public-symbols=true;
I get the below error
command line Error: configuration variable 'externs-report' expected 1 argument(s), got 0.
I cannot find any documentation on how to use the -externs-report argument. What does it do ? and what are the acceptable values ?
Regards,
On Sun, Jan 2, 2022 at 9:06 AM Alex Harui <ah...@adobe.com>> wrote:
Hi Roman,
It might be more complicated. The settings are probably doing something since you reported that the error occurred in the app vs the module depending on the settings.
I went back and looked at the original module example in examples/royale/ModuleExample and was surprised there weren’t more compiler settings. I thought we’d found a way to externalize the main app’s code for the module. Because if both the app and module have a copy of SimpleCSSValuesImpl or any other class that both JS files use, there could be issues as to which one gets loaded (maybe both) and what export aliases are pointing to. Sounds like changing settings affected whether the aliases pointed at module code vs app code.
I thought we were using similar settings to what we used for SWF where the module would not contain a copy of SimpleCSSValuesImpl so it would use the one loaded by the main app, but I didn’t see those settings. We might need to make that work because otherwise I think static initializations won’t do the right thing. Or maybe we’ve figured out that it is simpler just to write defensive code that doesn’t get broken. But also, if the module has its own copy of code already loaded by the main app, that’s sort of a waste of bytes. Maybe there was a minification issue with not having the module link in classes already linked into the main app. I see an -externs-report option in the compiler but the example doesn’t seem to use it.
You should be able to scan the JS files and see if a class is in both module and app and if it is getting renamed.
I don’t know if I will have time to investigate further. The currently recommended options for modules involving variable maps and property maps may need to be abandoned in favor of externs and preventing renames.
-Alex
From: Roman Isitua <ro...@gmail.com>>
Reply-To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Date: Saturday, January 1, 2022 at 3:02 AM
To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Subject: Re: Compiling Modules (was Re: Load time is very slow)
Alex, thank you for your detailed analysis of the error log.
I agree with you that the best strategy is to prevent renaming of public/exports used by the module. I have tried different options to prevent renaming
It appears none of them stops this. From my observation, it appears that this default options below
-export-public-symbols=true;-prevent-rename-public-symbols=true;-prevent-rename-public-instance-accessors=true;
Only seem to affect the main application (main module) but have no effect on the other modules even though I ensured they were applied in their respective module pom. I came to this conclusion when I decided to turn set -prevent-rename-public-symbols=false
I noticed that I got the same error but this time around in the main module.
Uncaught TypeError: this.rb[(intermediate value).Kd(...)] is not a function
at HN.iI.send (FrontEnd.js:970)
at nI.EH.Ea (FrontEnd.js:880)
at ON.q6 (FrontEnd.js:1815)
at TN.L2 (FrontEnd.js:2034)
at hF.Xf (FrontEnd.js:2063)
at lF.kb (FrontEnd.js:1233)
at lF.Vf (FrontEnd.js:1224)
at cF.O (FrontEnd.js:659)
at cF.M.w (FrontEnd.js:661)
at gQ.mA.M (FrontEnd.js:241)
FrontEnd.js maps to FrontEnd.as in my application and is the entry point of the application. This confirms that -prevent-rename-public-symbols=false has
an effect on the main module but no effect on other modules even though they were applied in the respective module pom's.
Maybe there are other options I am overlooking.
On Sat, Jan 1, 2022 at 9:31 AM Alex Harui <ah...@adobe.com>> wrote:
In case it helps, the minification (variable renaming) mechanism is essentially guaranteed to cause problems in modules. The Closure Compiler basically takes variables, sees if it is worth renaming it, then gives it the name ‘a’, then ‘b’, and so-on, (it skips a few letters, IIRC), then moves on to ‘aa’, and ‘ab’, etc. The odds that the compiler will encounter the same variables in the same order when compiling an app and one or more modules is close to zero.
I did some work to try to dump the mapping of the renamed variables in the main app and use that when compiling the modules. It was working for a while, then some code was added to the framework that started fooling the Closure Compiler. I spent some time trying to fix the Closure Compiler, but ran out of time. Meanwhile, Josh was adding more control over renaming so I moved on to other things.
IMO, the best strategy to take would be to try to control what gets renamed. All public/exports from the app that are used by the module should not be renamed. That will definitely make the app and modules bigger, but unless the Closure Compiler folks become interested in runtime-loaded modules, it is challenging for the Royale compiler to allow aggressive renaming.
I think what is going on with the exceptions below is that exporting doesn’t really prevent renaming. It only sets up an externally-visible alias to a renamed variable. Especially for static members. So it isn’t sufficient to export public variables, the code within the module must not let the Closure Compiler think that the intra-module references can be renamed, in this case, from SimpleCSSValuesImpl to QI
I don’t know the renaming options we’ve added to the Royale Compiler, so I don’t know if there is an option to control that. I think there is a way to convince the Closure Compiler to not rename SimpleCSSValuesImpl because I’ve seen other class names not get renamed.
HTH,
-Alex
From: Roman Isitua <ro...@gmail.com>>
Reply-To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Date: Friday, December 31, 2021 at 10:42 AM
To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Subject: Re: Compiling Modules (was Re: Load time is very slow)
I have tested on both. The error log is the same.
I don't understand your second question. Kindly clarify ?
I followed strictly the approach used for loading modules here in this example.
This is the only method I know for loading modules. If there is another method please share.
https://royale.apache.org/dividing-an-apache-royale-application-with-modules/<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Froyale.apache.org%2Fdividing-an-apache-royale-application-with-modules%2F&data=04%7C01%7Caharui%40adobe.com%7C5c275d9d7520407e7b2008d9de5c6946%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637785311232021006%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=m7NN1lpP2a1My%2FybHDwUMPIRCwZ9OYWuFbFF9y%2B7cGo%3D&reserved=0>
On Fri, 31 Dec 2021, 19:14 Maria Jose Esteve, <mj...@iest.com>> wrote:
@Roman, which branch did you compile the SDK from, ROYALE_INTERFACE_INFO or develop?
Could you pass the Overview.mxml view to the main application? (to rule it out)
Hiedra
De: Roman Isitua <ro...@gmail.com>>
Enviado el: viernes, 31 de diciembre de 2021 17:56
Para: users@royale.apache.org<ma...@royale.apache.org>
Asunto: Re: Compiling Modules (was Re: Load time is very slow)
I have tried tracing where the errors are happening whenever I test the release version
Uncaught TypeError: Ql.valuesImpl.init is not a function
at Hr.Cr.um (Overview.js:846)
at Function.ep.generateMXMLProperties (Overview.js:795)
at Hr.Sp.generateMXMLAttributes (Overview.js:599)
at new Hr (Overview.js:864)
at PN.M.loadHandler (FrontEnd.js:2042)
9Overview.js:173 Uncaught TypeError: this.createElement is not a function
at $B.V (Overview.js:173)
at new $B (FrontEnd.js:2430)
at EP.convert (FrontEnd.js:2430)
at Zy (FrontEnd.js:261)
at HTMLAnchorElement.Uy (FrontEnd.js:121)
at HTMLAnchorElement.Sy.b (FrontEnd.js:117)
The highlighted code in red is declared as follows in the Overview.mxml (maven module)
<j:valuesImpl>
<js:SimpleCSSValuesImpl/>
</j:valuesImpl>
The j:valuesImpl points to the following code in jewel Module.js
/**
* @nocollapse
* @export
* @type {org.apache.royale.core.IValuesImpl}
*/
org.apache.royale.jewel.Module.prototype.valuesImpl;
org.apache.royale.jewel.Module.prototype.set__valuesImpl = function(value) {
org.apache.royale.core.ValuesManager.valuesImpl.init(this);
};
it appears this function is improperly renamed and whenever the app tries to load the module is not able to recognise it as a function.
The same issue of improper function renaming is happening in the second error as well
9Overview.js:173 Uncaught TypeError: this.createElement is not a function
On Thu, Dec 30, 2021 at 10:42 PM Roman Isitua <ro...@gmail.com>> wrote:
I have applied the js compiler option as follows
<additionalCompilerOptions>-source-map=false;-compiler.show-binding-warnings=false;-js-default-initializers=true;-js-dynamic-access-unknown-members=true;
-js-compiler-option=--variable_map_output_file gccvars.txt;-js-compiler-option+=--property_map_output_file gccprops.txt
</additionalCompilerOptions>
I get the same error as before when attempting to launch the jewel module.
Error! Filename not specified.
Same error trace.
Uncaught TypeError: cm.valuesImpl.init is not a function
at Rr.Mr.yl (Overview.js:786)
at Function.iq.generateMXMLProperties (Overview.js:736)
at Rr.hq.generateMXMLAttributes (Overview.js:546)
at new Rr (Overview.js:804)
at LN.J.loadHandler (FrontEnd.js:1967)
FrontEnd.js:1640 Uncaught TypeError: M is not a function
at oM.J.handleMouseOut (FrontEnd.js:1640)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:248)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
FrontEnd.js:1640 Uncaught TypeError: M is not a function
at oM.J.handleMouseOver (FrontEnd.js:1640)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:248)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
FrontEnd.js:1640 Uncaught TypeError: M is not a function
at oM.J.handleMouseOut (FrontEnd.js:1640)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:248)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
FrontEnd.js:1640 Uncaught TypeError: M is not a function
at oM.J.handleMouseOver (FrontEnd.js:1640)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:248)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
FrontEnd.js:1640 Uncaught TypeError: M is not a function
at oM.J.handleMouseOut (FrontEnd.js:1640)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:248)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
FrontEnd.js:1640 Uncaught TypeError: M is not a function
at oM.J.handleMouseOver (FrontEnd.js:1640)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:248)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
FrontEnd.js:1640 Uncaught TypeError: M is not a function
at oM.J.handleMouseOut (FrontEnd.js:1640)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:248)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
3Overview.js:56 Uncaught TypeError: Cannot read properties of undefined (reading 'prototype')
at P (Overview.js:56)
at SG.convert (FrontEnd.js:904)
at ny (FrontEnd.js:248)
at HTMLElement.iy (FrontEnd.js:125)
at HTMLElement.b (FrontEnd.js:121)
On Thu, Dec 30, 2021 at 6:56 PM Harbs <ha...@gmail.com>> wrote:
1. I’d get rid of the agressive minification options. It will likely cause issues. If you get it to work without those options, you can try to add them back in and see if it still works.
2. You seem to be missing the compiler options explained here: https://apache.github.io/royale-docs/features/modules#minification<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapache.github.io%2Froyale-docs%2Ffeatures%2Fmodules%23minification&data=04%7C01%7Caharui%40adobe.com%7C5c275d9d7520407e7b2008d9de5c6946%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637785311232021006%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=sughdTG6l9sKu46%2FBaMb43FNOtVWDnVUrAYX0mN%2ForY%3D&reserved=0>
For a pom, it would look something like this (adjust your paths to match your setup):
Main app:
<additionalCompilerOptions>-source-map=true;-js-compiler-option=--variable_map_output_file gccvars.txt;-js-compiler-option+=--property_map_output_file gccprops.txt</additionalCompilerOptions>
Module:
<additionalCompilerOptions>-source-map=true;-js-compiler-option=--variable_map_input_file ../../../../../MainApp/bin/js-release/gccvars.txt;-js-compiler-option+=--property_map_input_file ../../../../../MainApp/bin/js-release/gccprops.txt</additionalCompilerOptions>
On Dec 30, 2021, at 7:43 PM, Roman Isitua <ro...@gmail.com>> wrote:
I think it will be better for me to share my pom's that way you can see all the compilation options used. The pom for the parent (FmClient2), the MainApp and one module (Overview) have been attached to this email.
On Thu, Dec 30, 2021 at 6:22 PM Harbs <ha...@gmail.com>> wrote:
Roman, can you share your full compiler options?
I decided to remove the below settings completely
-export-public-symbols=false
-prevent-rename-protected-symbols=false
-prevent-rename-public-symbols=false
-prevent-rename-internal-symbols=false
I enabled the below settings
-js-dynamic-access-unknown-members=true;
-js-default-initializers=true
The release version starts up
Hiedra, that’s great!
On Dec 30, 2021, at 7:15 PM, Roman Isitua <ro...@gmail.com>> wrote:
Yes. I am testing with the sdk compiled on branch ROYALE_INTERFACE_INFO
On Thu, Dec 30, 2021 at 6:10 PM Maria Jose Esteve <mj...@iest.com>> wrote:
Roman, are you testing with the SDK compiled from the Harb branches, ROYALE_INTERFACE_INFO, or from develop?
Hiedra
De: Roman Isitua <ro...@gmail.com>>
Enviado el: jueves, 30 de diciembre de 2021 16:52
Para: users@royale.apache.org<ma...@royale.apache.org>
Asunto: Re: Compiling Modules (was Re: Load time is very slow)
I decided to remove the below settings completely
-export-public-symbols=false
-prevent-rename-protected-symbols=false
-prevent-rename-public-symbols=false
-prevent-rename-internal-symbols=false
I enabled the below settings
-js-dynamic-access-unknown-members=true;
-js-default-initializers=true
The release version starts up
<image001.png>
<image002.png>
However, the moment I launch a module. I get the below error
<image003.png>
It appears to be failing when I launch the "Overview" module (by clicking the Overview side menu).
So my current observation is that by retaining only two settings
-js-dynamic-access-unknown-members=true;
-js-default-initializers=true
The release module starts up but the app fails whenever I launch a module.
The smallest size settings in the documentation do not work. The app does not start up.
-export-public-symbols=false
-prevent-rename-protected-symbols=false
-prevent-rename-public-symbols=false
-prevent-rename-internal-symbols=false
The error trace is below
Uncaught TypeError: cm.valuesImpl.init is not a function
at Wr.Rr.pl<https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwr.rr.pl%2F&data=04%7C01%7Caharui%40adobe.com%7C5c275d9d7520407e7b2008d9de5c6946%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637785311232021006%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=4jgUEC3liDgjAmMcQnKCQbIKGJ2AVMQK1KbDziQtULU%3D&reserved=0> (Overview.js:792)
at Function.mq.generateMXMLProperties (Overview.js:743)
at Wr.lq.generateMXMLAttributes (Overview.js:551)
at new Wr (Overview.js:810)
at QN.J.loadHandler (FrontEnd.js:1978)
3Overview.js:56 Uncaught TypeError: Cannot read properties of undefined (reading 'prototype')
at P (Overview.js:56)
at VG.convert (FrontEnd.js:910)
at ny (FrontEnd.js:250)
at HTMLElement.iy (FrontEnd.js:125)
at HTMLElement.b (FrontEnd.js:121)
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOut (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOver (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOver @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOut (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOut @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOver (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOver @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOut (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOut @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOver (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOver @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOut (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOut @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOver (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOver @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOut (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOut @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
On Thu, Dec 30, 2021 at 4:32 PM Roman Isitua <ro...@gmail.com>> wrote:
I get the same error even when I set the -js-dynamic-access-unknown-members=true;
On Thu, Dec 30, 2021 at 4:24 PM Roman Isitua <ro...@gmail.com>> wrote:
Using the below settings,
-export-public-symbols=false
-prevent-rename-protected-symbols=false
-prevent-rename-public-symbols=false
-prevent-rename-internal-symbols=false
-js-dynamic-access-unknown-members=false;
-js-default-initializers=true
Debug version runs fine. The release version does not start up
<image004.png>
I get the below errors
Uncaught TypeError: Cannot read properties of undefined (reading 'apply')
at KE.hm (FrontEnd.js:1600)
at XE.M.Fb (FrontEnd.js:943)
at XE.M.uh (FrontEnd.js:937)
at FE.M.na<https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Ffe.m.na%2F&data=04%7C01%7Caharui%40adobe.com%7C5c275d9d7520407e7b2008d9de5c6946%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637785311232021006%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=buprASzTR3JHMDxx1PiCleGB3%2Fp13Yzj%2BJuApZ1H6HI%3D&reserved=0> (FrontEnd.js:497)
at FE.M.v (FrontEnd.js:497)
at dR.M.S (FrontEnd.js:213)
at dR.Nz.S (FrontEnd.js:217)
at dR.M.start (FrontEnd.js:1396)
at index.html:45
:8080/favicon.ico:1 Failed to load resource: the server responded with a status of 404 (Not Found)
FrontEnd.js is the start up class for the application. i.e. It implements the Jewel application class.
On Thu, Dec 30, 2021 at 3:19 PM Roman Isitua <ro...@gmail.com>> wrote:
Hi Harb,
Thanks for your response. I have gone through the documentation. I will do my test again starting with the smallest size option and share my findings.
Regards,
On Thu, Dec 30, 2021 at 10:59 AM Harbs <ha...@gmail.com>> wrote:
Sorry for my deal in responding.
Let’s take a step back.
I’m not sure how you are compiling your modules. I just added some content to the module documentation page which explains what compiler options you need while compiling modules. (It still needs some editing.) https://apache.github.io/royale-docs/features/modules#minification<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapache.github.io%2Froyale-docs%2Ffeatures%2Fmodules%23minification&data=04%7C01%7Caharui%40adobe.com%7C5c275d9d7520407e7b2008d9de5c6946%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637785311232021006%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=sughdTG6l9sKu46%2FBaMb43FNOtVWDnVUrAYX0mN%2ForY%3D&reserved=0>
Are you using those options?
On Dec 29, 2021, at 2:19 AM, Maria Jose Esteve <mj...@iest.com>> wrote:
Hi, Let me join you with these tests....
@Harb, I have compiled the SDK from this branch, feature/ROYALE_INTERFACE_INFO, and when running in debug I get this error:
Message on the PURGE CONSOLE is displayed:
Cannot convert org.apache.royale.reflection.beads.ClassAliasBead to IBead
Message in the IDE Window:
Se produjo una excepción: TypeError: Cannot convert [object Object] to IBead
at App.org.apache.royale.core.ElementWrapper.addBead (http://localhost:8080/WNetSuitePlus/org/apache/royale/core/ElementWrapper.js:114:11)
at App.org.apache.royale.core.HTMLElementWrapper.addBead (http://localhost:8080/WNetSuitePlus/org/apache/royale/core/HTMLElementWrapper.js:43:65)
at App.org.apache.royale.jewel.Application.start (http://localhost:8080/WNetSuitePlus/org/apache/royale/jewel/Application.js:246:10)
at App.App_loadXML (http://localhost:8080/WNetSuitePlus/App.js:1681:25)
at org.apache.royale.net.URLLoader.org.apache.royale.events.EventDispatcher.fireListeners (http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:97:23)
at Function.goog.events.EventTarget.dispatchEventInternal_ (http://localhost:8080/WNetSuitePlus/library/closure/goog/events/eventtarget.js:381:26)
at org.apache.royale.net.URLLoader.org.apache.royale.events.EventDispatcher.dispatchEvent (http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:72:37)
at org.apache.royale.net.URLLoader.jsEventHandler (http://localhost:8080/WNetSuitePlus/org/apache/royale/net/URLLoader.js:169:12)
Call stack:
<image003.png>
[INFO] Executing MXMLC in tool group Royale with args: [
-load-config=D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\compile-app-config.xml,
-js-default-initializers=true,
-source-map=true,
-js-dynamic-access-unknown-members=true,
-keep-as3-metadata+=Inject,Dispatcher,EventHandler,Event,PostConstruct,PreDestroy,ViewAdded,ViewRemoved,Bindable,Transient,
-keep-code-with-metadata=Inject,
-show-binding-warnings=false,
-export-public-symbols=false,
-prevent-rename-protected-symbols=false,
-prevent-rename-internal-symbols=false,
-js-output=D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\javascript,
-compiler.targets=JSRoyale,
D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\src\main\royale\App.mxml
The release execution does not change, the error is the same as before (SDK compilation from the develop branch):
Se produjo una excepción: ReferenceError: Error #1065: Variable com.iest.winplusweb.models.MasterConfigSystemModel is not defined.
at yR (http://localhost:8080/WPWebRelease/App.js:3605:1771)
at Mya (http://localhost:8080/WPWebRelease/App.js:3343:365)
at AR.J.usa (http://localhost:8080/WPWebRelease/App.js:434:441)
at GFa.J.fromTypeDefinition (http://localhost:8080/WPWebRelease/App.js:5706:139)
at Function.YT.getTypeDescriptor (http://localhost:8080/WPWebRelease/App.js:4570:820)
at Function.fX.constructBean (http://localhost:8080/WPWebRelease/App.js:2336:472)
at r$.J.initialize (http://localhost:8080/WPWebRelease/App.js:5041:66)
at OW.J.init (http://localhost:8080/WPWebRelease/App.js:950:452)
at OW.J.u (http://localhost:8080/WPWebRelease/App.js:951:454)
at $$.J.addBead (http://localhost:8080/WPWebRelease/App.js:357:549)
The main difference:
project compiled from "SDK-develop" runs fine in js-debug and gives error in js-release and, compiled from "SDK-ROYALE_INTERFACE_INFO" does not launch because of conversion error.
Hiedra
De: Roman Isitua <ro...@gmail.com>>
Enviado el: martes, 28 de diciembre de 2021 15:55
Para: users@royale.apache.org<ma...@royale.apache.org>
Asunto: Re: Load time is very slow
@Harb
I have checked out the feature/ROYALE_INTERFACE_INFO branch and compiled asjs and compiler. I have rebuilt my application with modules in release mode.
I get the following error when I attempt to launch a module
<image001.png>
The module loads fine in debug mode
<image002.png>
Snippets of the log
Overview.js:786 Uncaught TypeError: cm.valuesImpl.init is not a function
at Rr.Mr.yl (Overview.js:786)
at Function.iq.generateMXMLProperties (Overview.js:736)
at Rr.hq.generateMXMLAttributes (Overview.js:546)
at new Rr (Overview.js:804)
at LN.J.loadHandler (FrontEnd.js:1967)
Mr.yl @ Overview.js:786
iq.generateMXMLProperties @ Overview.js:736
hq.generateMXMLAttributes @ Overview.js:546
Rr @ Overview.js:804
J.loadHandler @ FrontEnd.js:1967
load (async)
LN.loadModule @ FrontEnd.js:1965
dN.loadModule @ FrontEnd.js:2406
LD.Un @ FrontEnd.js:1809
ny @ FrontEnd.js:123
ny @ FrontEnd.js:248
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
I have attached the full log to this email.
On Tue, Dec 28, 2021 at 2:51 PM Roman Isitua <ro...@gmail.com>> wrote:
Hi Maria,
Prior to starting this mail discussion "Load time is very slow". I can confirm I have only been compiling in debug mode. My target\javascript\bin\ only had js-debug. It was after I upgraded my royale sdk from 0.9.7 to 0.9.8 that I compiled in release mode.
On Tue, Dec 28, 2021 at 2:24 PM Maria Jose Esteve <mj...@iest.com>> wrote:
Hi, @Roman, I think you are doing a double compile can it be? My times are the same as yours and I always compile in debug and release.
Look at your target folder " target\javascript\bin\" and if you have two folders: js-debug and js-release you are compiling always double.
In my case, the architecture of my project as well as the Maven compilation files (pom.xml) were provided by an external company (we didn't know anything about Maven or Royale at that time) and I understand that this formula was chosen to show us the options we had.
A priori and without doing any test as Harb has done, I think that modularity gives us the advantage of compiling parts of the code once and not compiling them again if they are not modified. So far WITH MY COMPILATION TIMES, sometimes more than 1 minute, this is fundamental. But of course, now we have the problem of minification of the modules and it is really a serious problem because it is impossible for us to deploy in production.
I will try to separate the compiación realese with a profile and if I succeed I will pass it to you @Roman.
@Harb what do you mean by compiling the ROYALE_INTERFACE_INFO branch?
Hiedra
De: Harbs <ha...@gmail.com>>
Enviado el: lunes, 27 de diciembre de 2021 18:32
Para: users@royale.apache.org<ma...@royale.apache.org>
Asunto: Re: Load time is very slow
That doesn’t sound right.
Are you sure you’re compiling debug and not release? That sounds like release build times.
On Dec 27, 2021, at 3:31 PM, Roman Isitua <ro...@gmail.com>> wrote:
Wow ! You are using a workstation with a bleeding edge processor.
I just compiled my app now. It took 44 seconds. (First compilation after ide start up.) Subsequently compilations are usually 19s to 20s.
My application code base is very very small compared to yours. As we continue to add functionality, I expect the compile times to rise.
<MainApp_pom.xml><Overview_pom.xml><fm_client2_pom.xml>
Re: Compiling Modules (was Re: Load time is very slow)
Posted by Roman Isitua <ro...@gmail.com>.
I pulled the latest changes to ReleaseModules branch and compiled the
royale compiler and asjs respectively.
I have attempted compiling the project. The module compilation fails. The
reason for the failure is that the appexterns.js file does not exist.
Troubleshooting further (I compiled the ModuleExample to check.) I
realized that MainApp (i.e the main application does not produce appextern.js
file. It only produces applinkreport-js.)
I am still troubleshooting why MainApp is not producing the appexterns.js
file.
I copied the following settings from the ModuleExample and applied them to
my pom.
<additionalCompilerOptions>-export-public-symbols=true;-externs-report=appexterns.js;-link-report=applinkreport.xml;-prevent-rename-object-keys=cssData,_bindings,ROYALE_CLASS_INFO,superClass_,qName</additionalCompilerOptions>
I have attached my MainApp.pom xml file.
On Sun, Jan 23, 2022 at 7:50 AM Alex Harui <ah...@adobe.com> wrote:
> I updated the royale-compiler and royale-asjs ReleaseModules branches.
> The examples/royale/ModuleExample now works for me in both Ant and Maven.
>
>
>
> HTH,
>
> -Alex
>
>
>
> *From: *Alex Harui <ah...@adobe.com>
> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Date: *Friday, January 14, 2022 at 10:05 AM
> *To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Subject: *Re: Compiling Modules (was Re: Load time is very slow)
>
>
>
> Hi Roman,
>
>
>
> I saw this and similar entries in the MainApp.xml that was attached:
>
> *<royale.export-public-symbols>*-export-public-symbols=false;
> *</royale.export-public-symbols>*
>
>
>
> It’s been a while since I used Maven, but we don’t want these options to
> be false.
>
>
>
> I thought Maven picked up settings from
> src/main/config/compile-app-config.xml, but I guess not, so you’ll have to
> make the changes I made to the example’s
> src/main/config/compile-app-config.xml files in MainApp and Module in your
> pom.xml files.
>
>
>
> I don’t know if I’ll have time this weekend to update the pom.xml files in
> the branch and test on Maven so hopefully you can figure it out.
>
>
>
> Then, if it still doesn’t work, post the updated
> target/compile-app-config.xml files and figure out how to make the .JS
> files accessible so I can look at them.
>
>
>
> Good luck, hope it works,
>
> -Alex
>
>
>
> *From: *Roman Isitua <ro...@gmail.com>
> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Date: *Friday, January 14, 2022 at 6:30 AM
> *To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Subject: *Re: Compiling Modules (was Re: Load time is very slow)
>
>
>
>
>
> Find my responses to your questions below
>
>
>
> On Fri, Jan 14, 2022 at 12:19 AM Alex Harui <ah...@adobe.com> wrote:
>
> Hi Roman,
>
>
>
> All prevent-rename options should be set to true or left to their default
> values. Looks like they are false in the main app.
>
> I ensured that they are left to their defaults. They are not specified
> in the respective pom's for main app and module.
>
>
>
> Please post the contents of the compile-app-config.xml files.
>
> I have attached the compile-app-config.xml files for mainApp and module to
> this email.
>
>
>
> Also, please make sure the bin/js-debug folders have been deleted before
> compiling.
>
> I can confirm that this is always the case.
>
>
>
> The compile-app-config.xml files contain the prevent-rename-object-keys
> setting in the example. You can specify it for your app in
> compile-app-config.xml as well.
>
>
>
> I don't see this key setting applied in the compile-app-config.xml. I
> guess something is wrong. (See the attached files). I copied these files
> from the target folders that are generated after a successful build of main
> app and module respectively.
>
>
>
>
>
> Then if it still doesn’t work, I’ll want to see the bin/js-release
> folders. You can attach them to a Git Issue if it doesn’t contain
> sensitive information or we can discuss other ways.
>
>
>
>
>
> Please, what is the purpose of compile-app-config.xml ? I am just
> discovering that I have it in the MainApp project. it is located in
> src\main\config. I don't have it for the module.
>
> I am using maven to build the project.
>
>
>
>
>
>
>
> -Alex
>
>
>
> *From: *Roman Isitua <ro...@gmail.com>
> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Date: *Thursday, January 13, 2022 at 2:50 PM
> *To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Subject: *Re: Compiling Modules (was Re: Load time is very slow)
>
>
>
>
>
> I have performed the test.
>
> - I created a new branch locally called ReleaseModules for compiler and
> asjs respectively. (git branch ReleaseModules)
>
> - check out to ReleaseModules for compiler and asjs respectively. (git
> checkout ReleaseModules)
> - Then pulled from ReleaseModules. (git pull origin ReleaseModules) for
> compiler and asjs respectively.
> - Then built the compiler and asjs respectively. (mvn clean install)
>
> I am still unable to load the module. However the error is different from
> the previous test.
>
>
>
>
>
>
>
> The error log
>
>
>
> Failed to load resource: the server responded with a status of 404 (Not
> Found)
> Overview.js:1270 Uncaught TypeError: Cannot read properties of undefined
> (reading 'init')
> at A_Aeh.A_A.g.h.v.$d.Qo (Overview.js:1270:627)
> at Function.A_A.g.h.i.Ua.generateMXMLProperties (Overview.js:1196:316)
> at A_Aeh.A_A.g.h.v.qc.generateMXMLAttributes (Overview.js:930:358)
> at new A_Aeh (Overview.js:1296:431)
> at MN.J.loadHandler (FrontEnd.js:1963:188)
>
> Let me also share the compilation settings used. (correct me if I am wrong)
>
>
>
> for main app
>
>
>
> --- royale-maven-plugin:0.9.9-SNAPSHOT:compile-app (default-compile-app) @
> MainApp ---
> [INFO] Executing MXMLC in tool group Royale with args:
> [-load-config=C:\Users\nyemi\git\SpacioFM2\SpacioFM2\FmClient2\MainApp\target\compile-app-config.xml,
> -compiler.show-binding-warnings=false, -source-map=false,
> -js-default-initializers=true, -js-dynamic-access-unknown-members=true,
> -keep-as3-metadata+=Inject,Dispatcher,EventHandler,PostConstruct,PreDestroy,ViewAdded,ViewRemoved,Bindable,Transient,
> -js-output=C:\Users\nyemi\git\SpacioFM2\SpacioFM2\FmClient2\MainApp\target\javascript,
> -compiler.targets=JSRoyale,
> C:\Users\nyemi\git\SpacioFM2\SpacioFM2\FmClient2\MainApp\src\main\royale\FrontEnd.mxml]
>
>
>
>
>
> for the module
>
>
>
> [INFO] --- royale-maven-plugin:0.9.9-SNAPSHOT:compile-app
> (default-compile-app) @ Overview ---
> [INFO] Executing MXMLC in tool group Royale with args:
> [-load-config=C:\Users\nyemi\git\SpacioFM2\SpacioFM2\FmClient2\Overview\target\compile-app-config.xml,
> -compiler.show-binding-warnings=false, -source-map=false,
> -js-default-initializers=true, -js-dynamic-access-unknown-members=true,
> -js-output=C:\Users\nyemi\git\SpacioFM2\SpacioFM2\FmClient2\Overview\target\javascript,
> -compiler.targets=JSRoyale,
> C:\Users\nyemi\git\SpacioFM2\SpacioFM2\FmClient2\Overview\src\main\royale\Overview.mxml]
>
>
>
> I can't see the -prevent-rename-object-keys you mentioned being supplied
> automatically.
>
>
>
> I have attached the pom's for the maven project so you can inspect the
> settings I used. I am not sure that I am applying them correctly.
>
> MainApp.xml is the Main application. Overview.xml is the module.
> FmClient2.xml is the parent project.
>
>
>
> Regards,
>
>
>
>
>
> On Wed, Jan 12, 2022 at 9:04 AM Alex Harui <ah...@adobe.com> wrote:
>
> I pushed a ReleaseModules branch in royale-compiler and royale-asjs.
>
>
>
> These changes cause the royale-asjs/examples/royale/ModuleExample release
> version to work.
>
>
>
> The big challenge is that it turned out there is a fair amount of
> infrastructure that is not exported/public. The Language utilities,
> ROYALE_CLASS_INFO, the superclass_ property, cssData and others are going
> to get renamed. And thus renamed differently in the main app vs the module.
>
>
>
> That’s why the current compiler’s strategy was to try to copy the renaming
> map from the main app to the module, but it didn’t always work. There
> seems to be a bug in the Closure Compiler that a set of externs causes the
> compiler to mis-handle package-paths. Also, it meant that the module
> contained its own copy of most of the infrastructure
>
>
>
> The new compiler strategy is a bit more like the old Flex module
> strategy. The module tries to not contain a copy of code that already
> exists in the main app. Some of the goog/base.js stuff still gets copied
> though. Then because we avoid renaming more things, the module can
> reference the shared infrastructure in the main app.
>
>
>
> The new compiler detects if what is being compiled is a loader of modules
> (because it is generating an externs-report) or is a Module and prevents
> renaming of Language APIs, modified base.js to not rename the superClass_
> property used for calling super() and a few other things. In addition, I
> added a -prevent-rename-object-keys compiler option that works as a
> post-processor. It scans the js files being copied into bin/js-debug and
> adds quotes around things.
>
>
>
> By making these changes, I was able to get the closure compiler to
> mis-handle the packages in a more predictable way, so another thing the new
> compiler does is post-process the output file to remove the incorrect
> package code. The incorrect code would re-init package paths like “org” or
> “org.apache.royale”.
>
>
>
> Anyway, give it a try and see if it works. Probably we’ll find out there
> is more infrastructure that needs to not be renamed, but I think this has a
> better chance of working as we aren’t blocked by the compiler outputting
> bad code. Many months ago I tried to understand how why the Closure
> Compiler output bad code, but ran out of time.
>
>
>
> Another difference is that the new compiler strategy doesn’t use custom
> overrides of Closure Compiler passes which was fragile and will make it
> easier to upgrade to newer versions of Closure Compiler.
>
>
>
> HTH,
>
> -Alex
>
>
>
> *From: *Alex Harui <ah...@adobe.com>
> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Date: *Wednesday, January 5, 2022 at 9:53 AM
> *To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Subject: *Re: Compiling Modules (was Re: Load time is very slow)
>
>
>
> I probably won’t have time to really dig into this until the weekend. It
> is looking like the Closure Compiler gets confused when presented with
> externs for the same package tree that the module is generating new classes
> for.
>
>
>
> -Alex
>
>
>
> *From: *Roman Isitua <ro...@gmail.com>
> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Date: *Tuesday, January 4, 2022 at 1:57 PM
> *To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Subject: *Re: Compiling Modules (was Re: Load time is very slow)
>
>
>
> Okay. I knew I was missing something.
>
>
>
> I will test again when the update for load-externs is available.
>
>
>
> On Tue, Jan 4, 2022 at 6:02 PM Alex Harui <ah...@adobe.com> wrote:
>
> Essentially, -externs-report is for the Closure (JS) Compiler.
> -link-report and -load-externs (one leading ‘-‘) is for the Royale Compiler
> to tell the Royale Compiler what classes to feed to the Closure Compiler.
> Both contain the same data (the set of classes used in the main app), just
> formatted differently and used differently.
>
>
>
> The –externs option for the Closure Compiler then tells the Closure
> Compiler not to look for classes in the set of files it is supposed to
> minify.
>
>
>
> So, you have the right settings for the main app, but for the module, it
> should be:
>
> *-js-compiler-option=--externs extrep.txt; -load-externs linkrep.txt;*
>
>
>
> However, even that won’t work today, as the Royale Compiler is not
> handling -load-externs on the JS prep for Closure Compiler. I have some
> local changes to the compiler that mixes most of it, but am facing issues
> with how Closure handles package paths. If that can be resolved, then we
> have a good chance of things working.
>
>
>
> -Alex
>
>
>
> *From: *Roman Isitua <ro...@gmail.com>
> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Date: *Tuesday, January 4, 2022 at 12:39 AM
> *To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Subject: *Re: Compiling Modules (was Re: Load time is very slow)
>
>
>
> Thanks for the update.
>
>
>
> I attempted the following:
>
>
>
> 1. In the main application, I use the following setting:
>
> *-externs-report=extrep.txt; -link-report=linkrep.txt;*
>
>
>
> 2. In the module I use the following
>
>
>
> *-js-compiler-option=--externs extrep.txt;
> -js-compiler-option+=--load-externs linkrep.txt;*
>
>
>
> The main application compiles successfully, I get a compilation error with
> the module
>
>
>
> "--load-externs" is not a valid option
> Sample usage: --compilation_level (-O) VAL --externs VAL --js VAL
> --js_output_file VAL --warning_level (-W) [QUIET | DEFAULT
> | VERBOSE]
> Run with --help for all options and details
> Internal error: java.lang.NullPointerException
> com.google.javascript.jscomp.CommandLineRunner.createOptions(CommandLineRunner.java:1809)org.apache.royale.compiler.utils.JSClosureCompilerWrapper$CompilerOptionsParser.getOptions(JSClosureCompilerWrapper.java:529)org.apache.royale.compiler.utils.JSClosureCompilerWrapper.<init>(JSClosureCompilerWrapper.java:77)org.apache.royale.compiler.internal.codegen.mxml.royale.MXMLRoyalePublisher.publish(MXMLRoyalePublisher.java:395)org.apache.royale.compiler.clients.M
>
>
>
>
>
>
>
> I don't think I am using this option correctly.
>
>
>
>
>
>
>
> .....
>
>
>
> On Tue, Jan 4, 2022 at 8:44 AM Alex Harui <ah...@adobe.com> wrote:
>
> I found some time to investigate. The -externs-report option is mostly
> working correctly, but other compiler changes are needed to try to avoid
> duplicate code in the module. I might have time to investigate more this
> coming weekend. It does appear that if we can correctly reference the
> app’s class from the module that it will work. The Closure Compiler let me
> compile the module after I externalize and avoid requires on everything in
> the main app’s externs report and -js link report, but the references in
> the module have collapsed packages which is either incorrect or aliases
> need to be created.
>
>
>
> However I think this new approach has a better chance of working than
> trying to match renaming tables.
>
>
>
> -Alex
>
>
>
> *From: *Alex Harui <ah...@adobe.com>
> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Date: *Monday, January 3, 2022 at 2:30 PM
> *To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Subject: *Re: Compiling Modules (was Re: Load time is very slow)
>
>
>
> The -externs-report option should be similar to the -link-report option.
> It takes a filename. The compiler should output the classes used in the JS
> compile into that file. To use externs, I think you don’t need to prevent
> renaming in the application as long as public variables are exported. I
> think you specify -externs-report when compiling the application.
>
>
>
> You may also need to output a -link-report from the application as well.
>
>
>
> I think you then specify the externs-report file as an -externs for the
> -js-compiler-options when compiling the module. And maybe also specify the
> -link-report output as a -load-externs in the same way it was used when
> compiling Flex modules. The goal for the module is, like Flex, to not have
> any classes in the module that exist in the main app. Then it doesn’t
> matter about class renaming within the release-mode JS file.
>
>
>
> HTH,
>
> -Alex
>
>
>
> *From: *Roman Isitua <ro...@gmail.com>
> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Date: *Monday, January 3, 2022 at 12:37 PM
> *To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Subject: *Re: Compiling Modules (was Re: Load time is very slow)
>
>
>
>
>
> I can confirm that classes are being renamed in both files.
>
>
>
> I have attempted your suggestion i.e. removing variable maps and property
> maps then use
>
> -externs-report;-export-public-symbols=true;-prevent-rename-public-symbols=true;
>
>
>
>
> I get the below error
>
>
>
> command line Error: configuration variable 'externs-report' expected 1
> argument(s), got 0.
>
>
>
> I cannot find any documentation on how to use the -externs-report
> argument. What does it do ? and what are the acceptable values ?
>
>
>
> Regards,
>
>
>
>
>
> On Sun, Jan 2, 2022 at 9:06 AM Alex Harui <ah...@adobe.com> wrote:
>
> Hi Roman,
>
>
>
> It might be more complicated. The settings are probably doing something
> since you reported that the error occurred in the app vs the module
> depending on the settings.
>
>
>
> I went back and looked at the original module example in
> examples/royale/ModuleExample and was surprised there weren’t more compiler
> settings. I thought we’d found a way to externalize the main app’s code
> for the module. Because if both the app and module have a copy of
> SimpleCSSValuesImpl or any other class that both JS files use, there could
> be issues as to which one gets loaded (maybe both) and what export aliases
> are pointing to. Sounds like changing settings affected whether the
> aliases pointed at module code vs app code.
>
>
>
> I thought we were using similar settings to what we used for SWF where the
> module would not contain a copy of SimpleCSSValuesImpl so it would use the
> one loaded by the main app, but I didn’t see those settings. We might need
> to make that work because otherwise I think static initializations won’t do
> the right thing. Or maybe we’ve figured out that it is simpler just to
> write defensive code that doesn’t get broken. But also, if the module has
> its own copy of code already loaded by the main app, that’s sort of a waste
> of bytes. Maybe there was a minification issue with not having the module
> link in classes already linked into the main app. I see an -externs-report
> option in the compiler but the example doesn’t seem to use it.
>
>
>
> You should be able to scan the JS files and see if a class is in both
> module and app and if it is getting renamed.
>
>
>
> I don’t know if I will have time to investigate further. The currently
> recommended options for modules involving variable maps and property maps
> may need to be abandoned in favor of externs and preventing renames.
>
>
>
> -Alex
>
>
>
>
>
> *From: *Roman Isitua <ro...@gmail.com>
> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Date: *Saturday, January 1, 2022 at 3:02 AM
> *To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Subject: *Re: Compiling Modules (was Re: Load time is very slow)
>
>
>
> Alex, thank you for your detailed analysis of the error log.
>
>
>
> I agree with you that the best strategy is to prevent renaming of
> public/exports used by the module. I have tried different options to
> prevent renaming
>
> It appears none of them stops this. From my observation, it appears that
> this default options below
>
>
>
>
> -export-public-symbols=true;-prevent-rename-public-symbols=true;-prevent-rename-public-instance-accessors=true;
>
>
>
> Only seem to affect the main application (main module) but have no effect
> on the other modules even though I ensured they were applied in
> their respective module pom. I came to this conclusion when I decided to
> turn set -prevent-rename-public-symbols=false
>
>
>
> I noticed that I got the same error but this time around in the main
> module.
>
>
>
> Uncaught TypeError: this.rb[(intermediate value).Kd(...)] is not a function
> at HN.iI.send (FrontEnd.js:970)
> at nI.EH.Ea (FrontEnd.js:880)
> at ON.q6 (FrontEnd.js:1815)
> at TN.L2 (FrontEnd.js:2034)
> at hF.Xf (FrontEnd.js:2063)
> at lF.kb (FrontEnd.js:1233)
> at lF.Vf (FrontEnd.js:1224)
> at cF.O (FrontEnd.js:659)
> at cF.M.w (FrontEnd.js:661)
> at gQ.mA.M (FrontEnd.js:241)
>
>
>
> FrontEnd.js maps to FrontEnd.as in my application and is the entry point
> of the application. This confirms that -prevent-rename-public-symbols=false
> has
>
> an effect on the main module but no effect on other modules even though
> they were applied in the respective module pom's.
>
>
>
> Maybe there are other options I am overlooking.
>
>
>
> On Sat, Jan 1, 2022 at 9:31 AM Alex Harui <ah...@adobe.com> wrote:
>
> In case it helps, the minification (variable renaming) mechanism is
> essentially guaranteed to cause problems in modules. The Closure Compiler
> basically takes variables, sees if it is worth renaming it, then gives it
> the name ‘a’, then ‘b’, and so-on, (it skips a few letters, IIRC), then
> moves on to ‘aa’, and ‘ab’, etc. The odds that the compiler will encounter
> the same variables in the same order when compiling an app and one or more
> modules is close to zero.
>
>
>
> I did some work to try to dump the mapping of the renamed variables in the
> main app and use that when compiling the modules. It was working for a
> while, then some code was added to the framework that started fooling the
> Closure Compiler. I spent some time trying to fix the Closure Compiler,
> but ran out of time. Meanwhile, Josh was adding more control over renaming
> so I moved on to other things.
>
>
>
> IMO, the best strategy to take would be to try to control what gets
> renamed. All public/exports from the app that are used by the module
> should not be renamed. That will definitely make the app and modules
> bigger, but unless the Closure Compiler folks become interested in
> runtime-loaded modules, it is challenging for the Royale compiler to allow
> aggressive renaming.
>
>
>
> I think what is going on with the exceptions below is that exporting
> doesn’t really prevent renaming. It only sets up an externally-visible
> alias to a renamed variable. Especially for static members. So it isn’t
> sufficient to export public variables, the code within the module must not
> let the Closure Compiler think that the intra-module references can be
> renamed, in this case, from SimpleCSSValuesImpl to QI
>
>
>
> I don’t know the renaming options we’ve added to the Royale Compiler, so I
> don’t know if there is an option to control that. I think there is a way
> to convince the Closure Compiler to not rename SimpleCSSValuesImpl because
> I’ve seen other class names not get renamed.
>
>
>
> HTH,
>
> -Alex
>
>
>
> *From: *Roman Isitua <ro...@gmail.com>
> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Date: *Friday, December 31, 2021 at 10:42 AM
> *To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Subject: *Re: Compiling Modules (was Re: Load time is very slow)
>
>
>
> I have tested on both. The error log is the same.
>
>
>
> I don't understand your second question. Kindly clarify ?
>
>
>
>
>
> I followed strictly the approach used for loading modules here in this
> example.
>
> This is the only method I know for loading modules. If there is another
> method please share.
>
>
>
>
>
>
> https://royale.apache.org/dividing-an-apache-royale-application-with-modules/
> <https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Froyale.apache.org%2Fdividing-an-apache-royale-application-with-modules%2F&data=04%7C01%7Caharui%40adobe.com%7C8d6c8c929bca4c1a021508d9d7886a40%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637777803175756125%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=vwqT3zwtSTn2Ak7QU%2BmVloKLXaIv145LpLG8PByzWJU%3D&reserved=0>
>
>
>
> On Fri, 31 Dec 2021, 19:14 Maria Jose Esteve, <mj...@iest.com> wrote:
>
> @Roman, which branch did you compile the SDK from, ROYALE_INTERFACE_INFO
> or develop?
>
> Could you pass the Overview.mxml view to the main application? (to rule
> it out)
>
>
>
> Hiedra
>
>
>
> *De:* Roman Isitua <ro...@gmail.com>
> *Enviado el:* viernes, 31 de diciembre de 2021 17:56
> *Para:* users@royale.apache.org
> *Asunto:* Re: Compiling Modules (was Re: Load time is very slow)
>
>
>
> I have tried tracing where the errors are happening whenever I test the
> release version
>
> Uncaught TypeError: Ql.valuesImpl.init is not a function
> at Hr.Cr.um (Overview.js:846)
> at Function.ep.generateMXMLProperties (Overview.js:795)
> at Hr.Sp.generateMXMLAttributes (Overview.js:599)
> at new Hr (Overview.js:864)
> at PN.M.loadHandler (FrontEnd.js:2042)
> 9Overview.js:173 Uncaught TypeError: this.createElement is not a function
> at $B.V (Overview.js:173)
> at new $B (FrontEnd.js:2430)
> at EP.convert (FrontEnd.js:2430)
> at Zy (FrontEnd.js:261)
> at HTMLAnchorElement.Uy (FrontEnd.js:121)
> at HTMLAnchorElement.Sy.b (FrontEnd.js:117)
>
>
>
>
>
> The highlighted code in red is declared as follows in the Overview.mxml
> (maven module)
>
>
>
> <j:valuesImpl>
>
> <js:SimpleCSSValuesImpl/>
>
> </j:valuesImpl>
>
>
>
> The j:valuesImpl points to the following code in jewel Module.js
>
>
>
> /**
> * @nocollapse
> * @export
> * @type {org.apache.royale.core.IValuesImpl}
> */
> org.apache.royale.jewel.Module.prototype.valuesImpl;
>
>
> org.apache.royale.jewel.Module.prototype.set__valuesImpl = function(value)
> {
> org.apache.royale.core.ValuesManager.valuesImpl.init(this);
> };
>
>
>
>
>
> it appears this function is improperly renamed and whenever the app tries
> to load the module is not able to recognise it as a function.
>
>
>
> The same issue of improper function renaming is happening in the second
> error as well
>
>
>
> 9Overview.js:173 Uncaught TypeError: this.createElement is not a function
>
>
>
>
>
> On Thu, Dec 30, 2021 at 10:42 PM Roman Isitua <ro...@gmail.com>
> wrote:
>
>
>
> I have applied the js compiler option as follows
>
>
>
>
> <additionalCompilerOptions>-source-map=false;-compiler.show-binding-warnings=false;-js-default-initializers=true;-js-dynamic-access-unknown-members=true;
> -js-compiler-option=--variable_map_output_file
> gccvars.txt;-js-compiler-option+=--property_map_output_file gccprops.txt
> </additionalCompilerOptions>
>
>
>
>
>
> I get the same error as before when attempting to launch the jewel module.
>
>
>
> *Error! Filename not specified.*
>
>
>
>
>
> Same error trace.
>
>
>
> Uncaught TypeError: cm.valuesImpl.init is not a function
> at Rr.Mr.yl (Overview.js:786)
> at Function.iq.generateMXMLProperties (Overview.js:736)
> at Rr.hq.generateMXMLAttributes (Overview.js:546)
> at new Rr (Overview.js:804)
> at LN.J.loadHandler (FrontEnd.js:1967)
> FrontEnd.js:1640 Uncaught TypeError: M is not a function
> at oM.J.handleMouseOut (FrontEnd.js:1640)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:248)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> FrontEnd.js:1640 Uncaught TypeError: M is not a function
> at oM.J.handleMouseOver (FrontEnd.js:1640)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:248)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> FrontEnd.js:1640 Uncaught TypeError: M is not a function
> at oM.J.handleMouseOut (FrontEnd.js:1640)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:248)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> FrontEnd.js:1640 Uncaught TypeError: M is not a function
> at oM.J.handleMouseOver (FrontEnd.js:1640)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:248)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> FrontEnd.js:1640 Uncaught TypeError: M is not a function
> at oM.J.handleMouseOut (FrontEnd.js:1640)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:248)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> FrontEnd.js:1640 Uncaught TypeError: M is not a function
> at oM.J.handleMouseOver (FrontEnd.js:1640)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:248)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> FrontEnd.js:1640 Uncaught TypeError: M is not a function
> at oM.J.handleMouseOut (FrontEnd.js:1640)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:248)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> 3Overview.js:56 Uncaught TypeError: Cannot read properties of undefined
> (reading 'prototype')
> at P (Overview.js:56)
> at SG.convert (FrontEnd.js:904)
> at ny (FrontEnd.js:248)
> at HTMLElement.iy (FrontEnd.js:125)
> at HTMLElement.b (FrontEnd.js:121)
>
>
>
> On Thu, Dec 30, 2021 at 6:56 PM Harbs <ha...@gmail.com> wrote:
>
> 1. I’d get rid of the agressive minification options. It will likely cause
> issues. If you get it to work without those options, you can try to add
> them back in and see if it still works.
>
> 2. You seem to be missing the compiler options explained here:
> https://apache.github.io/royale-docs/features/modules#minification
> <https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapache.github.io%2Froyale-docs%2Ffeatures%2Fmodules%23minification&data=04%7C01%7Caharui%40adobe.com%7C8d6c8c929bca4c1a021508d9d7886a40%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637777803175756125%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=d2bmQw9WoJJ41DlrzBNMGnr0GoBmVNAbZcmPYPXXigQ%3D&reserved=0>
>
>
>
> For a pom, it would look something like this (adjust your paths to match
> your setup):
>
>
>
> Main app:
>
> <additionalCompilerOptions>-source-map=true;-js-compiler-option=--variable_map_output_file
> gccvars.txt;-js-compiler-option+=--property_map_output_file
> gccprops.txt</additionalCompilerOptions>
>
>
>
> Module:
>
> <additionalCompilerOptions>-source-map=true;-js-compiler-option=--variable_map_input_file
> ../../../../../MainApp/bin/js-release/gccvars.txt;-js-compiler-option+=--property_map_input_file
> ../../../../../MainApp/bin/js-release/gccprops.txt</additionalCompilerOptions>
>
>
>
> On Dec 30, 2021, at 7:43 PM, Roman Isitua <ro...@gmail.com> wrote:
>
>
>
> I think it will be better for me to share my pom's that way you can see
> all the compilation options used. The pom for the parent (FmClient2), the
> MainApp and one module (Overview) have been attached to this email.
>
>
>
>
>
> On Thu, Dec 30, 2021 at 6:22 PM Harbs <ha...@gmail.com> wrote:
>
> Roman, can you share your full compiler options?
>
>
>
> I decided to remove the below settings completely
> -export-public-symbols=false
> -prevent-rename-protected-symbols=false
> -prevent-rename-public-symbols=false
> -prevent-rename-internal-symbols=false
>
>
> I enabled the below settings
>
> -js-dynamic-access-unknown-members=true;
> -js-default-initializers=true
>
>
> The release version starts up
>
>
>
> Hiedra, that’s great!
>
>
>
> On Dec 30, 2021, at 7:15 PM, Roman Isitua <ro...@gmail.com> wrote:
>
>
>
>
>
> Yes. I am testing with the sdk compiled on branch ROYALE_INTERFACE_INFO
>
>
>
> On Thu, Dec 30, 2021 at 6:10 PM Maria Jose Esteve <mj...@iest.com>
> wrote:
>
> Roman, are you testing with the SDK compiled from the Harb branches,
> ROYALE_INTERFACE_INFO, or from develop?
>
>
>
> Hiedra
>
>
>
> *De:* Roman Isitua <ro...@gmail.com>
> *Enviado el:* jueves, 30 de diciembre de 2021 16:52
> *Para:* users@royale.apache.org
> *Asunto:* Re: Compiling Modules (was Re: Load time is very slow)
>
>
>
> I decided to remove the below settings completely
> -export-public-symbols=false
> -prevent-rename-protected-symbols=false
> -prevent-rename-public-symbols=false
> -prevent-rename-internal-symbols=false
>
>
> I enabled the below settings
>
> -js-dynamic-access-unknown-members=true;
> -js-default-initializers=true
>
>
> The release version starts up
>
>
>
>
>
>
>
> <image001.png>
>
>
>
>
>
> <image002.png>
>
>
>
> However, the moment I launch a module. I get the below error
>
>
>
> <image003.png>
>
>
>
>
>
> It appears to be failing when I launch the "*Overview*" module
> (by clicking the Overview side menu).
>
>
>
> So my current observation is that by retaining only two settings
>
>
>
> -js-dynamic-access-unknown-members=true;
> -js-default-initializers=true
>
>
>
> The release module starts up but the app fails whenever I launch a module.
>
>
>
> The smallest size settings in the documentation do not work. The app does
> not start up.
>
>
>
> -export-public-symbols=false
> -prevent-rename-protected-symbols=false
> -prevent-rename-public-symbols=false
> -prevent-rename-internal-symbols=false
>
>
>
>
>
>
>
> The error trace is below
>
>
>
>
>
> Uncaught TypeError: cm.valuesImpl.init is not a function
> at Wr.Rr.pl
> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwr.rr.pl%2F&data=04%7C01%7Caharui%40adobe.com%7C8d6c8c929bca4c1a021508d9d7886a40%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637777803175756125%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=WA5E1tARmJ%2FYUPxrROjA8XNebrEzJu5LQU7lvI9MOAQ%3D&reserved=0>
> (Overview.js:792)
> at Function.mq.generateMXMLProperties (Overview.js:743)
> at Wr.lq.generateMXMLAttributes (Overview.js:551)
> at new Wr (Overview.js:810)
> at QN.J.loadHandler (FrontEnd.js:1978)
> 3Overview.js:56 Uncaught TypeError: Cannot read properties of undefined
> (reading 'prototype')
> at P (Overview.js:56)
> at VG.convert (FrontEnd.js:910)
> at ny (FrontEnd.js:250)
> at HTMLElement.iy (FrontEnd.js:125)
> at HTMLElement.b (FrontEnd.js:121)
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOut (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOver (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOver @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOut (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOut @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOver (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOver @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOut (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOut @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOver (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOver @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOut (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOut @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOver (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOver @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOut (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOut @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
>
>
>
> On Thu, Dec 30, 2021 at 4:32 PM Roman Isitua <ro...@gmail.com>
> wrote:
>
> I get the same error even when I set
> the -js-dynamic-access-unknown-members=true;
>
>
>
> On Thu, Dec 30, 2021 at 4:24 PM Roman Isitua <ro...@gmail.com>
> wrote:
>
>
>
> Using the below settings,
>
> -export-public-symbols=false
> -prevent-rename-protected-symbols=false
> -prevent-rename-public-symbols=false
> -prevent-rename-internal-symbols=false
> -js-dynamic-access-unknown-members=false;
>
> -js-default-initializers=true
>
>
> Debug version runs fine. The release version does not start up
>
> <image004.png>
>
>
> I get the below errors
>
> Uncaught TypeError: Cannot read properties of undefined (reading 'apply')
> at KE.hm (FrontEnd.js:1600)
> at XE.M.Fb (FrontEnd.js:943)
> at XE.M.uh (FrontEnd.js:937)
> at FE.M.na
> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Ffe.m.na%2F&data=04%7C01%7Caharui%40adobe.com%7C8d6c8c929bca4c1a021508d9d7886a40%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637777803175756125%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=OGhFJpANWfvex%2B1cYlKYfHtqiLXY3BS6L3yEOGVL8gM%3D&reserved=0>
> (FrontEnd.js:497)
> at FE.M.v (FrontEnd.js:497)
> at dR.M.S (FrontEnd.js:213)
> at dR.Nz.S (FrontEnd.js:217)
> at dR.M.start (FrontEnd.js:1396)
> at index.html:45
> :8080/favicon.ico:1 Failed to load resource: the server responded with a
> status of 404 (Not Found)
>
>
>
>
>
> FrontEnd.js is the start up class for the application. i.e. It implements
> the Jewel application class.
>
>
>
>
>
>
>
> On Thu, Dec 30, 2021 at 3:19 PM Roman Isitua <ro...@gmail.com>
> wrote:
>
> Hi Harb,
>
>
>
> Thanks for your response. I have gone through the documentation. I will do
> my test again starting with the smallest size option and share my findings.
>
>
>
> Regards,
>
>
>
> On Thu, Dec 30, 2021 at 10:59 AM Harbs <ha...@gmail.com> wrote:
>
> Sorry for my deal in responding.
>
>
>
> Let’s take a step back.
>
>
>
> I’m not sure how you are compiling your modules. I just added some content
> to the module documentation page which explains what compiler options you
> need while compiling modules. (It still needs some editing.)
> https://apache.github.io/royale-docs/features/modules#minification
> <https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapache.github.io%2Froyale-docs%2Ffeatures%2Fmodules%23minification&data=04%7C01%7Caharui%40adobe.com%7C8d6c8c929bca4c1a021508d9d7886a40%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637777803175756125%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=d2bmQw9WoJJ41DlrzBNMGnr0GoBmVNAbZcmPYPXXigQ%3D&reserved=0>
>
>
>
> Are you using those options?
>
>
>
> On Dec 29, 2021, at 2:19 AM, Maria Jose Esteve <mj...@iest.com> wrote:
>
>
>
> Hi, Let me join you with these tests....
>
>
>
> @Harb, I have compiled the SDK from this branch, feature/ROYALE_INTERFACE_INFO,
> and when running in debug I get this error:
>
>
>
> Message on the PURGE CONSOLE is displayed:
>
>
>
> Cannot convert org.apache.royale.reflection.beads.ClassAliasBead to IBead
>
>
>
> Message in the IDE Window:
>
>
>
> Se produjo una excepción: TypeError: Cannot convert [object Object] to
> IBead
>
> at App.org.apache.royale.core.ElementWrapper.addBead (
> http://localhost:8080/WNetSuitePlus/org/apache/royale/core/ElementWrapper.js:114:11
> )
>
> at App.org.apache.royale.core.HTMLElementWrapper.addBead (
> http://localhost:8080/WNetSuitePlus/org/apache/royale/core/HTMLElementWrapper.js:43:65
> )
>
> at App.org.apache.royale.jewel.Application.start (
> http://localhost:8080/WNetSuitePlus/org/apache/royale/jewel/Application.js:246:10
> )
>
> at App.App_loadXML (http://localhost:8080/WNetSuitePlus/App.js:1681:25
> )
>
> at
> org.apache.royale.net.URLLoader.org.apache.royale.events.EventDispatcher.fireListeners
> (
> http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:97:23
> )
>
> at Function.goog.events.EventTarget.dispatchEventInternal_ (
> http://localhost:8080/WNetSuitePlus/library/closure/goog/events/eventtarget.js:381:26
> )
>
> at
> org.apache.royale.net.URLLoader.org.apache.royale.events.EventDispatcher.dispatchEvent
> (
> http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:72:37
> )
>
> at org.apache.royale.net.URLLoader.jsEventHandler (
> http://localhost:8080/WNetSuitePlus/org/apache/royale/net/URLLoader.js:169:12
> )
>
>
>
> Call stack:
>
>
>
> <image003.png>
>
>
>
> [INFO] Executing MXMLC in tool group Royale with args: [
>
>
> -load-config=D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\compile-app-config.xml,
>
> -js-default-initializers=true,
>
> -source-map=true,
>
> -js-dynamic-access-unknown-members=true,
>
>
> -keep-as3-metadata+=Inject,Dispatcher,EventHandler,Event,PostConstruct,PreDestroy,ViewAdded,ViewRemoved,Bindable,Transient,
>
> -keep-code-with-metadata=Inject,
>
> -show-binding-warnings=false,
>
> -export-public-symbols=false,
>
> -prevent-rename-protected-symbols=false,
>
> -prevent-rename-internal-symbols=false,
>
>
> -js-output=D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\javascript,
>
> -compiler.targets=JSRoyale,
>
>
> D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\src\main\royale\App.mxml
>
>
>
>
>
> The release execution does not change, the error is the same as before
> (SDK compilation from the develop branch):
>
>
>
> Se produjo una excepción: ReferenceError: Error #1065: Variable
> com.iest.winplusweb.models.MasterConfigSystemModel is not defined.
>
> at yR (http://localhost:8080/WPWebRelease/App.js:3605:1771)
>
> at Mya (http://localhost:8080/WPWebRelease/App.js:3343:365)
>
> at AR.J.usa (http://localhost:8080/WPWebRelease/App.js:434:441)
>
> at GFa.J.fromTypeDefinition (
> http://localhost:8080/WPWebRelease/App.js:5706:139)
>
> at Function.YT.getTypeDescriptor (
> http://localhost:8080/WPWebRelease/App.js:4570:820)
>
> at Function.fX.constructBean (
> http://localhost:8080/WPWebRelease/App.js:2336:472)
>
> at r$.J.initialize (http://localhost:8080/WPWebRelease/App.js:5041:66)
>
> at OW.J.init (http://localhost:8080/WPWebRelease/App.js:950:452)
>
> at OW.J.u (http://localhost:8080/WPWebRelease/App.js:951:454)
>
> at $$.J.addBead (http://localhost:8080/WPWebRelease/App.js:357:549)
>
>
>
> The main difference:
>
> project compiled from "SDK-develop" runs fine in js-debug and gives error
> in js-release and, compiled from "SDK-ROYALE_INTERFACE_INFO" does not
> launch because of conversion error.
>
>
>
> Hiedra
>
>
>
> *De:* Roman Isitua <ro...@gmail.com>
> *Enviado el:* martes, 28 de diciembre de 2021 15:55
> *Para:* users@royale.apache.org
> *Asunto:* Re: Load time is very slow
>
>
>
> @Harb
>
>
>
> I have checked out the feature/ROYALE_INTERFACE_INFO branch and compiled
> asjs and compiler. I have rebuilt my application with modules in release
> mode.
>
>
>
> I get the following error when I attempt to launch a module
>
>
>
>
>
> <image001.png>
>
>
>
>
>
> The module loads fine in debug mode
>
>
>
> <image002.png>
>
>
>
>
>
> Snippets of the log
>
>
>
> Overview.js:786 Uncaught TypeError: cm.valuesImpl.init is not a function
> at Rr.Mr.yl (Overview.js:786)
> at Function.iq.generateMXMLProperties (Overview.js:736)
> at Rr.hq.generateMXMLAttributes (Overview.js:546)
> at new Rr (Overview.js:804)
> at LN.J.loadHandler (FrontEnd.js:1967)
> Mr.yl @ Overview.js:786
> iq.generateMXMLProperties @ Overview.js:736
> hq.generateMXMLAttributes @ Overview.js:546
> Rr @ Overview.js:804
> J.loadHandler @ FrontEnd.js:1967
> load (async)
> LN.loadModule @ FrontEnd.js:1965
> dN.loadModule @ FrontEnd.js:2406
> LD.Un @ FrontEnd.js:1809
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:248
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
>
>
>
>
>
> I have attached the full log to this email.
>
>
>
>
>
>
>
>
>
> On Tue, Dec 28, 2021 at 2:51 PM Roman Isitua <ro...@gmail.com>
> wrote:
>
> Hi Maria,
>
>
>
> Prior to starting this mail discussion "Load time is very slow". I can
> confirm I have only been compiling in debug mode. My target\javascript\bin\
> only had js-debug. It was after I upgraded my royale sdk from 0.9.7 to
> 0.9.8 that I compiled in release mode.
>
>
>
>
>
>
>
> On Tue, Dec 28, 2021 at 2:24 PM Maria Jose Esteve <mj...@iest.com>
> wrote:
>
> Hi, @Roman, I think you are doing a double compile can it be? My times are
> the same as yours and I always compile in debug and release.
>
>
>
> Look at your target folder " target\javascript\bin\" and if you have two
> folders: js-debug and js-release you are compiling always double.
>
>
>
> In my case, the architecture of my project as well as the Maven
> compilation files (pom.xml) were provided by an external company (we didn't
> know anything about Maven or Royale at that time) and I understand that
> this formula was chosen to show us the options we had.
>
>
>
> A priori and without doing any test as Harb has done, I think that
> modularity gives us the advantage of compiling parts of the code once and
> not compiling them again if they are not modified. So far WITH MY
> COMPILATION TIMES, sometimes more than 1 minute, this is fundamental. But
> of course, now we have the problem of minification of the modules and it is
> really a serious problem because it is impossible for us to deploy in
> production.
>
>
>
> I will try to separate the compiación realese with a profile and if I
> succeed I will pass it to you @Roman.
>
>
>
> @Harb what do you mean by compiling the ROYALE_INTERFACE_INFO branch?
>
>
>
> Hiedra
>
>
>
> *De:* Harbs <ha...@gmail.com>
> *Enviado el:* lunes, 27 de diciembre de 2021 18:32
> *Para:* users@royale.apache.org
> *Asunto:* Re: Load time is very slow
>
>
>
> That doesn’t sound right.
>
>
>
> Are you sure you’re compiling debug and not release? That sounds like
> release build times.
>
>
>
> On Dec 27, 2021, at 3:31 PM, Roman Isitua <ro...@gmail.com> wrote:
>
>
>
> Wow ! You are using a workstation with a bleeding edge processor.
>
>
>
> I just compiled my app now. It took 44 seconds. (First compilation after
> ide start up.) Subsequently compilations are usually 19s to 20s.
>
>
>
> My application code base is very very small compared to yours. As we
> continue to add functionality, I expect the compile times to rise.
>
>
>
>
>
>
>
>
>
> <MainApp_pom.xml><Overview_pom.xml><fm_client2_pom.xml>
>
>
>
>
Re: Compiling Modules (was Re: Load time is very slow)
Posted by Roman Isitua <ro...@gmail.com>.
That is cool. Where can I inspect the maven version of the app ? I will
like to take note of the maven configurations used ?
On Sun, 23 Jan 2022, 07:50 Alex Harui, <ah...@adobe.com> wrote:
> I updated the royale-compiler and royale-asjs ReleaseModules branches.
> The examples/royale/ModuleExample now works for me in both Ant and Maven.
>
>
>
> HTH,
>
> -Alex
>
>
>
> *From: *Alex Harui <ah...@adobe.com>
> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Date: *Friday, January 14, 2022 at 10:05 AM
> *To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Subject: *Re: Compiling Modules (was Re: Load time is very slow)
>
>
>
> Hi Roman,
>
>
>
> I saw this and similar entries in the MainApp.xml that was attached:
>
> *<royale.export-public-symbols>*-export-public-symbols=false;
> *</royale.export-public-symbols>*
>
>
>
> It’s been a while since I used Maven, but we don’t want these options to
> be false.
>
>
>
> I thought Maven picked up settings from
> src/main/config/compile-app-config.xml, but I guess not, so you’ll have to
> make the changes I made to the example’s
> src/main/config/compile-app-config.xml files in MainApp and Module in your
> pom.xml files.
>
>
>
> I don’t know if I’ll have time this weekend to update the pom.xml files in
> the branch and test on Maven so hopefully you can figure it out.
>
>
>
> Then, if it still doesn’t work, post the updated
> target/compile-app-config.xml files and figure out how to make the .JS
> files accessible so I can look at them.
>
>
>
> Good luck, hope it works,
>
> -Alex
>
>
>
> *From: *Roman Isitua <ro...@gmail.com>
> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Date: *Friday, January 14, 2022 at 6:30 AM
> *To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Subject: *Re: Compiling Modules (was Re: Load time is very slow)
>
>
>
>
>
> Find my responses to your questions below
>
>
>
> On Fri, Jan 14, 2022 at 12:19 AM Alex Harui <ah...@adobe.com> wrote:
>
> Hi Roman,
>
>
>
> All prevent-rename options should be set to true or left to their default
> values. Looks like they are false in the main app.
>
> I ensured that they are left to their defaults. They are not specified
> in the respective pom's for main app and module.
>
>
>
> Please post the contents of the compile-app-config.xml files.
>
> I have attached the compile-app-config.xml files for mainApp and module to
> this email.
>
>
>
> Also, please make sure the bin/js-debug folders have been deleted before
> compiling.
>
> I can confirm that this is always the case.
>
>
>
> The compile-app-config.xml files contain the prevent-rename-object-keys
> setting in the example. You can specify it for your app in
> compile-app-config.xml as well.
>
>
>
> I don't see this key setting applied in the compile-app-config.xml. I
> guess something is wrong. (See the attached files). I copied these files
> from the target folders that are generated after a successful build of main
> app and module respectively.
>
>
>
>
>
> Then if it still doesn’t work, I’ll want to see the bin/js-release
> folders. You can attach them to a Git Issue if it doesn’t contain
> sensitive information or we can discuss other ways.
>
>
>
>
>
> Please, what is the purpose of compile-app-config.xml ? I am just
> discovering that I have it in the MainApp project. it is located in
> src\main\config. I don't have it for the module.
>
> I am using maven to build the project.
>
>
>
>
>
>
>
> -Alex
>
>
>
> *From: *Roman Isitua <ro...@gmail.com>
> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Date: *Thursday, January 13, 2022 at 2:50 PM
> *To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Subject: *Re: Compiling Modules (was Re: Load time is very slow)
>
>
>
>
>
> I have performed the test.
>
> - I created a new branch locally called ReleaseModules for compiler and
> asjs respectively. (git branch ReleaseModules)
>
> - check out to ReleaseModules for compiler and asjs respectively. (git
> checkout ReleaseModules)
> - Then pulled from ReleaseModules. (git pull origin ReleaseModules) for
> compiler and asjs respectively.
> - Then built the compiler and asjs respectively. (mvn clean install)
>
> I am still unable to load the module. However the error is different from
> the previous test.
>
>
>
>
>
>
>
> The error log
>
>
>
> Failed to load resource: the server responded with a status of 404 (Not
> Found)
> Overview.js:1270 Uncaught TypeError: Cannot read properties of undefined
> (reading 'init')
> at A_Aeh.A_A.g.h.v.$d.Qo (Overview.js:1270:627)
> at Function.A_A.g.h.i.Ua.generateMXMLProperties (Overview.js:1196:316)
> at A_Aeh.A_A.g.h.v.qc.generateMXMLAttributes (Overview.js:930:358)
> at new A_Aeh (Overview.js:1296:431)
> at MN.J.loadHandler (FrontEnd.js:1963:188)
>
> Let me also share the compilation settings used. (correct me if I am wrong)
>
>
>
> for main app
>
>
>
> --- royale-maven-plugin:0.9.9-SNAPSHOT:compile-app (default-compile-app) @
> MainApp ---
> [INFO] Executing MXMLC in tool group Royale with args:
> [-load-config=C:\Users\nyemi\git\SpacioFM2\SpacioFM2\FmClient2\MainApp\target\compile-app-config.xml,
> -compiler.show-binding-warnings=false, -source-map=false,
> -js-default-initializers=true, -js-dynamic-access-unknown-members=true,
> -keep-as3-metadata+=Inject,Dispatcher,EventHandler,PostConstruct,PreDestroy,ViewAdded,ViewRemoved,Bindable,Transient,
> -js-output=C:\Users\nyemi\git\SpacioFM2\SpacioFM2\FmClient2\MainApp\target\javascript,
> -compiler.targets=JSRoyale,
> C:\Users\nyemi\git\SpacioFM2\SpacioFM2\FmClient2\MainApp\src\main\royale\FrontEnd.mxml]
>
>
>
>
>
> for the module
>
>
>
> [INFO] --- royale-maven-plugin:0.9.9-SNAPSHOT:compile-app
> (default-compile-app) @ Overview ---
> [INFO] Executing MXMLC in tool group Royale with args:
> [-load-config=C:\Users\nyemi\git\SpacioFM2\SpacioFM2\FmClient2\Overview\target\compile-app-config.xml,
> -compiler.show-binding-warnings=false, -source-map=false,
> -js-default-initializers=true, -js-dynamic-access-unknown-members=true,
> -js-output=C:\Users\nyemi\git\SpacioFM2\SpacioFM2\FmClient2\Overview\target\javascript,
> -compiler.targets=JSRoyale,
> C:\Users\nyemi\git\SpacioFM2\SpacioFM2\FmClient2\Overview\src\main\royale\Overview.mxml]
>
>
>
> I can't see the -prevent-rename-object-keys you mentioned being supplied
> automatically.
>
>
>
> I have attached the pom's for the maven project so you can inspect the
> settings I used. I am not sure that I am applying them correctly.
>
> MainApp.xml is the Main application. Overview.xml is the module.
> FmClient2.xml is the parent project.
>
>
>
> Regards,
>
>
>
>
>
> On Wed, Jan 12, 2022 at 9:04 AM Alex Harui <ah...@adobe.com> wrote:
>
> I pushed a ReleaseModules branch in royale-compiler and royale-asjs.
>
>
>
> These changes cause the royale-asjs/examples/royale/ModuleExample release
> version to work.
>
>
>
> The big challenge is that it turned out there is a fair amount of
> infrastructure that is not exported/public. The Language utilities,
> ROYALE_CLASS_INFO, the superclass_ property, cssData and others are going
> to get renamed. And thus renamed differently in the main app vs the module.
>
>
>
> That’s why the current compiler’s strategy was to try to copy the renaming
> map from the main app to the module, but it didn’t always work. There
> seems to be a bug in the Closure Compiler that a set of externs causes the
> compiler to mis-handle package-paths. Also, it meant that the module
> contained its own copy of most of the infrastructure
>
>
>
> The new compiler strategy is a bit more like the old Flex module
> strategy. The module tries to not contain a copy of code that already
> exists in the main app. Some of the goog/base.js stuff still gets copied
> though. Then because we avoid renaming more things, the module can
> reference the shared infrastructure in the main app.
>
>
>
> The new compiler detects if what is being compiled is a loader of modules
> (because it is generating an externs-report) or is a Module and prevents
> renaming of Language APIs, modified base.js to not rename the superClass_
> property used for calling super() and a few other things. In addition, I
> added a -prevent-rename-object-keys compiler option that works as a
> post-processor. It scans the js files being copied into bin/js-debug and
> adds quotes around things.
>
>
>
> By making these changes, I was able to get the closure compiler to
> mis-handle the packages in a more predictable way, so another thing the new
> compiler does is post-process the output file to remove the incorrect
> package code. The incorrect code would re-init package paths like “org” or
> “org.apache.royale”.
>
>
>
> Anyway, give it a try and see if it works. Probably we’ll find out there
> is more infrastructure that needs to not be renamed, but I think this has a
> better chance of working as we aren’t blocked by the compiler outputting
> bad code. Many months ago I tried to understand how why the Closure
> Compiler output bad code, but ran out of time.
>
>
>
> Another difference is that the new compiler strategy doesn’t use custom
> overrides of Closure Compiler passes which was fragile and will make it
> easier to upgrade to newer versions of Closure Compiler.
>
>
>
> HTH,
>
> -Alex
>
>
>
> *From: *Alex Harui <ah...@adobe.com>
> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Date: *Wednesday, January 5, 2022 at 9:53 AM
> *To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Subject: *Re: Compiling Modules (was Re: Load time is very slow)
>
>
>
> I probably won’t have time to really dig into this until the weekend. It
> is looking like the Closure Compiler gets confused when presented with
> externs for the same package tree that the module is generating new classes
> for.
>
>
>
> -Alex
>
>
>
> *From: *Roman Isitua <ro...@gmail.com>
> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Date: *Tuesday, January 4, 2022 at 1:57 PM
> *To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Subject: *Re: Compiling Modules (was Re: Load time is very slow)
>
>
>
> Okay. I knew I was missing something.
>
>
>
> I will test again when the update for load-externs is available.
>
>
>
> On Tue, Jan 4, 2022 at 6:02 PM Alex Harui <ah...@adobe.com> wrote:
>
> Essentially, -externs-report is for the Closure (JS) Compiler.
> -link-report and -load-externs (one leading ‘-‘) is for the Royale Compiler
> to tell the Royale Compiler what classes to feed to the Closure Compiler.
> Both contain the same data (the set of classes used in the main app), just
> formatted differently and used differently.
>
>
>
> The –externs option for the Closure Compiler then tells the Closure
> Compiler not to look for classes in the set of files it is supposed to
> minify.
>
>
>
> So, you have the right settings for the main app, but for the module, it
> should be:
>
> *-js-compiler-option=--externs extrep.txt; -load-externs linkrep.txt;*
>
>
>
> However, even that won’t work today, as the Royale Compiler is not
> handling -load-externs on the JS prep for Closure Compiler. I have some
> local changes to the compiler that mixes most of it, but am facing issues
> with how Closure handles package paths. If that can be resolved, then we
> have a good chance of things working.
>
>
>
> -Alex
>
>
>
> *From: *Roman Isitua <ro...@gmail.com>
> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Date: *Tuesday, January 4, 2022 at 12:39 AM
> *To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Subject: *Re: Compiling Modules (was Re: Load time is very slow)
>
>
>
> Thanks for the update.
>
>
>
> I attempted the following:
>
>
>
> 1. In the main application, I use the following setting:
>
> *-externs-report=extrep.txt; -link-report=linkrep.txt;*
>
>
>
> 2. In the module I use the following
>
>
>
> *-js-compiler-option=--externs extrep.txt;
> -js-compiler-option+=--load-externs linkrep.txt;*
>
>
>
> The main application compiles successfully, I get a compilation error with
> the module
>
>
>
> "--load-externs" is not a valid option
> Sample usage: --compilation_level (-O) VAL --externs VAL --js VAL
> --js_output_file VAL --warning_level (-W) [QUIET | DEFAULT
> | VERBOSE]
> Run with --help for all options and details
> Internal error: java.lang.NullPointerException
> com.google.javascript.jscomp.CommandLineRunner.createOptions(CommandLineRunner.java:1809)org.apache.royale.compiler.utils.JSClosureCompilerWrapper$CompilerOptionsParser.getOptions(JSClosureCompilerWrapper.java:529)org.apache.royale.compiler.utils.JSClosureCompilerWrapper.<init>(JSClosureCompilerWrapper.java:77)org.apache.royale.compiler.internal.codegen.mxml.royale.MXMLRoyalePublisher.publish(MXMLRoyalePublisher.java:395)org.apache.royale.compiler.clients.M
>
>
>
>
>
>
>
> I don't think I am using this option correctly.
>
>
>
>
>
>
>
> .....
>
>
>
> On Tue, Jan 4, 2022 at 8:44 AM Alex Harui <ah...@adobe.com> wrote:
>
> I found some time to investigate. The -externs-report option is mostly
> working correctly, but other compiler changes are needed to try to avoid
> duplicate code in the module. I might have time to investigate more this
> coming weekend. It does appear that if we can correctly reference the
> app’s class from the module that it will work. The Closure Compiler let me
> compile the module after I externalize and avoid requires on everything in
> the main app’s externs report and -js link report, but the references in
> the module have collapsed packages which is either incorrect or aliases
> need to be created.
>
>
>
> However I think this new approach has a better chance of working than
> trying to match renaming tables.
>
>
>
> -Alex
>
>
>
> *From: *Alex Harui <ah...@adobe.com>
> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Date: *Monday, January 3, 2022 at 2:30 PM
> *To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Subject: *Re: Compiling Modules (was Re: Load time is very slow)
>
>
>
> The -externs-report option should be similar to the -link-report option.
> It takes a filename. The compiler should output the classes used in the JS
> compile into that file. To use externs, I think you don’t need to prevent
> renaming in the application as long as public variables are exported. I
> think you specify -externs-report when compiling the application.
>
>
>
> You may also need to output a -link-report from the application as well.
>
>
>
> I think you then specify the externs-report file as an -externs for the
> -js-compiler-options when compiling the module. And maybe also specify the
> -link-report output as a -load-externs in the same way it was used when
> compiling Flex modules. The goal for the module is, like Flex, to not have
> any classes in the module that exist in the main app. Then it doesn’t
> matter about class renaming within the release-mode JS file.
>
>
>
> HTH,
>
> -Alex
>
>
>
> *From: *Roman Isitua <ro...@gmail.com>
> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Date: *Monday, January 3, 2022 at 12:37 PM
> *To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Subject: *Re: Compiling Modules (was Re: Load time is very slow)
>
>
>
>
>
> I can confirm that classes are being renamed in both files.
>
>
>
> I have attempted your suggestion i.e. removing variable maps and property
> maps then use
>
> -externs-report;-export-public-symbols=true;-prevent-rename-public-symbols=true;
>
>
>
>
> I get the below error
>
>
>
> command line Error: configuration variable 'externs-report' expected 1
> argument(s), got 0.
>
>
>
> I cannot find any documentation on how to use the -externs-report
> argument. What does it do ? and what are the acceptable values ?
>
>
>
> Regards,
>
>
>
>
>
> On Sun, Jan 2, 2022 at 9:06 AM Alex Harui <ah...@adobe.com> wrote:
>
> Hi Roman,
>
>
>
> It might be more complicated. The settings are probably doing something
> since you reported that the error occurred in the app vs the module
> depending on the settings.
>
>
>
> I went back and looked at the original module example in
> examples/royale/ModuleExample and was surprised there weren’t more compiler
> settings. I thought we’d found a way to externalize the main app’s code
> for the module. Because if both the app and module have a copy of
> SimpleCSSValuesImpl or any other class that both JS files use, there could
> be issues as to which one gets loaded (maybe both) and what export aliases
> are pointing to. Sounds like changing settings affected whether the
> aliases pointed at module code vs app code.
>
>
>
> I thought we were using similar settings to what we used for SWF where the
> module would not contain a copy of SimpleCSSValuesImpl so it would use the
> one loaded by the main app, but I didn’t see those settings. We might need
> to make that work because otherwise I think static initializations won’t do
> the right thing. Or maybe we’ve figured out that it is simpler just to
> write defensive code that doesn’t get broken. But also, if the module has
> its own copy of code already loaded by the main app, that’s sort of a waste
> of bytes. Maybe there was a minification issue with not having the module
> link in classes already linked into the main app. I see an -externs-report
> option in the compiler but the example doesn’t seem to use it.
>
>
>
> You should be able to scan the JS files and see if a class is in both
> module and app and if it is getting renamed.
>
>
>
> I don’t know if I will have time to investigate further. The currently
> recommended options for modules involving variable maps and property maps
> may need to be abandoned in favor of externs and preventing renames.
>
>
>
> -Alex
>
>
>
>
>
> *From: *Roman Isitua <ro...@gmail.com>
> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Date: *Saturday, January 1, 2022 at 3:02 AM
> *To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Subject: *Re: Compiling Modules (was Re: Load time is very slow)
>
>
>
> Alex, thank you for your detailed analysis of the error log.
>
>
>
> I agree with you that the best strategy is to prevent renaming of
> public/exports used by the module. I have tried different options to
> prevent renaming
>
> It appears none of them stops this. From my observation, it appears that
> this default options below
>
>
>
>
> -export-public-symbols=true;-prevent-rename-public-symbols=true;-prevent-rename-public-instance-accessors=true;
>
>
>
> Only seem to affect the main application (main module) but have no effect
> on the other modules even though I ensured they were applied in
> their respective module pom. I came to this conclusion when I decided to
> turn set -prevent-rename-public-symbols=false
>
>
>
> I noticed that I got the same error but this time around in the main
> module.
>
>
>
> Uncaught TypeError: this.rb[(intermediate value).Kd(...)] is not a function
> at HN.iI.send (FrontEnd.js:970)
> at nI.EH.Ea (FrontEnd.js:880)
> at ON.q6 (FrontEnd.js:1815)
> at TN.L2 (FrontEnd.js:2034)
> at hF.Xf (FrontEnd.js:2063)
> at lF.kb (FrontEnd.js:1233)
> at lF.Vf (FrontEnd.js:1224)
> at cF.O (FrontEnd.js:659)
> at cF.M.w (FrontEnd.js:661)
> at gQ.mA.M (FrontEnd.js:241)
>
>
>
> FrontEnd.js maps to FrontEnd.as in my application and is the entry point
> of the application. This confirms that -prevent-rename-public-symbols=false
> has
>
> an effect on the main module but no effect on other modules even though
> they were applied in the respective module pom's.
>
>
>
> Maybe there are other options I am overlooking.
>
>
>
> On Sat, Jan 1, 2022 at 9:31 AM Alex Harui <ah...@adobe.com> wrote:
>
> In case it helps, the minification (variable renaming) mechanism is
> essentially guaranteed to cause problems in modules. The Closure Compiler
> basically takes variables, sees if it is worth renaming it, then gives it
> the name ‘a’, then ‘b’, and so-on, (it skips a few letters, IIRC), then
> moves on to ‘aa’, and ‘ab’, etc. The odds that the compiler will encounter
> the same variables in the same order when compiling an app and one or more
> modules is close to zero.
>
>
>
> I did some work to try to dump the mapping of the renamed variables in the
> main app and use that when compiling the modules. It was working for a
> while, then some code was added to the framework that started fooling the
> Closure Compiler. I spent some time trying to fix the Closure Compiler,
> but ran out of time. Meanwhile, Josh was adding more control over renaming
> so I moved on to other things.
>
>
>
> IMO, the best strategy to take would be to try to control what gets
> renamed. All public/exports from the app that are used by the module
> should not be renamed. That will definitely make the app and modules
> bigger, but unless the Closure Compiler folks become interested in
> runtime-loaded modules, it is challenging for the Royale compiler to allow
> aggressive renaming.
>
>
>
> I think what is going on with the exceptions below is that exporting
> doesn’t really prevent renaming. It only sets up an externally-visible
> alias to a renamed variable. Especially for static members. So it isn’t
> sufficient to export public variables, the code within the module must not
> let the Closure Compiler think that the intra-module references can be
> renamed, in this case, from SimpleCSSValuesImpl to QI
>
>
>
> I don’t know the renaming options we’ve added to the Royale Compiler, so I
> don’t know if there is an option to control that. I think there is a way
> to convince the Closure Compiler to not rename SimpleCSSValuesImpl because
> I’ve seen other class names not get renamed.
>
>
>
> HTH,
>
> -Alex
>
>
>
> *From: *Roman Isitua <ro...@gmail.com>
> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Date: *Friday, December 31, 2021 at 10:42 AM
> *To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Subject: *Re: Compiling Modules (was Re: Load time is very slow)
>
>
>
> I have tested on both. The error log is the same.
>
>
>
> I don't understand your second question. Kindly clarify ?
>
>
>
>
>
> I followed strictly the approach used for loading modules here in this
> example.
>
> This is the only method I know for loading modules. If there is another
> method please share.
>
>
>
>
>
>
> https://royale.apache.org/dividing-an-apache-royale-application-with-modules/
> <https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Froyale.apache.org%2Fdividing-an-apache-royale-application-with-modules%2F&data=04%7C01%7Caharui%40adobe.com%7C8d6c8c929bca4c1a021508d9d7886a40%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637777803175756125%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=vwqT3zwtSTn2Ak7QU%2BmVloKLXaIv145LpLG8PByzWJU%3D&reserved=0>
>
>
>
> On Fri, 31 Dec 2021, 19:14 Maria Jose Esteve, <mj...@iest.com> wrote:
>
> @Roman, which branch did you compile the SDK from, ROYALE_INTERFACE_INFO
> or develop?
>
> Could you pass the Overview.mxml view to the main application? (to rule
> it out)
>
>
>
> Hiedra
>
>
>
> *De:* Roman Isitua <ro...@gmail.com>
> *Enviado el:* viernes, 31 de diciembre de 2021 17:56
> *Para:* users@royale.apache.org
> *Asunto:* Re: Compiling Modules (was Re: Load time is very slow)
>
>
>
> I have tried tracing where the errors are happening whenever I test the
> release version
>
> Uncaught TypeError: Ql.valuesImpl.init is not a function
> at Hr.Cr.um (Overview.js:846)
> at Function.ep.generateMXMLProperties (Overview.js:795)
> at Hr.Sp.generateMXMLAttributes (Overview.js:599)
> at new Hr (Overview.js:864)
> at PN.M.loadHandler (FrontEnd.js:2042)
> 9Overview.js:173 Uncaught TypeError: this.createElement is not a function
> at $B.V (Overview.js:173)
> at new $B (FrontEnd.js:2430)
> at EP.convert (FrontEnd.js:2430)
> at Zy (FrontEnd.js:261)
> at HTMLAnchorElement.Uy (FrontEnd.js:121)
> at HTMLAnchorElement.Sy.b (FrontEnd.js:117)
>
>
>
>
>
> The highlighted code in red is declared as follows in the Overview.mxml
> (maven module)
>
>
>
> <j:valuesImpl>
>
> <js:SimpleCSSValuesImpl/>
>
> </j:valuesImpl>
>
>
>
> The j:valuesImpl points to the following code in jewel Module.js
>
>
>
> /**
> * @nocollapse
> * @export
> * @type {org.apache.royale.core.IValuesImpl}
> */
> org.apache.royale.jewel.Module.prototype.valuesImpl;
>
>
> org.apache.royale.jewel.Module.prototype.set__valuesImpl = function(value)
> {
> org.apache.royale.core.ValuesManager.valuesImpl.init(this);
> };
>
>
>
>
>
> it appears this function is improperly renamed and whenever the app tries
> to load the module is not able to recognise it as a function.
>
>
>
> The same issue of improper function renaming is happening in the second
> error as well
>
>
>
> 9Overview.js:173 Uncaught TypeError: this.createElement is not a function
>
>
>
>
>
> On Thu, Dec 30, 2021 at 10:42 PM Roman Isitua <ro...@gmail.com>
> wrote:
>
>
>
> I have applied the js compiler option as follows
>
>
>
>
> <additionalCompilerOptions>-source-map=false;-compiler.show-binding-warnings=false;-js-default-initializers=true;-js-dynamic-access-unknown-members=true;
> -js-compiler-option=--variable_map_output_file
> gccvars.txt;-js-compiler-option+=--property_map_output_file gccprops.txt
> </additionalCompilerOptions>
>
>
>
>
>
> I get the same error as before when attempting to launch the jewel module.
>
>
>
> *Error! Filename not specified.*
>
>
>
>
>
> Same error trace.
>
>
>
> Uncaught TypeError: cm.valuesImpl.init is not a function
> at Rr.Mr.yl (Overview.js:786)
> at Function.iq.generateMXMLProperties (Overview.js:736)
> at Rr.hq.generateMXMLAttributes (Overview.js:546)
> at new Rr (Overview.js:804)
> at LN.J.loadHandler (FrontEnd.js:1967)
> FrontEnd.js:1640 Uncaught TypeError: M is not a function
> at oM.J.handleMouseOut (FrontEnd.js:1640)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:248)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> FrontEnd.js:1640 Uncaught TypeError: M is not a function
> at oM.J.handleMouseOver (FrontEnd.js:1640)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:248)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> FrontEnd.js:1640 Uncaught TypeError: M is not a function
> at oM.J.handleMouseOut (FrontEnd.js:1640)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:248)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> FrontEnd.js:1640 Uncaught TypeError: M is not a function
> at oM.J.handleMouseOver (FrontEnd.js:1640)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:248)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> FrontEnd.js:1640 Uncaught TypeError: M is not a function
> at oM.J.handleMouseOut (FrontEnd.js:1640)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:248)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> FrontEnd.js:1640 Uncaught TypeError: M is not a function
> at oM.J.handleMouseOver (FrontEnd.js:1640)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:248)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> FrontEnd.js:1640 Uncaught TypeError: M is not a function
> at oM.J.handleMouseOut (FrontEnd.js:1640)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:248)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> 3Overview.js:56 Uncaught TypeError: Cannot read properties of undefined
> (reading 'prototype')
> at P (Overview.js:56)
> at SG.convert (FrontEnd.js:904)
> at ny (FrontEnd.js:248)
> at HTMLElement.iy (FrontEnd.js:125)
> at HTMLElement.b (FrontEnd.js:121)
>
>
>
> On Thu, Dec 30, 2021 at 6:56 PM Harbs <ha...@gmail.com> wrote:
>
> 1. I’d get rid of the agressive minification options. It will likely cause
> issues. If you get it to work without those options, you can try to add
> them back in and see if it still works.
>
> 2. You seem to be missing the compiler options explained here:
> https://apache.github.io/royale-docs/features/modules#minification
> <https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapache.github.io%2Froyale-docs%2Ffeatures%2Fmodules%23minification&data=04%7C01%7Caharui%40adobe.com%7C8d6c8c929bca4c1a021508d9d7886a40%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637777803175756125%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=d2bmQw9WoJJ41DlrzBNMGnr0GoBmVNAbZcmPYPXXigQ%3D&reserved=0>
>
>
>
> For a pom, it would look something like this (adjust your paths to match
> your setup):
>
>
>
> Main app:
>
> <additionalCompilerOptions>-source-map=true;-js-compiler-option=--variable_map_output_file
> gccvars.txt;-js-compiler-option+=--property_map_output_file
> gccprops.txt</additionalCompilerOptions>
>
>
>
> Module:
>
> <additionalCompilerOptions>-source-map=true;-js-compiler-option=--variable_map_input_file
> ../../../../../MainApp/bin/js-release/gccvars.txt;-js-compiler-option+=--property_map_input_file
> ../../../../../MainApp/bin/js-release/gccprops.txt</additionalCompilerOptions>
>
>
>
> On Dec 30, 2021, at 7:43 PM, Roman Isitua <ro...@gmail.com> wrote:
>
>
>
> I think it will be better for me to share my pom's that way you can see
> all the compilation options used. The pom for the parent (FmClient2), the
> MainApp and one module (Overview) have been attached to this email.
>
>
>
>
>
> On Thu, Dec 30, 2021 at 6:22 PM Harbs <ha...@gmail.com> wrote:
>
> Roman, can you share your full compiler options?
>
>
>
> I decided to remove the below settings completely
> -export-public-symbols=false
> -prevent-rename-protected-symbols=false
> -prevent-rename-public-symbols=false
> -prevent-rename-internal-symbols=false
>
>
> I enabled the below settings
>
> -js-dynamic-access-unknown-members=true;
> -js-default-initializers=true
>
>
> The release version starts up
>
>
>
> Hiedra, that’s great!
>
>
>
> On Dec 30, 2021, at 7:15 PM, Roman Isitua <ro...@gmail.com> wrote:
>
>
>
>
>
> Yes. I am testing with the sdk compiled on branch ROYALE_INTERFACE_INFO
>
>
>
> On Thu, Dec 30, 2021 at 6:10 PM Maria Jose Esteve <mj...@iest.com>
> wrote:
>
> Roman, are you testing with the SDK compiled from the Harb branches,
> ROYALE_INTERFACE_INFO, or from develop?
>
>
>
> Hiedra
>
>
>
> *De:* Roman Isitua <ro...@gmail.com>
> *Enviado el:* jueves, 30 de diciembre de 2021 16:52
> *Para:* users@royale.apache.org
> *Asunto:* Re: Compiling Modules (was Re: Load time is very slow)
>
>
>
> I decided to remove the below settings completely
> -export-public-symbols=false
> -prevent-rename-protected-symbols=false
> -prevent-rename-public-symbols=false
> -prevent-rename-internal-symbols=false
>
>
> I enabled the below settings
>
> -js-dynamic-access-unknown-members=true;
> -js-default-initializers=true
>
>
> The release version starts up
>
>
>
>
>
>
>
> <image001.png>
>
>
>
>
>
> <image002.png>
>
>
>
> However, the moment I launch a module. I get the below error
>
>
>
> <image003.png>
>
>
>
>
>
> It appears to be failing when I launch the "*Overview*" module
> (by clicking the Overview side menu).
>
>
>
> So my current observation is that by retaining only two settings
>
>
>
> -js-dynamic-access-unknown-members=true;
> -js-default-initializers=true
>
>
>
> The release module starts up but the app fails whenever I launch a module.
>
>
>
> The smallest size settings in the documentation do not work. The app does
> not start up.
>
>
>
> -export-public-symbols=false
> -prevent-rename-protected-symbols=false
> -prevent-rename-public-symbols=false
> -prevent-rename-internal-symbols=false
>
>
>
>
>
>
>
> The error trace is below
>
>
>
>
>
> Uncaught TypeError: cm.valuesImpl.init is not a function
> at Wr.Rr.pl
> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwr.rr.pl%2F&data=04%7C01%7Caharui%40adobe.com%7C8d6c8c929bca4c1a021508d9d7886a40%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637777803175756125%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=WA5E1tARmJ%2FYUPxrROjA8XNebrEzJu5LQU7lvI9MOAQ%3D&reserved=0>
> (Overview.js:792)
> at Function.mq.generateMXMLProperties (Overview.js:743)
> at Wr.lq.generateMXMLAttributes (Overview.js:551)
> at new Wr (Overview.js:810)
> at QN.J.loadHandler (FrontEnd.js:1978)
> 3Overview.js:56 Uncaught TypeError: Cannot read properties of undefined
> (reading 'prototype')
> at P (Overview.js:56)
> at VG.convert (FrontEnd.js:910)
> at ny (FrontEnd.js:250)
> at HTMLElement.iy (FrontEnd.js:125)
> at HTMLElement.b (FrontEnd.js:121)
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOut (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOver (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOver @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOut (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOut @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOver (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOver @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOut (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOut @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOver (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOver @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOut (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOut @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOver (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOver @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOut (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOut @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
>
>
>
> On Thu, Dec 30, 2021 at 4:32 PM Roman Isitua <ro...@gmail.com>
> wrote:
>
> I get the same error even when I set
> the -js-dynamic-access-unknown-members=true;
>
>
>
> On Thu, Dec 30, 2021 at 4:24 PM Roman Isitua <ro...@gmail.com>
> wrote:
>
>
>
> Using the below settings,
>
> -export-public-symbols=false
> -prevent-rename-protected-symbols=false
> -prevent-rename-public-symbols=false
> -prevent-rename-internal-symbols=false
> -js-dynamic-access-unknown-members=false;
>
> -js-default-initializers=true
>
>
> Debug version runs fine. The release version does not start up
>
> <image004.png>
>
>
> I get the below errors
>
> Uncaught TypeError: Cannot read properties of undefined (reading 'apply')
> at KE.hm (FrontEnd.js:1600)
> at XE.M.Fb (FrontEnd.js:943)
> at XE.M.uh (FrontEnd.js:937)
> at FE.M.na
> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Ffe.m.na%2F&data=04%7C01%7Caharui%40adobe.com%7C8d6c8c929bca4c1a021508d9d7886a40%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637777803175756125%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=OGhFJpANWfvex%2B1cYlKYfHtqiLXY3BS6L3yEOGVL8gM%3D&reserved=0>
> (FrontEnd.js:497)
> at FE.M.v (FrontEnd.js:497)
> at dR.M.S (FrontEnd.js:213)
> at dR.Nz.S (FrontEnd.js:217)
> at dR.M.start (FrontEnd.js:1396)
> at index.html:45
> :8080/favicon.ico:1 Failed to load resource: the server responded with a
> status of 404 (Not Found)
>
>
>
>
>
> FrontEnd.js is the start up class for the application. i.e. It implements
> the Jewel application class.
>
>
>
>
>
>
>
> On Thu, Dec 30, 2021 at 3:19 PM Roman Isitua <ro...@gmail.com>
> wrote:
>
> Hi Harb,
>
>
>
> Thanks for your response. I have gone through the documentation. I will do
> my test again starting with the smallest size option and share my findings.
>
>
>
> Regards,
>
>
>
> On Thu, Dec 30, 2021 at 10:59 AM Harbs <ha...@gmail.com> wrote:
>
> Sorry for my deal in responding.
>
>
>
> Let’s take a step back.
>
>
>
> I’m not sure how you are compiling your modules. I just added some content
> to the module documentation page which explains what compiler options you
> need while compiling modules. (It still needs some editing.)
> https://apache.github.io/royale-docs/features/modules#minification
> <https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapache.github.io%2Froyale-docs%2Ffeatures%2Fmodules%23minification&data=04%7C01%7Caharui%40adobe.com%7C8d6c8c929bca4c1a021508d9d7886a40%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637777803175756125%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=d2bmQw9WoJJ41DlrzBNMGnr0GoBmVNAbZcmPYPXXigQ%3D&reserved=0>
>
>
>
> Are you using those options?
>
>
>
> On Dec 29, 2021, at 2:19 AM, Maria Jose Esteve <mj...@iest.com> wrote:
>
>
>
> Hi, Let me join you with these tests....
>
>
>
> @Harb, I have compiled the SDK from this branch, feature/ROYALE_INTERFACE_INFO,
> and when running in debug I get this error:
>
>
>
> Message on the PURGE CONSOLE is displayed:
>
>
>
> Cannot convert org.apache.royale.reflection.beads.ClassAliasBead to IBead
>
>
>
> Message in the IDE Window:
>
>
>
> Se produjo una excepción: TypeError: Cannot convert [object Object] to
> IBead
>
> at App.org.apache.royale.core.ElementWrapper.addBead (
> http://localhost:8080/WNetSuitePlus/org/apache/royale/core/ElementWrapper.js:114:11
> )
>
> at App.org.apache.royale.core.HTMLElementWrapper.addBead (
> http://localhost:8080/WNetSuitePlus/org/apache/royale/core/HTMLElementWrapper.js:43:65
> )
>
> at App.org.apache.royale.jewel.Application.start (
> http://localhost:8080/WNetSuitePlus/org/apache/royale/jewel/Application.js:246:10
> )
>
> at App.App_loadXML (http://localhost:8080/WNetSuitePlus/App.js:1681:25
> )
>
> at
> org.apache.royale.net.URLLoader.org.apache.royale.events.EventDispatcher.fireListeners
> (
> http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:97:23
> )
>
> at Function.goog.events.EventTarget.dispatchEventInternal_ (
> http://localhost:8080/WNetSuitePlus/library/closure/goog/events/eventtarget.js:381:26
> )
>
> at
> org.apache.royale.net.URLLoader.org.apache.royale.events.EventDispatcher.dispatchEvent
> (
> http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:72:37
> )
>
> at org.apache.royale.net.URLLoader.jsEventHandler (
> http://localhost:8080/WNetSuitePlus/org/apache/royale/net/URLLoader.js:169:12
> )
>
>
>
> Call stack:
>
>
>
> <image003.png>
>
>
>
> [INFO] Executing MXMLC in tool group Royale with args: [
>
>
> -load-config=D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\compile-app-config.xml,
>
> -js-default-initializers=true,
>
> -source-map=true,
>
> -js-dynamic-access-unknown-members=true,
>
>
> -keep-as3-metadata+=Inject,Dispatcher,EventHandler,Event,PostConstruct,PreDestroy,ViewAdded,ViewRemoved,Bindable,Transient,
>
> -keep-code-with-metadata=Inject,
>
> -show-binding-warnings=false,
>
> -export-public-symbols=false,
>
> -prevent-rename-protected-symbols=false,
>
> -prevent-rename-internal-symbols=false,
>
>
> -js-output=D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\javascript,
>
> -compiler.targets=JSRoyale,
>
>
> D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\src\main\royale\App.mxml
>
>
>
>
>
> The release execution does not change, the error is the same as before
> (SDK compilation from the develop branch):
>
>
>
> Se produjo una excepción: ReferenceError: Error #1065: Variable
> com.iest.winplusweb.models.MasterConfigSystemModel is not defined.
>
> at yR (http://localhost:8080/WPWebRelease/App.js:3605:1771)
>
> at Mya (http://localhost:8080/WPWebRelease/App.js:3343:365)
>
> at AR.J.usa (http://localhost:8080/WPWebRelease/App.js:434:441)
>
> at GFa.J.fromTypeDefinition (
> http://localhost:8080/WPWebRelease/App.js:5706:139)
>
> at Function.YT.getTypeDescriptor (
> http://localhost:8080/WPWebRelease/App.js:4570:820)
>
> at Function.fX.constructBean (
> http://localhost:8080/WPWebRelease/App.js:2336:472)
>
> at r$.J.initialize (http://localhost:8080/WPWebRelease/App.js:5041:66)
>
> at OW.J.init (http://localhost:8080/WPWebRelease/App.js:950:452)
>
> at OW.J.u (http://localhost:8080/WPWebRelease/App.js:951:454)
>
> at $$.J.addBead (http://localhost:8080/WPWebRelease/App.js:357:549)
>
>
>
> The main difference:
>
> project compiled from "SDK-develop" runs fine in js-debug and gives error
> in js-release and, compiled from "SDK-ROYALE_INTERFACE_INFO" does not
> launch because of conversion error.
>
>
>
> Hiedra
>
>
>
> *De:* Roman Isitua <ro...@gmail.com>
> *Enviado el:* martes, 28 de diciembre de 2021 15:55
> *Para:* users@royale.apache.org
> *Asunto:* Re: Load time is very slow
>
>
>
> @Harb
>
>
>
> I have checked out the feature/ROYALE_INTERFACE_INFO branch and compiled
> asjs and compiler. I have rebuilt my application with modules in release
> mode.
>
>
>
>
Re: Compiling Modules (was Re: Load time is very slow)
Posted by Alex Harui <ah...@adobe.com>.
I updated the royale-compiler and royale-asjs ReleaseModules branches. The examples/royale/ModuleExample now works for me in both Ant and Maven.
HTH,
-Alex
From: Alex Harui <ah...@adobe.com>
Reply-To: "users@royale.apache.org" <us...@royale.apache.org>
Date: Friday, January 14, 2022 at 10:05 AM
To: "users@royale.apache.org" <us...@royale.apache.org>
Subject: Re: Compiling Modules (was Re: Load time is very slow)
Hi Roman,
I saw this and similar entries in the MainApp.xml that was attached:
<royale.export-public-symbols>-export-public-symbols=false;</royale.export-public-symbols>
It’s been a while since I used Maven, but we don’t want these options to be false.
I thought Maven picked up settings from src/main/config/compile-app-config.xml, but I guess not, so you’ll have to make the changes I made to the example’s src/main/config/compile-app-config.xml files in MainApp and Module in your pom.xml files.
I don’t know if I’ll have time this weekend to update the pom.xml files in the branch and test on Maven so hopefully you can figure it out.
Then, if it still doesn’t work, post the updated target/compile-app-config.xml files and figure out how to make the .JS files accessible so I can look at them.
Good luck, hope it works,
-Alex
From: Roman Isitua <ro...@gmail.com>
Reply-To: "users@royale.apache.org" <us...@royale.apache.org>
Date: Friday, January 14, 2022 at 6:30 AM
To: "users@royale.apache.org" <us...@royale.apache.org>
Subject: Re: Compiling Modules (was Re: Load time is very slow)
Find my responses to your questions below
On Fri, Jan 14, 2022 at 12:19 AM Alex Harui <ah...@adobe.com>> wrote:
Hi Roman,
All prevent-rename options should be set to true or left to their default values. Looks like they are false in the main app.
I ensured that they are left to their defaults. They are not specified in the respective pom's for main app and module.
Please post the contents of the compile-app-config.xml files.
I have attached the compile-app-config.xml files for mainApp and module to this email.
Also, please make sure the bin/js-debug folders have been deleted before compiling.
I can confirm that this is always the case.
The compile-app-config.xml files contain the prevent-rename-object-keys setting in the example. You can specify it for your app in compile-app-config.xml as well.
I don't see this key setting applied in the compile-app-config.xml. I guess something is wrong. (See the attached files). I copied these files from the target folders that are generated after a successful build of main app and module respectively.
Then if it still doesn’t work, I’ll want to see the bin/js-release folders. You can attach them to a Git Issue if it doesn’t contain sensitive information or we can discuss other ways.
Please, what is the purpose of compile-app-config.xml ? I am just discovering that I have it in the MainApp project. it is located in src\main\config. I don't have it for the module.
I am using maven to build the project.
-Alex
From: Roman Isitua <ro...@gmail.com>>
Reply-To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Date: Thursday, January 13, 2022 at 2:50 PM
To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Subject: Re: Compiling Modules (was Re: Load time is very slow)
I have performed the test.
- I created a new branch locally called ReleaseModules for compiler and asjs respectively. (git branch ReleaseModules)
- check out to ReleaseModules for compiler and asjs respectively. (git checkout ReleaseModules)
- Then pulled from ReleaseModules. (git pull origin ReleaseModules) for compiler and asjs respectively.
- Then built the compiler and asjs respectively. (mvn clean install)
I am still unable to load the module. However the error is different from the previous test.
[cid:17e58978ee8cb971f161]
The error log
Failed to load resource: the server responded with a status of 404 (Not Found)
Overview.js:1270 Uncaught TypeError: Cannot read properties of undefined (reading 'init')
at A_Aeh.A_A.g.h.v.$d.Qo (Overview.js:1270:627)
at Function.A_A.g.h.i.Ua.generateMXMLProperties (Overview.js:1196:316)
at A_Aeh.A_A.g.h.v.qc.generateMXMLAttributes (Overview.js:930:358)
at new A_Aeh (Overview.js:1296:431)
at MN.J.loadHandler (FrontEnd.js:1963:188)
Let me also share the compilation settings used. (correct me if I am wrong)
for main app
--- royale-maven-plugin:0.9.9-SNAPSHOT:compile-app (default-compile-app) @ MainApp ---
[INFO] Executing MXMLC in tool group Royale with args: [-load-config=C:\Users\nyemi\git\SpacioFM2\SpacioFM2\FmClient2\MainApp\target\compile-app-config.xml, -compiler.show-binding-warnings=false, -source-map=false, -js-default-initializers=true, -js-dynamic-access-unknown-members=true, -keep-as3-metadata+=Inject,Dispatcher,EventHandler,PostConstruct,PreDestroy,ViewAdded,ViewRemoved,Bindable,Transient, -js-output=C:\Users\nyemi\git\SpacioFM2\SpacioFM2\FmClient2\MainApp\target\javascript, -compiler.targets=JSRoyale, C:\Users\nyemi\git\SpacioFM2\SpacioFM2\FmClient2\MainApp\src\main\royale\FrontEnd.mxml]
for the module
[INFO] --- royale-maven-plugin:0.9.9-SNAPSHOT:compile-app (default-compile-app) @ Overview ---
[INFO] Executing MXMLC in tool group Royale with args: [-load-config=C:\Users\nyemi\git\SpacioFM2\SpacioFM2\FmClient2\Overview\target\compile-app-config.xml, -compiler.show-binding-warnings=false, -source-map=false, -js-default-initializers=true, -js-dynamic-access-unknown-members=true, -js-output=C:\Users\nyemi\git\SpacioFM2\SpacioFM2\FmClient2\Overview\target\javascript, -compiler.targets=JSRoyale, C:\Users\nyemi\git\SpacioFM2\SpacioFM2\FmClient2\Overview\src\main\royale\Overview.mxml]
I can't see the -prevent-rename-object-keys you mentioned being supplied automatically.
I have attached the pom's for the maven project so you can inspect the settings I used. I am not sure that I am applying them correctly.
MainApp.xml is the Main application. Overview.xml is the module. FmClient2.xml is the parent project.
Regards,
On Wed, Jan 12, 2022 at 9:04 AM Alex Harui <ah...@adobe.com>> wrote:
I pushed a ReleaseModules branch in royale-compiler and royale-asjs.
These changes cause the royale-asjs/examples/royale/ModuleExample release version to work.
The big challenge is that it turned out there is a fair amount of infrastructure that is not exported/public. The Language utilities, ROYALE_CLASS_INFO, the superclass_ property, cssData and others are going to get renamed. And thus renamed differently in the main app vs the module.
That’s why the current compiler’s strategy was to try to copy the renaming map from the main app to the module, but it didn’t always work. There seems to be a bug in the Closure Compiler that a set of externs causes the compiler to mis-handle package-paths. Also, it meant that the module contained its own copy of most of the infrastructure
The new compiler strategy is a bit more like the old Flex module strategy. The module tries to not contain a copy of code that already exists in the main app. Some of the goog/base.js stuff still gets copied though. Then because we avoid renaming more things, the module can reference the shared infrastructure in the main app.
The new compiler detects if what is being compiled is a loader of modules (because it is generating an externs-report) or is a Module and prevents renaming of Language APIs, modified base.js to not rename the superClass_ property used for calling super() and a few other things. In addition, I added a -prevent-rename-object-keys compiler option that works as a post-processor. It scans the js files being copied into bin/js-debug and adds quotes around things.
By making these changes, I was able to get the closure compiler to mis-handle the packages in a more predictable way, so another thing the new compiler does is post-process the output file to remove the incorrect package code. The incorrect code would re-init package paths like “org” or “org.apache.royale”.
Anyway, give it a try and see if it works. Probably we’ll find out there is more infrastructure that needs to not be renamed, but I think this has a better chance of working as we aren’t blocked by the compiler outputting bad code. Many months ago I tried to understand how why the Closure Compiler output bad code, but ran out of time.
Another difference is that the new compiler strategy doesn’t use custom overrides of Closure Compiler passes which was fragile and will make it easier to upgrade to newer versions of Closure Compiler.
HTH,
-Alex
From: Alex Harui <ah...@adobe.com>>
Reply-To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Date: Wednesday, January 5, 2022 at 9:53 AM
To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Subject: Re: Compiling Modules (was Re: Load time is very slow)
I probably won’t have time to really dig into this until the weekend. It is looking like the Closure Compiler gets confused when presented with externs for the same package tree that the module is generating new classes for.
-Alex
From: Roman Isitua <ro...@gmail.com>>
Reply-To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Date: Tuesday, January 4, 2022 at 1:57 PM
To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Subject: Re: Compiling Modules (was Re: Load time is very slow)
Okay. I knew I was missing something.
I will test again when the update for load-externs is available.
On Tue, Jan 4, 2022 at 6:02 PM Alex Harui <ah...@adobe.com>> wrote:
Essentially, -externs-report is for the Closure (JS) Compiler. -link-report and -load-externs (one leading ‘-‘) is for the Royale Compiler to tell the Royale Compiler what classes to feed to the Closure Compiler. Both contain the same data (the set of classes used in the main app), just formatted differently and used differently.
The –externs option for the Closure Compiler then tells the Closure Compiler not to look for classes in the set of files it is supposed to minify.
So, you have the right settings for the main app, but for the module, it should be:
-js-compiler-option=--externs extrep.txt; -load-externs linkrep.txt;
However, even that won’t work today, as the Royale Compiler is not handling -load-externs on the JS prep for Closure Compiler. I have some local changes to the compiler that mixes most of it, but am facing issues with how Closure handles package paths. If that can be resolved, then we have a good chance of things working.
-Alex
From: Roman Isitua <ro...@gmail.com>>
Reply-To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Date: Tuesday, January 4, 2022 at 12:39 AM
To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Subject: Re: Compiling Modules (was Re: Load time is very slow)
Thanks for the update.
I attempted the following:
1. In the main application, I use the following setting:
-externs-report=extrep.txt; -link-report=linkrep.txt;
2. In the module I use the following
-js-compiler-option=--externs extrep.txt; -js-compiler-option+=--load-externs linkrep.txt;
The main application compiles successfully, I get a compilation error with the module
"--load-externs" is not a valid option
Sample usage: --compilation_level (-O) VAL --externs VAL --js VAL --js_output_file VAL --warning_level (-W) [QUIET | DEFAULT
| VERBOSE]
Run with --help for all options and details
Internal error: java.lang.NullPointerException com.google.javascript.jscomp.CommandLineRunner.createOptions(CommandLineRunner.java:1809)org.apache.royale.compiler.utils.JSClosureCompilerWrapper$CompilerOptionsParser.getOptions(JSClosureCompilerWrapper.java:529)org.apache.royale.compiler.utils.JSClosureCompilerWrapper.<init>(JSClosureCompilerWrapper.java:77)org.apache.royale.compiler.internal.codegen.mxml.royale.MXMLRoyalePublisher.publish(MXMLRoyalePublisher.java:395)org.apache.royale.compiler.clients.M
I don't think I am using this option correctly.
.....
On Tue, Jan 4, 2022 at 8:44 AM Alex Harui <ah...@adobe.com>> wrote:
I found some time to investigate. The -externs-report option is mostly working correctly, but other compiler changes are needed to try to avoid duplicate code in the module. I might have time to investigate more this coming weekend. It does appear that if we can correctly reference the app’s class from the module that it will work. The Closure Compiler let me compile the module after I externalize and avoid requires on everything in the main app’s externs report and -js link report, but the references in the module have collapsed packages which is either incorrect or aliases need to be created.
However I think this new approach has a better chance of working than trying to match renaming tables.
-Alex
From: Alex Harui <ah...@adobe.com>>
Reply-To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Date: Monday, January 3, 2022 at 2:30 PM
To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Subject: Re: Compiling Modules (was Re: Load time is very slow)
The -externs-report option should be similar to the -link-report option. It takes a filename. The compiler should output the classes used in the JS compile into that file. To use externs, I think you don’t need to prevent renaming in the application as long as public variables are exported. I think you specify -externs-report when compiling the application.
You may also need to output a -link-report from the application as well.
I think you then specify the externs-report file as an -externs for the -js-compiler-options when compiling the module. And maybe also specify the -link-report output as a -load-externs in the same way it was used when compiling Flex modules. The goal for the module is, like Flex, to not have any classes in the module that exist in the main app. Then it doesn’t matter about class renaming within the release-mode JS file.
HTH,
-Alex
From: Roman Isitua <ro...@gmail.com>>
Reply-To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Date: Monday, January 3, 2022 at 12:37 PM
To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Subject: Re: Compiling Modules (was Re: Load time is very slow)
I can confirm that classes are being renamed in both files.
I have attempted your suggestion i.e. removing variable maps and property maps then use
-externs-report;-export-public-symbols=true;-prevent-rename-public-symbols=true;
I get the below error
command line Error: configuration variable 'externs-report' expected 1 argument(s), got 0.
I cannot find any documentation on how to use the -externs-report argument. What does it do ? and what are the acceptable values ?
Regards,
On Sun, Jan 2, 2022 at 9:06 AM Alex Harui <ah...@adobe.com>> wrote:
Hi Roman,
It might be more complicated. The settings are probably doing something since you reported that the error occurred in the app vs the module depending on the settings.
I went back and looked at the original module example in examples/royale/ModuleExample and was surprised there weren’t more compiler settings. I thought we’d found a way to externalize the main app’s code for the module. Because if both the app and module have a copy of SimpleCSSValuesImpl or any other class that both JS files use, there could be issues as to which one gets loaded (maybe both) and what export aliases are pointing to. Sounds like changing settings affected whether the aliases pointed at module code vs app code.
I thought we were using similar settings to what we used for SWF where the module would not contain a copy of SimpleCSSValuesImpl so it would use the one loaded by the main app, but I didn’t see those settings. We might need to make that work because otherwise I think static initializations won’t do the right thing. Or maybe we’ve figured out that it is simpler just to write defensive code that doesn’t get broken. But also, if the module has its own copy of code already loaded by the main app, that’s sort of a waste of bytes. Maybe there was a minification issue with not having the module link in classes already linked into the main app. I see an -externs-report option in the compiler but the example doesn’t seem to use it.
You should be able to scan the JS files and see if a class is in both module and app and if it is getting renamed.
I don’t know if I will have time to investigate further. The currently recommended options for modules involving variable maps and property maps may need to be abandoned in favor of externs and preventing renames.
-Alex
From: Roman Isitua <ro...@gmail.com>>
Reply-To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Date: Saturday, January 1, 2022 at 3:02 AM
To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Subject: Re: Compiling Modules (was Re: Load time is very slow)
Alex, thank you for your detailed analysis of the error log.
I agree with you that the best strategy is to prevent renaming of public/exports used by the module. I have tried different options to prevent renaming
It appears none of them stops this. From my observation, it appears that this default options below
-export-public-symbols=true;-prevent-rename-public-symbols=true;-prevent-rename-public-instance-accessors=true;
Only seem to affect the main application (main module) but have no effect on the other modules even though I ensured they were applied in their respective module pom. I came to this conclusion when I decided to turn set -prevent-rename-public-symbols=false
I noticed that I got the same error but this time around in the main module.
Uncaught TypeError: this.rb[(intermediate value).Kd(...)] is not a function
at HN.iI.send (FrontEnd.js:970)
at nI.EH.Ea (FrontEnd.js:880)
at ON.q6 (FrontEnd.js:1815)
at TN.L2 (FrontEnd.js:2034)
at hF.Xf (FrontEnd.js:2063)
at lF.kb (FrontEnd.js:1233)
at lF.Vf (FrontEnd.js:1224)
at cF.O (FrontEnd.js:659)
at cF.M.w (FrontEnd.js:661)
at gQ.mA.M (FrontEnd.js:241)
FrontEnd.js maps to FrontEnd.as in my application and is the entry point of the application. This confirms that -prevent-rename-public-symbols=false has
an effect on the main module but no effect on other modules even though they were applied in the respective module pom's.
Maybe there are other options I am overlooking.
On Sat, Jan 1, 2022 at 9:31 AM Alex Harui <ah...@adobe.com>> wrote:
In case it helps, the minification (variable renaming) mechanism is essentially guaranteed to cause problems in modules. The Closure Compiler basically takes variables, sees if it is worth renaming it, then gives it the name ‘a’, then ‘b’, and so-on, (it skips a few letters, IIRC), then moves on to ‘aa’, and ‘ab’, etc. The odds that the compiler will encounter the same variables in the same order when compiling an app and one or more modules is close to zero.
I did some work to try to dump the mapping of the renamed variables in the main app and use that when compiling the modules. It was working for a while, then some code was added to the framework that started fooling the Closure Compiler. I spent some time trying to fix the Closure Compiler, but ran out of time. Meanwhile, Josh was adding more control over renaming so I moved on to other things.
IMO, the best strategy to take would be to try to control what gets renamed. All public/exports from the app that are used by the module should not be renamed. That will definitely make the app and modules bigger, but unless the Closure Compiler folks become interested in runtime-loaded modules, it is challenging for the Royale compiler to allow aggressive renaming.
I think what is going on with the exceptions below is that exporting doesn’t really prevent renaming. It only sets up an externally-visible alias to a renamed variable. Especially for static members. So it isn’t sufficient to export public variables, the code within the module must not let the Closure Compiler think that the intra-module references can be renamed, in this case, from SimpleCSSValuesImpl to QI
I don’t know the renaming options we’ve added to the Royale Compiler, so I don’t know if there is an option to control that. I think there is a way to convince the Closure Compiler to not rename SimpleCSSValuesImpl because I’ve seen other class names not get renamed.
HTH,
-Alex
From: Roman Isitua <ro...@gmail.com>>
Reply-To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Date: Friday, December 31, 2021 at 10:42 AM
To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Subject: Re: Compiling Modules (was Re: Load time is very slow)
I have tested on both. The error log is the same.
I don't understand your second question. Kindly clarify ?
I followed strictly the approach used for loading modules here in this example.
This is the only method I know for loading modules. If there is another method please share.
https://royale.apache.org/dividing-an-apache-royale-application-with-modules/<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Froyale.apache.org%2Fdividing-an-apache-royale-application-with-modules%2F&data=04%7C01%7Caharui%40adobe.com%7C8d6c8c929bca4c1a021508d9d7886a40%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637777803175756125%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=vwqT3zwtSTn2Ak7QU%2BmVloKLXaIv145LpLG8PByzWJU%3D&reserved=0>
On Fri, 31 Dec 2021, 19:14 Maria Jose Esteve, <mj...@iest.com>> wrote:
@Roman, which branch did you compile the SDK from, ROYALE_INTERFACE_INFO or develop?
Could you pass the Overview.mxml view to the main application? (to rule it out)
Hiedra
De: Roman Isitua <ro...@gmail.com>>
Enviado el: viernes, 31 de diciembre de 2021 17:56
Para: users@royale.apache.org<ma...@royale.apache.org>
Asunto: Re: Compiling Modules (was Re: Load time is very slow)
I have tried tracing where the errors are happening whenever I test the release version
Uncaught TypeError: Ql.valuesImpl.init is not a function
at Hr.Cr.um (Overview.js:846)
at Function.ep.generateMXMLProperties (Overview.js:795)
at Hr.Sp.generateMXMLAttributes (Overview.js:599)
at new Hr (Overview.js:864)
at PN.M.loadHandler (FrontEnd.js:2042)
9Overview.js:173 Uncaught TypeError: this.createElement is not a function
at $B.V (Overview.js:173)
at new $B (FrontEnd.js:2430)
at EP.convert (FrontEnd.js:2430)
at Zy (FrontEnd.js:261)
at HTMLAnchorElement.Uy (FrontEnd.js:121)
at HTMLAnchorElement.Sy.b (FrontEnd.js:117)
The highlighted code in red is declared as follows in the Overview.mxml (maven module)
<j:valuesImpl>
<js:SimpleCSSValuesImpl/>
</j:valuesImpl>
The j:valuesImpl points to the following code in jewel Module.js
/**
* @nocollapse
* @export
* @type {org.apache.royale.core.IValuesImpl}
*/
org.apache.royale.jewel.Module.prototype.valuesImpl;
org.apache.royale.jewel.Module.prototype.set__valuesImpl = function(value) {
org.apache.royale.core.ValuesManager.valuesImpl.init(this);
};
it appears this function is improperly renamed and whenever the app tries to load the module is not able to recognise it as a function.
The same issue of improper function renaming is happening in the second error as well
9Overview.js:173 Uncaught TypeError: this.createElement is not a function
On Thu, Dec 30, 2021 at 10:42 PM Roman Isitua <ro...@gmail.com>> wrote:
I have applied the js compiler option as follows
<additionalCompilerOptions>-source-map=false;-compiler.show-binding-warnings=false;-js-default-initializers=true;-js-dynamic-access-unknown-members=true;
-js-compiler-option=--variable_map_output_file gccvars.txt;-js-compiler-option+=--property_map_output_file gccprops.txt
</additionalCompilerOptions>
I get the same error as before when attempting to launch the jewel module.
Error! Filename not specified.
Same error trace.
Uncaught TypeError: cm.valuesImpl.init is not a function
at Rr.Mr.yl (Overview.js:786)
at Function.iq.generateMXMLProperties (Overview.js:736)
at Rr.hq.generateMXMLAttributes (Overview.js:546)
at new Rr (Overview.js:804)
at LN.J.loadHandler (FrontEnd.js:1967)
FrontEnd.js:1640 Uncaught TypeError: M is not a function
at oM.J.handleMouseOut (FrontEnd.js:1640)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:248)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
FrontEnd.js:1640 Uncaught TypeError: M is not a function
at oM.J.handleMouseOver (FrontEnd.js:1640)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:248)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
FrontEnd.js:1640 Uncaught TypeError: M is not a function
at oM.J.handleMouseOut (FrontEnd.js:1640)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:248)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
FrontEnd.js:1640 Uncaught TypeError: M is not a function
at oM.J.handleMouseOver (FrontEnd.js:1640)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:248)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
FrontEnd.js:1640 Uncaught TypeError: M is not a function
at oM.J.handleMouseOut (FrontEnd.js:1640)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:248)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
FrontEnd.js:1640 Uncaught TypeError: M is not a function
at oM.J.handleMouseOver (FrontEnd.js:1640)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:248)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
FrontEnd.js:1640 Uncaught TypeError: M is not a function
at oM.J.handleMouseOut (FrontEnd.js:1640)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:248)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
3Overview.js:56 Uncaught TypeError: Cannot read properties of undefined (reading 'prototype')
at P (Overview.js:56)
at SG.convert (FrontEnd.js:904)
at ny (FrontEnd.js:248)
at HTMLElement.iy (FrontEnd.js:125)
at HTMLElement.b (FrontEnd.js:121)
On Thu, Dec 30, 2021 at 6:56 PM Harbs <ha...@gmail.com>> wrote:
1. I’d get rid of the agressive minification options. It will likely cause issues. If you get it to work without those options, you can try to add them back in and see if it still works.
2. You seem to be missing the compiler options explained here: https://apache.github.io/royale-docs/features/modules#minification<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapache.github.io%2Froyale-docs%2Ffeatures%2Fmodules%23minification&data=04%7C01%7Caharui%40adobe.com%7C8d6c8c929bca4c1a021508d9d7886a40%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637777803175756125%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=d2bmQw9WoJJ41DlrzBNMGnr0GoBmVNAbZcmPYPXXigQ%3D&reserved=0>
For a pom, it would look something like this (adjust your paths to match your setup):
Main app:
<additionalCompilerOptions>-source-map=true;-js-compiler-option=--variable_map_output_file gccvars.txt;-js-compiler-option+=--property_map_output_file gccprops.txt</additionalCompilerOptions>
Module:
<additionalCompilerOptions>-source-map=true;-js-compiler-option=--variable_map_input_file ../../../../../MainApp/bin/js-release/gccvars.txt;-js-compiler-option+=--property_map_input_file ../../../../../MainApp/bin/js-release/gccprops.txt</additionalCompilerOptions>
On Dec 30, 2021, at 7:43 PM, Roman Isitua <ro...@gmail.com>> wrote:
I think it will be better for me to share my pom's that way you can see all the compilation options used. The pom for the parent (FmClient2), the MainApp and one module (Overview) have been attached to this email.
On Thu, Dec 30, 2021 at 6:22 PM Harbs <ha...@gmail.com>> wrote:
Roman, can you share your full compiler options?
I decided to remove the below settings completely
-export-public-symbols=false
-prevent-rename-protected-symbols=false
-prevent-rename-public-symbols=false
-prevent-rename-internal-symbols=false
I enabled the below settings
-js-dynamic-access-unknown-members=true;
-js-default-initializers=true
The release version starts up
Hiedra, that’s great!
On Dec 30, 2021, at 7:15 PM, Roman Isitua <ro...@gmail.com>> wrote:
Yes. I am testing with the sdk compiled on branch ROYALE_INTERFACE_INFO
On Thu, Dec 30, 2021 at 6:10 PM Maria Jose Esteve <mj...@iest.com>> wrote:
Roman, are you testing with the SDK compiled from the Harb branches, ROYALE_INTERFACE_INFO, or from develop?
Hiedra
De: Roman Isitua <ro...@gmail.com>>
Enviado el: jueves, 30 de diciembre de 2021 16:52
Para: users@royale.apache.org<ma...@royale.apache.org>
Asunto: Re: Compiling Modules (was Re: Load time is very slow)
I decided to remove the below settings completely
-export-public-symbols=false
-prevent-rename-protected-symbols=false
-prevent-rename-public-symbols=false
-prevent-rename-internal-symbols=false
I enabled the below settings
-js-dynamic-access-unknown-members=true;
-js-default-initializers=true
The release version starts up
<image001.png>
<image002.png>
However, the moment I launch a module. I get the below error
<image003.png>
It appears to be failing when I launch the "Overview" module (by clicking the Overview side menu).
So my current observation is that by retaining only two settings
-js-dynamic-access-unknown-members=true;
-js-default-initializers=true
The release module starts up but the app fails whenever I launch a module.
The smallest size settings in the documentation do not work. The app does not start up.
-export-public-symbols=false
-prevent-rename-protected-symbols=false
-prevent-rename-public-symbols=false
-prevent-rename-internal-symbols=false
The error trace is below
Uncaught TypeError: cm.valuesImpl.init is not a function
at Wr.Rr.pl<https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwr.rr.pl%2F&data=04%7C01%7Caharui%40adobe.com%7C8d6c8c929bca4c1a021508d9d7886a40%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637777803175756125%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=WA5E1tARmJ%2FYUPxrROjA8XNebrEzJu5LQU7lvI9MOAQ%3D&reserved=0> (Overview.js:792)
at Function.mq.generateMXMLProperties (Overview.js:743)
at Wr.lq.generateMXMLAttributes (Overview.js:551)
at new Wr (Overview.js:810)
at QN.J.loadHandler (FrontEnd.js:1978)
3Overview.js:56 Uncaught TypeError: Cannot read properties of undefined (reading 'prototype')
at P (Overview.js:56)
at VG.convert (FrontEnd.js:910)
at ny (FrontEnd.js:250)
at HTMLElement.iy (FrontEnd.js:125)
at HTMLElement.b (FrontEnd.js:121)
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOut (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOver (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOver @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOut (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOut @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOver (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOver @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOut (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOut @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOver (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOver @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOut (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOut @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOver (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOver @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOut (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOut @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
On Thu, Dec 30, 2021 at 4:32 PM Roman Isitua <ro...@gmail.com>> wrote:
I get the same error even when I set the -js-dynamic-access-unknown-members=true;
On Thu, Dec 30, 2021 at 4:24 PM Roman Isitua <ro...@gmail.com>> wrote:
Using the below settings,
-export-public-symbols=false
-prevent-rename-protected-symbols=false
-prevent-rename-public-symbols=false
-prevent-rename-internal-symbols=false
-js-dynamic-access-unknown-members=false;
-js-default-initializers=true
Debug version runs fine. The release version does not start up
<image004.png>
I get the below errors
Uncaught TypeError: Cannot read properties of undefined (reading 'apply')
at KE.hm (FrontEnd.js:1600)
at XE.M.Fb (FrontEnd.js:943)
at XE.M.uh (FrontEnd.js:937)
at FE.M.na<https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Ffe.m.na%2F&data=04%7C01%7Caharui%40adobe.com%7C8d6c8c929bca4c1a021508d9d7886a40%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637777803175756125%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=OGhFJpANWfvex%2B1cYlKYfHtqiLXY3BS6L3yEOGVL8gM%3D&reserved=0> (FrontEnd.js:497)
at FE.M.v (FrontEnd.js:497)
at dR.M.S (FrontEnd.js:213)
at dR.Nz.S (FrontEnd.js:217)
at dR.M.start (FrontEnd.js:1396)
at index.html:45
:8080/favicon.ico:1 Failed to load resource: the server responded with a status of 404 (Not Found)
FrontEnd.js is the start up class for the application. i.e. It implements the Jewel application class.
On Thu, Dec 30, 2021 at 3:19 PM Roman Isitua <ro...@gmail.com>> wrote:
Hi Harb,
Thanks for your response. I have gone through the documentation. I will do my test again starting with the smallest size option and share my findings.
Regards,
On Thu, Dec 30, 2021 at 10:59 AM Harbs <ha...@gmail.com>> wrote:
Sorry for my deal in responding.
Let’s take a step back.
I’m not sure how you are compiling your modules. I just added some content to the module documentation page which explains what compiler options you need while compiling modules. (It still needs some editing.) https://apache.github.io/royale-docs/features/modules#minification<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapache.github.io%2Froyale-docs%2Ffeatures%2Fmodules%23minification&data=04%7C01%7Caharui%40adobe.com%7C8d6c8c929bca4c1a021508d9d7886a40%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637777803175756125%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=d2bmQw9WoJJ41DlrzBNMGnr0GoBmVNAbZcmPYPXXigQ%3D&reserved=0>
Are you using those options?
On Dec 29, 2021, at 2:19 AM, Maria Jose Esteve <mj...@iest.com>> wrote:
Hi, Let me join you with these tests....
@Harb, I have compiled the SDK from this branch, feature/ROYALE_INTERFACE_INFO, and when running in debug I get this error:
Message on the PURGE CONSOLE is displayed:
Cannot convert org.apache.royale.reflection.beads.ClassAliasBead to IBead
Message in the IDE Window:
Se produjo una excepción: TypeError: Cannot convert [object Object] to IBead
at App.org.apache.royale.core.ElementWrapper.addBead (http://localhost:8080/WNetSuitePlus/org/apache/royale/core/ElementWrapper.js:114:11)
at App.org.apache.royale.core.HTMLElementWrapper.addBead (http://localhost:8080/WNetSuitePlus/org/apache/royale/core/HTMLElementWrapper.js:43:65)
at App.org.apache.royale.jewel.Application.start (http://localhost:8080/WNetSuitePlus/org/apache/royale/jewel/Application.js:246:10)
at App.App_loadXML (http://localhost:8080/WNetSuitePlus/App.js:1681:25)
at org.apache.royale.net.URLLoader.org.apache.royale.events.EventDispatcher.fireListeners (http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:97:23)
at Function.goog.events.EventTarget.dispatchEventInternal_ (http://localhost:8080/WNetSuitePlus/library/closure/goog/events/eventtarget.js:381:26)
at org.apache.royale.net.URLLoader.org.apache.royale.events.EventDispatcher.dispatchEvent (http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:72:37)
at org.apache.royale.net.URLLoader.jsEventHandler (http://localhost:8080/WNetSuitePlus/org/apache/royale/net/URLLoader.js:169:12)
Call stack:
<image003.png>
[INFO] Executing MXMLC in tool group Royale with args: [
-load-config=D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\compile-app-config.xml,
-js-default-initializers=true,
-source-map=true,
-js-dynamic-access-unknown-members=true,
-keep-as3-metadata+=Inject,Dispatcher,EventHandler,Event,PostConstruct,PreDestroy,ViewAdded,ViewRemoved,Bindable,Transient,
-keep-code-with-metadata=Inject,
-show-binding-warnings=false,
-export-public-symbols=false,
-prevent-rename-protected-symbols=false,
-prevent-rename-internal-symbols=false,
-js-output=D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\javascript,
-compiler.targets=JSRoyale,
D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\src\main\royale\App.mxml
The release execution does not change, the error is the same as before (SDK compilation from the develop branch):
Se produjo una excepción: ReferenceError: Error #1065: Variable com.iest.winplusweb.models.MasterConfigSystemModel is not defined.
at yR (http://localhost:8080/WPWebRelease/App.js:3605:1771)
at Mya (http://localhost:8080/WPWebRelease/App.js:3343:365)
at AR.J.usa (http://localhost:8080/WPWebRelease/App.js:434:441)
at GFa.J.fromTypeDefinition (http://localhost:8080/WPWebRelease/App.js:5706:139)
at Function.YT.getTypeDescriptor (http://localhost:8080/WPWebRelease/App.js:4570:820)
at Function.fX.constructBean (http://localhost:8080/WPWebRelease/App.js:2336:472)
at r$.J.initialize (http://localhost:8080/WPWebRelease/App.js:5041:66)
at OW.J.init (http://localhost:8080/WPWebRelease/App.js:950:452)
at OW.J.u (http://localhost:8080/WPWebRelease/App.js:951:454)
at $$.J.addBead (http://localhost:8080/WPWebRelease/App.js:357:549)
The main difference:
project compiled from "SDK-develop" runs fine in js-debug and gives error in js-release and, compiled from "SDK-ROYALE_INTERFACE_INFO" does not launch because of conversion error.
Hiedra
De: Roman Isitua <ro...@gmail.com>>
Enviado el: martes, 28 de diciembre de 2021 15:55
Para: users@royale.apache.org<ma...@royale.apache.org>
Asunto: Re: Load time is very slow
@Harb
I have checked out the feature/ROYALE_INTERFACE_INFO branch and compiled asjs and compiler. I have rebuilt my application with modules in release mode.
I get the following error when I attempt to launch a module
<image001.png>
The module loads fine in debug mode
<image002.png>
Snippets of the log
Overview.js:786 Uncaught TypeError: cm.valuesImpl.init is not a function
at Rr.Mr.yl (Overview.js:786)
at Function.iq.generateMXMLProperties (Overview.js:736)
at Rr.hq.generateMXMLAttributes (Overview.js:546)
at new Rr (Overview.js:804)
at LN.J.loadHandler (FrontEnd.js:1967)
Mr.yl @ Overview.js:786
iq.generateMXMLProperties @ Overview.js:736
hq.generateMXMLAttributes @ Overview.js:546
Rr @ Overview.js:804
J.loadHandler @ FrontEnd.js:1967
load (async)
LN.loadModule @ FrontEnd.js:1965
dN.loadModule @ FrontEnd.js:2406
LD.Un @ FrontEnd.js:1809
ny @ FrontEnd.js:123
ny @ FrontEnd.js:248
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
I have attached the full log to this email.
On Tue, Dec 28, 2021 at 2:51 PM Roman Isitua <ro...@gmail.com>> wrote:
Hi Maria,
Prior to starting this mail discussion "Load time is very slow". I can confirm I have only been compiling in debug mode. My target\javascript\bin\ only had js-debug. It was after I upgraded my royale sdk from 0.9.7 to 0.9.8 that I compiled in release mode.
On Tue, Dec 28, 2021 at 2:24 PM Maria Jose Esteve <mj...@iest.com>> wrote:
Hi, @Roman, I think you are doing a double compile can it be? My times are the same as yours and I always compile in debug and release.
Look at your target folder " target\javascript\bin\" and if you have two folders: js-debug and js-release you are compiling always double.
In my case, the architecture of my project as well as the Maven compilation files (pom.xml) were provided by an external company (we didn't know anything about Maven or Royale at that time) and I understand that this formula was chosen to show us the options we had.
A priori and without doing any test as Harb has done, I think that modularity gives us the advantage of compiling parts of the code once and not compiling them again if they are not modified. So far WITH MY COMPILATION TIMES, sometimes more than 1 minute, this is fundamental. But of course, now we have the problem of minification of the modules and it is really a serious problem because it is impossible for us to deploy in production.
I will try to separate the compiación realese with a profile and if I succeed I will pass it to you @Roman.
@Harb what do you mean by compiling the ROYALE_INTERFACE_INFO branch?
Hiedra
De: Harbs <ha...@gmail.com>>
Enviado el: lunes, 27 de diciembre de 2021 18:32
Para: users@royale.apache.org<ma...@royale.apache.org>
Asunto: Re: Load time is very slow
That doesn’t sound right.
Are you sure you’re compiling debug and not release? That sounds like release build times.
On Dec 27, 2021, at 3:31 PM, Roman Isitua <ro...@gmail.com>> wrote:
Wow ! You are using a workstation with a bleeding edge processor.
I just compiled my app now. It took 44 seconds. (First compilation after ide start up.) Subsequently compilations are usually 19s to 20s.
My application code base is very very small compared to yours. As we continue to add functionality, I expect the compile times to rise.
<MainApp_pom.xml><Overview_pom.xml><fm_client2_pom.xml>
Re: Compiling Modules (was Re: Load time is very slow)
Posted by Alex Harui <ah...@adobe.com>.
Hi Roman,
I saw this and similar entries in the MainApp.xml that was attached:
<royale.export-public-symbols>-export-public-symbols=false;</royale.export-public-symbols>
It’s been a while since I used Maven, but we don’t want these options to be false.
I thought Maven picked up settings from src/main/config/compile-app-config.xml, but I guess not, so you’ll have to make the changes I made to the example’s src/main/config/compile-app-config.xml files in MainApp and Module in your pom.xml files.
I don’t know if I’ll have time this weekend to update the pom.xml files in the branch and test on Maven so hopefully you can figure it out.
Then, if it still doesn’t work, post the updated target/compile-app-config.xml files and figure out how to make the .JS files accessible so I can look at them.
Good luck, hope it works,
-Alex
From: Roman Isitua <ro...@gmail.com>
Reply-To: "users@royale.apache.org" <us...@royale.apache.org>
Date: Friday, January 14, 2022 at 6:30 AM
To: "users@royale.apache.org" <us...@royale.apache.org>
Subject: Re: Compiling Modules (was Re: Load time is very slow)
Find my responses to your questions below
On Fri, Jan 14, 2022 at 12:19 AM Alex Harui <ah...@adobe.com>> wrote:
Hi Roman,
All prevent-rename options should be set to true or left to their default values. Looks like they are false in the main app.
I ensured that they are left to their defaults. They are not specified in the respective pom's for main app and module.
Please post the contents of the compile-app-config.xml files.
I have attached the compile-app-config.xml files for mainApp and module to this email.
Also, please make sure the bin/js-debug folders have been deleted before compiling.
I can confirm that this is always the case.
The compile-app-config.xml files contain the prevent-rename-object-keys setting in the example. You can specify it for your app in compile-app-config.xml as well.
I don't see this key setting applied in the compile-app-config.xml. I guess something is wrong. (See the attached files). I copied these files from the target folders that are generated after a successful build of main app and module respectively.
Then if it still doesn’t work, I’ll want to see the bin/js-release folders. You can attach them to a Git Issue if it doesn’t contain sensitive information or we can discuss other ways.
Please, what is the purpose of compile-app-config.xml ? I am just discovering that I have it in the MainApp project. it is located in src\main\config. I don't have it for the module.
I am using maven to build the project.
-Alex
From: Roman Isitua <ro...@gmail.com>>
Reply-To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Date: Thursday, January 13, 2022 at 2:50 PM
To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Subject: Re: Compiling Modules (was Re: Load time is very slow)
I have performed the test.
- I created a new branch locally called ReleaseModules for compiler and asjs respectively. (git branch ReleaseModules)
- check out to ReleaseModules for compiler and asjs respectively. (git checkout ReleaseModules)
- Then pulled from ReleaseModules. (git pull origin ReleaseModules) for compiler and asjs respectively.
- Then built the compiler and asjs respectively. (mvn clean install)
I am still unable to load the module. However the error is different from the previous test.
[cid:17e58978ee8cb971f161]
The error log
Failed to load resource: the server responded with a status of 404 (Not Found)
Overview.js:1270 Uncaught TypeError: Cannot read properties of undefined (reading 'init')
at A_Aeh.A_A.g.h.v.$d.Qo (Overview.js:1270:627)
at Function.A_A.g.h.i.Ua.generateMXMLProperties (Overview.js:1196:316)
at A_Aeh.A_A.g.h.v.qc.generateMXMLAttributes (Overview.js:930:358)
at new A_Aeh (Overview.js:1296:431)
at MN.J.loadHandler (FrontEnd.js:1963:188)
Let me also share the compilation settings used. (correct me if I am wrong)
for main app
--- royale-maven-plugin:0.9.9-SNAPSHOT:compile-app (default-compile-app) @ MainApp ---
[INFO] Executing MXMLC in tool group Royale with args: [-load-config=C:\Users\nyemi\git\SpacioFM2\SpacioFM2\FmClient2\MainApp\target\compile-app-config.xml, -compiler.show-binding-warnings=false, -source-map=false, -js-default-initializers=true, -js-dynamic-access-unknown-members=true, -keep-as3-metadata+=Inject,Dispatcher,EventHandler,PostConstruct,PreDestroy,ViewAdded,ViewRemoved,Bindable,Transient, -js-output=C:\Users\nyemi\git\SpacioFM2\SpacioFM2\FmClient2\MainApp\target\javascript, -compiler.targets=JSRoyale, C:\Users\nyemi\git\SpacioFM2\SpacioFM2\FmClient2\MainApp\src\main\royale\FrontEnd.mxml]
for the module
[INFO] --- royale-maven-plugin:0.9.9-SNAPSHOT:compile-app (default-compile-app) @ Overview ---
[INFO] Executing MXMLC in tool group Royale with args: [-load-config=C:\Users\nyemi\git\SpacioFM2\SpacioFM2\FmClient2\Overview\target\compile-app-config.xml, -compiler.show-binding-warnings=false, -source-map=false, -js-default-initializers=true, -js-dynamic-access-unknown-members=true, -js-output=C:\Users\nyemi\git\SpacioFM2\SpacioFM2\FmClient2\Overview\target\javascript, -compiler.targets=JSRoyale, C:\Users\nyemi\git\SpacioFM2\SpacioFM2\FmClient2\Overview\src\main\royale\Overview.mxml]
I can't see the -prevent-rename-object-keys you mentioned being supplied automatically.
I have attached the pom's for the maven project so you can inspect the settings I used. I am not sure that I am applying them correctly.
MainApp.xml is the Main application. Overview.xml is the module. FmClient2.xml is the parent project.
Regards,
On Wed, Jan 12, 2022 at 9:04 AM Alex Harui <ah...@adobe.com>> wrote:
I pushed a ReleaseModules branch in royale-compiler and royale-asjs.
These changes cause the royale-asjs/examples/royale/ModuleExample release version to work.
The big challenge is that it turned out there is a fair amount of infrastructure that is not exported/public. The Language utilities, ROYALE_CLASS_INFO, the superclass_ property, cssData and others are going to get renamed. And thus renamed differently in the main app vs the module.
That’s why the current compiler’s strategy was to try to copy the renaming map from the main app to the module, but it didn’t always work. There seems to be a bug in the Closure Compiler that a set of externs causes the compiler to mis-handle package-paths. Also, it meant that the module contained its own copy of most of the infrastructure
The new compiler strategy is a bit more like the old Flex module strategy. The module tries to not contain a copy of code that already exists in the main app. Some of the goog/base.js stuff still gets copied though. Then because we avoid renaming more things, the module can reference the shared infrastructure in the main app.
The new compiler detects if what is being compiled is a loader of modules (because it is generating an externs-report) or is a Module and prevents renaming of Language APIs, modified base.js to not rename the superClass_ property used for calling super() and a few other things. In addition, I added a -prevent-rename-object-keys compiler option that works as a post-processor. It scans the js files being copied into bin/js-debug and adds quotes around things.
By making these changes, I was able to get the closure compiler to mis-handle the packages in a more predictable way, so another thing the new compiler does is post-process the output file to remove the incorrect package code. The incorrect code would re-init package paths like “org” or “org.apache.royale”.
Anyway, give it a try and see if it works. Probably we’ll find out there is more infrastructure that needs to not be renamed, but I think this has a better chance of working as we aren’t blocked by the compiler outputting bad code. Many months ago I tried to understand how why the Closure Compiler output bad code, but ran out of time.
Another difference is that the new compiler strategy doesn’t use custom overrides of Closure Compiler passes which was fragile and will make it easier to upgrade to newer versions of Closure Compiler.
HTH,
-Alex
From: Alex Harui <ah...@adobe.com>>
Reply-To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Date: Wednesday, January 5, 2022 at 9:53 AM
To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Subject: Re: Compiling Modules (was Re: Load time is very slow)
I probably won’t have time to really dig into this until the weekend. It is looking like the Closure Compiler gets confused when presented with externs for the same package tree that the module is generating new classes for.
-Alex
From: Roman Isitua <ro...@gmail.com>>
Reply-To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Date: Tuesday, January 4, 2022 at 1:57 PM
To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Subject: Re: Compiling Modules (was Re: Load time is very slow)
Okay. I knew I was missing something.
I will test again when the update for load-externs is available.
On Tue, Jan 4, 2022 at 6:02 PM Alex Harui <ah...@adobe.com>> wrote:
Essentially, -externs-report is for the Closure (JS) Compiler. -link-report and -load-externs (one leading ‘-‘) is for the Royale Compiler to tell the Royale Compiler what classes to feed to the Closure Compiler. Both contain the same data (the set of classes used in the main app), just formatted differently and used differently.
The –externs option for the Closure Compiler then tells the Closure Compiler not to look for classes in the set of files it is supposed to minify.
So, you have the right settings for the main app, but for the module, it should be:
-js-compiler-option=--externs extrep.txt; -load-externs linkrep.txt;
However, even that won’t work today, as the Royale Compiler is not handling -load-externs on the JS prep for Closure Compiler. I have some local changes to the compiler that mixes most of it, but am facing issues with how Closure handles package paths. If that can be resolved, then we have a good chance of things working.
-Alex
From: Roman Isitua <ro...@gmail.com>>
Reply-To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Date: Tuesday, January 4, 2022 at 12:39 AM
To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Subject: Re: Compiling Modules (was Re: Load time is very slow)
Thanks for the update.
I attempted the following:
1. In the main application, I use the following setting:
-externs-report=extrep.txt; -link-report=linkrep.txt;
2. In the module I use the following
-js-compiler-option=--externs extrep.txt; -js-compiler-option+=--load-externs linkrep.txt;
The main application compiles successfully, I get a compilation error with the module
"--load-externs" is not a valid option
Sample usage: --compilation_level (-O) VAL --externs VAL --js VAL --js_output_file VAL --warning_level (-W) [QUIET | DEFAULT
| VERBOSE]
Run with --help for all options and details
Internal error: java.lang.NullPointerException com.google.javascript.jscomp.CommandLineRunner.createOptions(CommandLineRunner.java:1809)org.apache.royale.compiler.utils.JSClosureCompilerWrapper$CompilerOptionsParser.getOptions(JSClosureCompilerWrapper.java:529)org.apache.royale.compiler.utils.JSClosureCompilerWrapper.<init>(JSClosureCompilerWrapper.java:77)org.apache.royale.compiler.internal.codegen.mxml.royale.MXMLRoyalePublisher.publish(MXMLRoyalePublisher.java:395)org.apache.royale.compiler.clients.M
I don't think I am using this option correctly.
.....
On Tue, Jan 4, 2022 at 8:44 AM Alex Harui <ah...@adobe.com>> wrote:
I found some time to investigate. The -externs-report option is mostly working correctly, but other compiler changes are needed to try to avoid duplicate code in the module. I might have time to investigate more this coming weekend. It does appear that if we can correctly reference the app’s class from the module that it will work. The Closure Compiler let me compile the module after I externalize and avoid requires on everything in the main app’s externs report and -js link report, but the references in the module have collapsed packages which is either incorrect or aliases need to be created.
However I think this new approach has a better chance of working than trying to match renaming tables.
-Alex
From: Alex Harui <ah...@adobe.com>>
Reply-To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Date: Monday, January 3, 2022 at 2:30 PM
To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Subject: Re: Compiling Modules (was Re: Load time is very slow)
The -externs-report option should be similar to the -link-report option. It takes a filename. The compiler should output the classes used in the JS compile into that file. To use externs, I think you don’t need to prevent renaming in the application as long as public variables are exported. I think you specify -externs-report when compiling the application.
You may also need to output a -link-report from the application as well.
I think you then specify the externs-report file as an -externs for the -js-compiler-options when compiling the module. And maybe also specify the -link-report output as a -load-externs in the same way it was used when compiling Flex modules. The goal for the module is, like Flex, to not have any classes in the module that exist in the main app. Then it doesn’t matter about class renaming within the release-mode JS file.
HTH,
-Alex
From: Roman Isitua <ro...@gmail.com>>
Reply-To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Date: Monday, January 3, 2022 at 12:37 PM
To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Subject: Re: Compiling Modules (was Re: Load time is very slow)
I can confirm that classes are being renamed in both files.
I have attempted your suggestion i.e. removing variable maps and property maps then use
-externs-report;-export-public-symbols=true;-prevent-rename-public-symbols=true;
I get the below error
command line Error: configuration variable 'externs-report' expected 1 argument(s), got 0.
I cannot find any documentation on how to use the -externs-report argument. What does it do ? and what are the acceptable values ?
Regards,
On Sun, Jan 2, 2022 at 9:06 AM Alex Harui <ah...@adobe.com>> wrote:
Hi Roman,
It might be more complicated. The settings are probably doing something since you reported that the error occurred in the app vs the module depending on the settings.
I went back and looked at the original module example in examples/royale/ModuleExample and was surprised there weren’t more compiler settings. I thought we’d found a way to externalize the main app’s code for the module. Because if both the app and module have a copy of SimpleCSSValuesImpl or any other class that both JS files use, there could be issues as to which one gets loaded (maybe both) and what export aliases are pointing to. Sounds like changing settings affected whether the aliases pointed at module code vs app code.
I thought we were using similar settings to what we used for SWF where the module would not contain a copy of SimpleCSSValuesImpl so it would use the one loaded by the main app, but I didn’t see those settings. We might need to make that work because otherwise I think static initializations won’t do the right thing. Or maybe we’ve figured out that it is simpler just to write defensive code that doesn’t get broken. But also, if the module has its own copy of code already loaded by the main app, that’s sort of a waste of bytes. Maybe there was a minification issue with not having the module link in classes already linked into the main app. I see an -externs-report option in the compiler but the example doesn’t seem to use it.
You should be able to scan the JS files and see if a class is in both module and app and if it is getting renamed.
I don’t know if I will have time to investigate further. The currently recommended options for modules involving variable maps and property maps may need to be abandoned in favor of externs and preventing renames.
-Alex
From: Roman Isitua <ro...@gmail.com>>
Reply-To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Date: Saturday, January 1, 2022 at 3:02 AM
To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Subject: Re: Compiling Modules (was Re: Load time is very slow)
Alex, thank you for your detailed analysis of the error log.
I agree with you that the best strategy is to prevent renaming of public/exports used by the module. I have tried different options to prevent renaming
It appears none of them stops this. From my observation, it appears that this default options below
-export-public-symbols=true;-prevent-rename-public-symbols=true;-prevent-rename-public-instance-accessors=true;
Only seem to affect the main application (main module) but have no effect on the other modules even though I ensured they were applied in their respective module pom. I came to this conclusion when I decided to turn set -prevent-rename-public-symbols=false
I noticed that I got the same error but this time around in the main module.
Uncaught TypeError: this.rb[(intermediate value).Kd(...)] is not a function
at HN.iI.send (FrontEnd.js:970)
at nI.EH.Ea (FrontEnd.js:880)
at ON.q6 (FrontEnd.js:1815)
at TN.L2 (FrontEnd.js:2034)
at hF.Xf (FrontEnd.js:2063)
at lF.kb (FrontEnd.js:1233)
at lF.Vf (FrontEnd.js:1224)
at cF.O (FrontEnd.js:659)
at cF.M.w (FrontEnd.js:661)
at gQ.mA.M (FrontEnd.js:241)
FrontEnd.js maps to FrontEnd.as in my application and is the entry point of the application. This confirms that -prevent-rename-public-symbols=false has
an effect on the main module but no effect on other modules even though they were applied in the respective module pom's.
Maybe there are other options I am overlooking.
On Sat, Jan 1, 2022 at 9:31 AM Alex Harui <ah...@adobe.com>> wrote:
In case it helps, the minification (variable renaming) mechanism is essentially guaranteed to cause problems in modules. The Closure Compiler basically takes variables, sees if it is worth renaming it, then gives it the name ‘a’, then ‘b’, and so-on, (it skips a few letters, IIRC), then moves on to ‘aa’, and ‘ab’, etc. The odds that the compiler will encounter the same variables in the same order when compiling an app and one or more modules is close to zero.
I did some work to try to dump the mapping of the renamed variables in the main app and use that when compiling the modules. It was working for a while, then some code was added to the framework that started fooling the Closure Compiler. I spent some time trying to fix the Closure Compiler, but ran out of time. Meanwhile, Josh was adding more control over renaming so I moved on to other things.
IMO, the best strategy to take would be to try to control what gets renamed. All public/exports from the app that are used by the module should not be renamed. That will definitely make the app and modules bigger, but unless the Closure Compiler folks become interested in runtime-loaded modules, it is challenging for the Royale compiler to allow aggressive renaming.
I think what is going on with the exceptions below is that exporting doesn’t really prevent renaming. It only sets up an externally-visible alias to a renamed variable. Especially for static members. So it isn’t sufficient to export public variables, the code within the module must not let the Closure Compiler think that the intra-module references can be renamed, in this case, from SimpleCSSValuesImpl to QI
I don’t know the renaming options we’ve added to the Royale Compiler, so I don’t know if there is an option to control that. I think there is a way to convince the Closure Compiler to not rename SimpleCSSValuesImpl because I’ve seen other class names not get renamed.
HTH,
-Alex
From: Roman Isitua <ro...@gmail.com>>
Reply-To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Date: Friday, December 31, 2021 at 10:42 AM
To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Subject: Re: Compiling Modules (was Re: Load time is very slow)
I have tested on both. The error log is the same.
I don't understand your second question. Kindly clarify ?
I followed strictly the approach used for loading modules here in this example.
This is the only method I know for loading modules. If there is another method please share.
https://royale.apache.org/dividing-an-apache-royale-application-with-modules/<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Froyale.apache.org%2Fdividing-an-apache-royale-application-with-modules%2F&data=04%7C01%7Caharui%40adobe.com%7C20af1c6c8bd846f8b9b408d9d76a6b35%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637777674386421825%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=eLfH85UhI0%2F3UoxYSTDQRv3tts4WN1dbAz6o6iveX8Q%3D&reserved=0>
On Fri, 31 Dec 2021, 19:14 Maria Jose Esteve, <mj...@iest.com>> wrote:
@Roman, which branch did you compile the SDK from, ROYALE_INTERFACE_INFO or develop?
Could you pass the Overview.mxml view to the main application? (to rule it out)
Hiedra
De: Roman Isitua <ro...@gmail.com>>
Enviado el: viernes, 31 de diciembre de 2021 17:56
Para: users@royale.apache.org<ma...@royale.apache.org>
Asunto: Re: Compiling Modules (was Re: Load time is very slow)
I have tried tracing where the errors are happening whenever I test the release version
Uncaught TypeError: Ql.valuesImpl.init is not a function
at Hr.Cr.um (Overview.js:846)
at Function.ep.generateMXMLProperties (Overview.js:795)
at Hr.Sp.generateMXMLAttributes (Overview.js:599)
at new Hr (Overview.js:864)
at PN.M.loadHandler (FrontEnd.js:2042)
9Overview.js:173 Uncaught TypeError: this.createElement is not a function
at $B.V (Overview.js:173)
at new $B (FrontEnd.js:2430)
at EP.convert (FrontEnd.js:2430)
at Zy (FrontEnd.js:261)
at HTMLAnchorElement.Uy (FrontEnd.js:121)
at HTMLAnchorElement.Sy.b (FrontEnd.js:117)
The highlighted code in red is declared as follows in the Overview.mxml (maven module)
<j:valuesImpl>
<js:SimpleCSSValuesImpl/>
</j:valuesImpl>
The j:valuesImpl points to the following code in jewel Module.js
/**
* @nocollapse
* @export
* @type {org.apache.royale.core.IValuesImpl}
*/
org.apache.royale.jewel.Module.prototype.valuesImpl;
org.apache.royale.jewel.Module.prototype.set__valuesImpl = function(value) {
org.apache.royale.core.ValuesManager.valuesImpl.init(this);
};
it appears this function is improperly renamed and whenever the app tries to load the module is not able to recognise it as a function.
The same issue of improper function renaming is happening in the second error as well
9Overview.js:173 Uncaught TypeError: this.createElement is not a function
On Thu, Dec 30, 2021 at 10:42 PM Roman Isitua <ro...@gmail.com>> wrote:
I have applied the js compiler option as follows
<additionalCompilerOptions>-source-map=false;-compiler.show-binding-warnings=false;-js-default-initializers=true;-js-dynamic-access-unknown-members=true;
-js-compiler-option=--variable_map_output_file gccvars.txt;-js-compiler-option+=--property_map_output_file gccprops.txt
</additionalCompilerOptions>
I get the same error as before when attempting to launch the jewel module.
Error! Filename not specified.
Same error trace.
Uncaught TypeError: cm.valuesImpl.init is not a function
at Rr.Mr.yl (Overview.js:786)
at Function.iq.generateMXMLProperties (Overview.js:736)
at Rr.hq.generateMXMLAttributes (Overview.js:546)
at new Rr (Overview.js:804)
at LN.J.loadHandler (FrontEnd.js:1967)
FrontEnd.js:1640 Uncaught TypeError: M is not a function
at oM.J.handleMouseOut (FrontEnd.js:1640)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:248)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
FrontEnd.js:1640 Uncaught TypeError: M is not a function
at oM.J.handleMouseOver (FrontEnd.js:1640)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:248)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
FrontEnd.js:1640 Uncaught TypeError: M is not a function
at oM.J.handleMouseOut (FrontEnd.js:1640)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:248)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
FrontEnd.js:1640 Uncaught TypeError: M is not a function
at oM.J.handleMouseOver (FrontEnd.js:1640)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:248)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
FrontEnd.js:1640 Uncaught TypeError: M is not a function
at oM.J.handleMouseOut (FrontEnd.js:1640)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:248)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
FrontEnd.js:1640 Uncaught TypeError: M is not a function
at oM.J.handleMouseOver (FrontEnd.js:1640)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:248)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
FrontEnd.js:1640 Uncaught TypeError: M is not a function
at oM.J.handleMouseOut (FrontEnd.js:1640)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:248)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
3Overview.js:56 Uncaught TypeError: Cannot read properties of undefined (reading 'prototype')
at P (Overview.js:56)
at SG.convert (FrontEnd.js:904)
at ny (FrontEnd.js:248)
at HTMLElement.iy (FrontEnd.js:125)
at HTMLElement.b (FrontEnd.js:121)
On Thu, Dec 30, 2021 at 6:56 PM Harbs <ha...@gmail.com>> wrote:
1. I’d get rid of the agressive minification options. It will likely cause issues. If you get it to work without those options, you can try to add them back in and see if it still works.
2. You seem to be missing the compiler options explained here: https://apache.github.io/royale-docs/features/modules#minification<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapache.github.io%2Froyale-docs%2Ffeatures%2Fmodules%23minification&data=04%7C01%7Caharui%40adobe.com%7C20af1c6c8bd846f8b9b408d9d76a6b35%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637777674386421825%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=qd6jxFarjPb9pDpkIhn7eujwznX32VdVucaEmwiksk8%3D&reserved=0>
For a pom, it would look something like this (adjust your paths to match your setup):
Main app:
<additionalCompilerOptions>-source-map=true;-js-compiler-option=--variable_map_output_file gccvars.txt;-js-compiler-option+=--property_map_output_file gccprops.txt</additionalCompilerOptions>
Module:
<additionalCompilerOptions>-source-map=true;-js-compiler-option=--variable_map_input_file ../../../../../MainApp/bin/js-release/gccvars.txt;-js-compiler-option+=--property_map_input_file ../../../../../MainApp/bin/js-release/gccprops.txt</additionalCompilerOptions>
On Dec 30, 2021, at 7:43 PM, Roman Isitua <ro...@gmail.com>> wrote:
I think it will be better for me to share my pom's that way you can see all the compilation options used. The pom for the parent (FmClient2), the MainApp and one module (Overview) have been attached to this email.
On Thu, Dec 30, 2021 at 6:22 PM Harbs <ha...@gmail.com>> wrote:
Roman, can you share your full compiler options?
I decided to remove the below settings completely
-export-public-symbols=false
-prevent-rename-protected-symbols=false
-prevent-rename-public-symbols=false
-prevent-rename-internal-symbols=false
I enabled the below settings
-js-dynamic-access-unknown-members=true;
-js-default-initializers=true
The release version starts up
Hiedra, that’s great!
On Dec 30, 2021, at 7:15 PM, Roman Isitua <ro...@gmail.com>> wrote:
Yes. I am testing with the sdk compiled on branch ROYALE_INTERFACE_INFO
On Thu, Dec 30, 2021 at 6:10 PM Maria Jose Esteve <mj...@iest.com>> wrote:
Roman, are you testing with the SDK compiled from the Harb branches, ROYALE_INTERFACE_INFO, or from develop?
Hiedra
De: Roman Isitua <ro...@gmail.com>>
Enviado el: jueves, 30 de diciembre de 2021 16:52
Para: users@royale.apache.org<ma...@royale.apache.org>
Asunto: Re: Compiling Modules (was Re: Load time is very slow)
I decided to remove the below settings completely
-export-public-symbols=false
-prevent-rename-protected-symbols=false
-prevent-rename-public-symbols=false
-prevent-rename-internal-symbols=false
I enabled the below settings
-js-dynamic-access-unknown-members=true;
-js-default-initializers=true
The release version starts up
<image001.png>
<image002.png>
However, the moment I launch a module. I get the below error
<image003.png>
It appears to be failing when I launch the "Overview" module (by clicking the Overview side menu).
So my current observation is that by retaining only two settings
-js-dynamic-access-unknown-members=true;
-js-default-initializers=true
The release module starts up but the app fails whenever I launch a module.
The smallest size settings in the documentation do not work. The app does not start up.
-export-public-symbols=false
-prevent-rename-protected-symbols=false
-prevent-rename-public-symbols=false
-prevent-rename-internal-symbols=false
The error trace is below
Uncaught TypeError: cm.valuesImpl.init is not a function
at Wr.Rr.pl<https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwr.rr.pl%2F&data=04%7C01%7Caharui%40adobe.com%7C20af1c6c8bd846f8b9b408d9d76a6b35%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637777674386421825%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=mTOBe%2BVLg7ao6NgsufhYqOXKHHWYk36uR5dZm855Vfk%3D&reserved=0> (Overview.js:792)
at Function.mq.generateMXMLProperties (Overview.js:743)
at Wr.lq.generateMXMLAttributes (Overview.js:551)
at new Wr (Overview.js:810)
at QN.J.loadHandler (FrontEnd.js:1978)
3Overview.js:56 Uncaught TypeError: Cannot read properties of undefined (reading 'prototype')
at P (Overview.js:56)
at VG.convert (FrontEnd.js:910)
at ny (FrontEnd.js:250)
at HTMLElement.iy (FrontEnd.js:125)
at HTMLElement.b (FrontEnd.js:121)
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOut (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOver (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOver @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOut (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOut @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOver (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOver @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOut (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOut @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOver (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOver @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOut (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOut @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOver (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOver @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOut (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOut @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
On Thu, Dec 30, 2021 at 4:32 PM Roman Isitua <ro...@gmail.com>> wrote:
I get the same error even when I set the -js-dynamic-access-unknown-members=true;
On Thu, Dec 30, 2021 at 4:24 PM Roman Isitua <ro...@gmail.com>> wrote:
Using the below settings,
-export-public-symbols=false
-prevent-rename-protected-symbols=false
-prevent-rename-public-symbols=false
-prevent-rename-internal-symbols=false
-js-dynamic-access-unknown-members=false;
-js-default-initializers=true
Debug version runs fine. The release version does not start up
<image004.png>
I get the below errors
Uncaught TypeError: Cannot read properties of undefined (reading 'apply')
at KE.hm (FrontEnd.js:1600)
at XE.M.Fb (FrontEnd.js:943)
at XE.M.uh (FrontEnd.js:937)
at FE.M.na<https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Ffe.m.na%2F&data=04%7C01%7Caharui%40adobe.com%7C20af1c6c8bd846f8b9b408d9d76a6b35%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637777674386421825%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=uyVYFr%2BawIAOnR7Rc1TAh9uA6uYdeVY8DVrprGZAuFA%3D&reserved=0> (FrontEnd.js:497)
at FE.M.v (FrontEnd.js:497)
at dR.M.S (FrontEnd.js:213)
at dR.Nz.S (FrontEnd.js:217)
at dR.M.start (FrontEnd.js:1396)
at index.html:45
:8080/favicon.ico:1 Failed to load resource: the server responded with a status of 404 (Not Found)
FrontEnd.js is the start up class for the application. i.e. It implements the Jewel application class.
On Thu, Dec 30, 2021 at 3:19 PM Roman Isitua <ro...@gmail.com>> wrote:
Hi Harb,
Thanks for your response. I have gone through the documentation. I will do my test again starting with the smallest size option and share my findings.
Regards,
On Thu, Dec 30, 2021 at 10:59 AM Harbs <ha...@gmail.com>> wrote:
Sorry for my deal in responding.
Let’s take a step back.
I’m not sure how you are compiling your modules. I just added some content to the module documentation page which explains what compiler options you need while compiling modules. (It still needs some editing.) https://apache.github.io/royale-docs/features/modules#minification<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapache.github.io%2Froyale-docs%2Ffeatures%2Fmodules%23minification&data=04%7C01%7Caharui%40adobe.com%7C20af1c6c8bd846f8b9b408d9d76a6b35%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637777674386421825%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=qd6jxFarjPb9pDpkIhn7eujwznX32VdVucaEmwiksk8%3D&reserved=0>
Are you using those options?
On Dec 29, 2021, at 2:19 AM, Maria Jose Esteve <mj...@iest.com>> wrote:
Hi, Let me join you with these tests....
@Harb, I have compiled the SDK from this branch, feature/ROYALE_INTERFACE_INFO, and when running in debug I get this error:
Message on the PURGE CONSOLE is displayed:
Cannot convert org.apache.royale.reflection.beads.ClassAliasBead to IBead
Message in the IDE Window:
Se produjo una excepción: TypeError: Cannot convert [object Object] to IBead
at App.org.apache.royale.core.ElementWrapper.addBead (http://localhost:8080/WNetSuitePlus/org/apache/royale/core/ElementWrapper.js:114:11)
at App.org.apache.royale.core.HTMLElementWrapper.addBead (http://localhost:8080/WNetSuitePlus/org/apache/royale/core/HTMLElementWrapper.js:43:65)
at App.org.apache.royale.jewel.Application.start (http://localhost:8080/WNetSuitePlus/org/apache/royale/jewel/Application.js:246:10)
at App.App_loadXML (http://localhost:8080/WNetSuitePlus/App.js:1681:25)
at org.apache.royale.net.URLLoader.org.apache.royale.events.EventDispatcher.fireListeners (http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:97:23)
at Function.goog.events.EventTarget.dispatchEventInternal_ (http://localhost:8080/WNetSuitePlus/library/closure/goog/events/eventtarget.js:381:26)
at org.apache.royale.net.URLLoader.org.apache.royale.events.EventDispatcher.dispatchEvent (http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:72:37)
at org.apache.royale.net.URLLoader.jsEventHandler (http://localhost:8080/WNetSuitePlus/org/apache/royale/net/URLLoader.js:169:12)
Call stack:
<image003.png>
[INFO] Executing MXMLC in tool group Royale with args: [
-load-config=D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\compile-app-config.xml,
-js-default-initializers=true,
-source-map=true,
-js-dynamic-access-unknown-members=true,
-keep-as3-metadata+=Inject,Dispatcher,EventHandler,Event,PostConstruct,PreDestroy,ViewAdded,ViewRemoved,Bindable,Transient,
-keep-code-with-metadata=Inject,
-show-binding-warnings=false,
-export-public-symbols=false,
-prevent-rename-protected-symbols=false,
-prevent-rename-internal-symbols=false,
-js-output=D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\javascript,
-compiler.targets=JSRoyale,
D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\src\main\royale\App.mxml
The release execution does not change, the error is the same as before (SDK compilation from the develop branch):
Se produjo una excepción: ReferenceError: Error #1065: Variable com.iest.winplusweb.models.MasterConfigSystemModel is not defined.
at yR (http://localhost:8080/WPWebRelease/App.js:3605:1771)
at Mya (http://localhost:8080/WPWebRelease/App.js:3343:365)
at AR.J.usa (http://localhost:8080/WPWebRelease/App.js:434:441)
at GFa.J.fromTypeDefinition (http://localhost:8080/WPWebRelease/App.js:5706:139)
at Function.YT.getTypeDescriptor (http://localhost:8080/WPWebRelease/App.js:4570:820)
at Function.fX.constructBean (http://localhost:8080/WPWebRelease/App.js:2336:472)
at r$.J.initialize (http://localhost:8080/WPWebRelease/App.js:5041:66)
at OW.J.init (http://localhost:8080/WPWebRelease/App.js:950:452)
at OW.J.u (http://localhost:8080/WPWebRelease/App.js:951:454)
at $$.J.addBead (http://localhost:8080/WPWebRelease/App.js:357:549)
The main difference:
project compiled from "SDK-develop" runs fine in js-debug and gives error in js-release and, compiled from "SDK-ROYALE_INTERFACE_INFO" does not launch because of conversion error.
Hiedra
De: Roman Isitua <ro...@gmail.com>>
Enviado el: martes, 28 de diciembre de 2021 15:55
Para: users@royale.apache.org<ma...@royale.apache.org>
Asunto: Re: Load time is very slow
@Harb
I have checked out the feature/ROYALE_INTERFACE_INFO branch and compiled asjs and compiler. I have rebuilt my application with modules in release mode.
I get the following error when I attempt to launch a module
<image001.png>
The module loads fine in debug mode
<image002.png>
Snippets of the log
Overview.js:786 Uncaught TypeError: cm.valuesImpl.init is not a function
at Rr.Mr.yl (Overview.js:786)
at Function.iq.generateMXMLProperties (Overview.js:736)
at Rr.hq.generateMXMLAttributes (Overview.js:546)
at new Rr (Overview.js:804)
at LN.J.loadHandler (FrontEnd.js:1967)
Mr.yl @ Overview.js:786
iq.generateMXMLProperties @ Overview.js:736
hq.generateMXMLAttributes @ Overview.js:546
Rr @ Overview.js:804
J.loadHandler @ FrontEnd.js:1967
load (async)
LN.loadModule @ FrontEnd.js:1965
dN.loadModule @ FrontEnd.js:2406
LD.Un @ FrontEnd.js:1809
ny @ FrontEnd.js:123
ny @ FrontEnd.js:248
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
I have attached the full log to this email.
On Tue, Dec 28, 2021 at 2:51 PM Roman Isitua <ro...@gmail.com>> wrote:
Hi Maria,
Prior to starting this mail discussion "Load time is very slow". I can confirm I have only been compiling in debug mode. My target\javascript\bin\ only had js-debug. It was after I upgraded my royale sdk from 0.9.7 to 0.9.8 that I compiled in release mode.
On Tue, Dec 28, 2021 at 2:24 PM Maria Jose Esteve <mj...@iest.com>> wrote:
Hi, @Roman, I think you are doing a double compile can it be? My times are the same as yours and I always compile in debug and release.
Look at your target folder " target\javascript\bin\" and if you have two folders: js-debug and js-release you are compiling always double.
In my case, the architecture of my project as well as the Maven compilation files (pom.xml) were provided by an external company (we didn't know anything about Maven or Royale at that time) and I understand that this formula was chosen to show us the options we had.
A priori and without doing any test as Harb has done, I think that modularity gives us the advantage of compiling parts of the code once and not compiling them again if they are not modified. So far WITH MY COMPILATION TIMES, sometimes more than 1 minute, this is fundamental. But of course, now we have the problem of minification of the modules and it is really a serious problem because it is impossible for us to deploy in production.
I will try to separate the compiación realese with a profile and if I succeed I will pass it to you @Roman.
@Harb what do you mean by compiling the ROYALE_INTERFACE_INFO branch?
Hiedra
De: Harbs <ha...@gmail.com>>
Enviado el: lunes, 27 de diciembre de 2021 18:32
Para: users@royale.apache.org<ma...@royale.apache.org>
Asunto: Re: Load time is very slow
That doesn’t sound right.
Are you sure you’re compiling debug and not release? That sounds like release build times.
On Dec 27, 2021, at 3:31 PM, Roman Isitua <ro...@gmail.com>> wrote:
Wow ! You are using a workstation with a bleeding edge processor.
I just compiled my app now. It took 44 seconds. (First compilation after ide start up.) Subsequently compilations are usually 19s to 20s.
My application code base is very very small compared to yours. As we continue to add functionality, I expect the compile times to rise.
<MainApp_pom.xml><Overview_pom.xml><fm_client2_pom.xml>
Re: Compiling Modules (was Re: Load time is very slow)
Posted by Roman Isitua <ro...@gmail.com>.
Find my responses to your questions below
On Fri, Jan 14, 2022 at 12:19 AM Alex Harui <ah...@adobe.com> wrote:
> Hi Roman,
>
>
>
> All prevent-rename options should be set to true or left to their default
> values. Looks like they are false in the main app.
>
I ensured that they are left to their defaults. They are not specified
in the respective pom's for main app and module.
> Please post the contents of the compile-app-config.xml files.
>
I have attached the compile-app-config.xml files for mainApp and module to
this email.
> Also, please make sure the bin/js-debug folders have been deleted before
> compiling.
>
I can confirm that this is always the case.
> The compile-app-config.xml files contain the prevent-rename-object-keys
> setting in the example. You can specify it for your app in
> compile-app-config.xml as well.
>
I don't see this key setting applied in the compile-app-config.xml. I guess
something is wrong. (See the attached files). I copied these files from the
target folders that are generated after a successful build of main app and
module respectively.
>
>
> Then if it still doesn’t work, I’ll want to see the bin/js-release
> folders. You can attach them to a Git Issue if it doesn’t contain
> sensitive information or we can discuss other ways.
>
Please, what is the purpose of compile-app-config.xml ? I am just
discovering that I have it in the MainApp project. it is located in
src\main\config. I don't have it for the module.
I am using maven to build the project.
>
>
> -Alex
>
>
>
> *From: *Roman Isitua <ro...@gmail.com>
> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Date: *Thursday, January 13, 2022 at 2:50 PM
> *To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Subject: *Re: Compiling Modules (was Re: Load time is very slow)
>
>
>
>
>
> I have performed the test.
>
> - I created a new branch locally called ReleaseModules for compiler and
> asjs respectively. (git branch ReleaseModules)
>
> - check out to ReleaseModules for compiler and asjs respectively. (git
> checkout ReleaseModules)
> - Then pulled from ReleaseModules. (git pull origin ReleaseModules) for
> compiler and asjs respectively.
> - Then built the compiler and asjs respectively. (mvn clean install)
>
> I am still unable to load the module. However the error is different from
> the previous test.
>
>
>
>
>
>
>
> The error log
>
>
>
> Failed to load resource: the server responded with a status of 404 (Not
> Found)
> Overview.js:1270 Uncaught TypeError: Cannot read properties of undefined
> (reading 'init')
> at A_Aeh.A_A.g.h.v.$d.Qo (Overview.js:1270:627)
> at Function.A_A.g.h.i.Ua.generateMXMLProperties (Overview.js:1196:316)
> at A_Aeh.A_A.g.h.v.qc.generateMXMLAttributes (Overview.js:930:358)
> at new A_Aeh (Overview.js:1296:431)
> at MN.J.loadHandler (FrontEnd.js:1963:188)
>
> Let me also share the compilation settings used. (correct me if I am wrong)
>
>
>
> for main app
>
>
>
> --- royale-maven-plugin:0.9.9-SNAPSHOT:compile-app (default-compile-app) @
> MainApp ---
> [INFO] Executing MXMLC in tool group Royale with args:
> [-load-config=C:\Users\nyemi\git\SpacioFM2\SpacioFM2\FmClient2\MainApp\target\compile-app-config.xml,
> -compiler.show-binding-warnings=false, -source-map=false,
> -js-default-initializers=true, -js-dynamic-access-unknown-members=true,
> -keep-as3-metadata+=Inject,Dispatcher,EventHandler,PostConstruct,PreDestroy,ViewAdded,ViewRemoved,Bindable,Transient,
> -js-output=C:\Users\nyemi\git\SpacioFM2\SpacioFM2\FmClient2\MainApp\target\javascript,
> -compiler.targets=JSRoyale,
> C:\Users\nyemi\git\SpacioFM2\SpacioFM2\FmClient2\MainApp\src\main\royale\FrontEnd.mxml]
>
>
>
>
>
> for the module
>
>
>
> [INFO] --- royale-maven-plugin:0.9.9-SNAPSHOT:compile-app
> (default-compile-app) @ Overview ---
> [INFO] Executing MXMLC in tool group Royale with args:
> [-load-config=C:\Users\nyemi\git\SpacioFM2\SpacioFM2\FmClient2\Overview\target\compile-app-config.xml,
> -compiler.show-binding-warnings=false, -source-map=false,
> -js-default-initializers=true, -js-dynamic-access-unknown-members=true,
> -js-output=C:\Users\nyemi\git\SpacioFM2\SpacioFM2\FmClient2\Overview\target\javascript,
> -compiler.targets=JSRoyale,
> C:\Users\nyemi\git\SpacioFM2\SpacioFM2\FmClient2\Overview\src\main\royale\Overview.mxml]
>
>
>
> I can't see the -prevent-rename-object-keys you mentioned being supplied
> automatically.
>
>
>
> I have attached the pom's for the maven project so you can inspect the
> settings I used. I am not sure that I am applying them correctly.
>
> MainApp.xml is the Main application. Overview.xml is the module.
> FmClient2.xml is the parent project.
>
>
>
> Regards,
>
>
>
>
>
> On Wed, Jan 12, 2022 at 9:04 AM Alex Harui <ah...@adobe.com> wrote:
>
> I pushed a ReleaseModules branch in royale-compiler and royale-asjs.
>
>
>
> These changes cause the royale-asjs/examples/royale/ModuleExample release
> version to work.
>
>
>
> The big challenge is that it turned out there is a fair amount of
> infrastructure that is not exported/public. The Language utilities,
> ROYALE_CLASS_INFO, the superclass_ property, cssData and others are going
> to get renamed. And thus renamed differently in the main app vs the module.
>
>
>
> That’s why the current compiler’s strategy was to try to copy the renaming
> map from the main app to the module, but it didn’t always work. There
> seems to be a bug in the Closure Compiler that a set of externs causes the
> compiler to mis-handle package-paths. Also, it meant that the module
> contained its own copy of most of the infrastructure
>
>
>
> The new compiler strategy is a bit more like the old Flex module
> strategy. The module tries to not contain a copy of code that already
> exists in the main app. Some of the goog/base.js stuff still gets copied
> though. Then because we avoid renaming more things, the module can
> reference the shared infrastructure in the main app.
>
>
>
> The new compiler detects if what is being compiled is a loader of modules
> (because it is generating an externs-report) or is a Module and prevents
> renaming of Language APIs, modified base.js to not rename the superClass_
> property used for calling super() and a few other things. In addition, I
> added a -prevent-rename-object-keys compiler option that works as a
> post-processor. It scans the js files being copied into bin/js-debug and
> adds quotes around things.
>
>
>
> By making these changes, I was able to get the closure compiler to
> mis-handle the packages in a more predictable way, so another thing the new
> compiler does is post-process the output file to remove the incorrect
> package code. The incorrect code would re-init package paths like “org” or
> “org.apache.royale”.
>
>
>
> Anyway, give it a try and see if it works. Probably we’ll find out there
> is more infrastructure that needs to not be renamed, but I think this has a
> better chance of working as we aren’t blocked by the compiler outputting
> bad code. Many months ago I tried to understand how why the Closure
> Compiler output bad code, but ran out of time.
>
>
>
> Another difference is that the new compiler strategy doesn’t use custom
> overrides of Closure Compiler passes which was fragile and will make it
> easier to upgrade to newer versions of Closure Compiler.
>
>
>
> HTH,
>
> -Alex
>
>
>
> *From: *Alex Harui <ah...@adobe.com>
> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Date: *Wednesday, January 5, 2022 at 9:53 AM
> *To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Subject: *Re: Compiling Modules (was Re: Load time is very slow)
>
>
>
> I probably won’t have time to really dig into this until the weekend. It
> is looking like the Closure Compiler gets confused when presented with
> externs for the same package tree that the module is generating new classes
> for.
>
>
>
> -Alex
>
>
>
> *From: *Roman Isitua <ro...@gmail.com>
> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Date: *Tuesday, January 4, 2022 at 1:57 PM
> *To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Subject: *Re: Compiling Modules (was Re: Load time is very slow)
>
>
>
> Okay. I knew I was missing something.
>
>
>
> I will test again when the update for load-externs is available.
>
>
>
> On Tue, Jan 4, 2022 at 6:02 PM Alex Harui <ah...@adobe.com> wrote:
>
> Essentially, -externs-report is for the Closure (JS) Compiler.
> -link-report and -load-externs (one leading ‘-‘) is for the Royale Compiler
> to tell the Royale Compiler what classes to feed to the Closure Compiler.
> Both contain the same data (the set of classes used in the main app), just
> formatted differently and used differently.
>
>
>
> The –externs option for the Closure Compiler then tells the Closure
> Compiler not to look for classes in the set of files it is supposed to
> minify.
>
>
>
> So, you have the right settings for the main app, but for the module, it
> should be:
>
> *-js-compiler-option=--externs extrep.txt; -load-externs linkrep.txt;*
>
>
>
> However, even that won’t work today, as the Royale Compiler is not
> handling -load-externs on the JS prep for Closure Compiler. I have some
> local changes to the compiler that mixes most of it, but am facing issues
> with how Closure handles package paths. If that can be resolved, then we
> have a good chance of things working.
>
>
>
> -Alex
>
>
>
> *From: *Roman Isitua <ro...@gmail.com>
> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Date: *Tuesday, January 4, 2022 at 12:39 AM
> *To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Subject: *Re: Compiling Modules (was Re: Load time is very slow)
>
>
>
> Thanks for the update.
>
>
>
> I attempted the following:
>
>
>
> 1. In the main application, I use the following setting:
>
> *-externs-report=extrep.txt; -link-report=linkrep.txt;*
>
>
>
> 2. In the module I use the following
>
>
>
> *-js-compiler-option=--externs extrep.txt;
> -js-compiler-option+=--load-externs linkrep.txt;*
>
>
>
> The main application compiles successfully, I get a compilation error with
> the module
>
>
>
> "--load-externs" is not a valid option
> Sample usage: --compilation_level (-O) VAL --externs VAL --js VAL
> --js_output_file VAL --warning_level (-W) [QUIET | DEFAULT
> | VERBOSE]
> Run with --help for all options and details
> Internal error: java.lang.NullPointerException
> com.google.javascript.jscomp.CommandLineRunner.createOptions(CommandLineRunner.java:1809)org.apache.royale.compiler.utils.JSClosureCompilerWrapper$CompilerOptionsParser.getOptions(JSClosureCompilerWrapper.java:529)org.apache.royale.compiler.utils.JSClosureCompilerWrapper.<init>(JSClosureCompilerWrapper.java:77)org.apache.royale.compiler.internal.codegen.mxml.royale.MXMLRoyalePublisher.publish(MXMLRoyalePublisher.java:395)org.apache.royale.compiler.clients.M
>
>
>
>
>
>
>
> I don't think I am using this option correctly.
>
>
>
>
>
>
>
> .....
>
>
>
> On Tue, Jan 4, 2022 at 8:44 AM Alex Harui <ah...@adobe.com> wrote:
>
> I found some time to investigate. The -externs-report option is mostly
> working correctly, but other compiler changes are needed to try to avoid
> duplicate code in the module. I might have time to investigate more this
> coming weekend. It does appear that if we can correctly reference the
> app’s class from the module that it will work. The Closure Compiler let me
> compile the module after I externalize and avoid requires on everything in
> the main app’s externs report and -js link report, but the references in
> the module have collapsed packages which is either incorrect or aliases
> need to be created.
>
>
>
> However I think this new approach has a better chance of working than
> trying to match renaming tables.
>
>
>
> -Alex
>
>
>
> *From: *Alex Harui <ah...@adobe.com>
> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Date: *Monday, January 3, 2022 at 2:30 PM
> *To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Subject: *Re: Compiling Modules (was Re: Load time is very slow)
>
>
>
> The -externs-report option should be similar to the -link-report option.
> It takes a filename. The compiler should output the classes used in the JS
> compile into that file. To use externs, I think you don’t need to prevent
> renaming in the application as long as public variables are exported. I
> think you specify -externs-report when compiling the application.
>
>
>
> You may also need to output a -link-report from the application as well.
>
>
>
> I think you then specify the externs-report file as an -externs for the
> -js-compiler-options when compiling the module. And maybe also specify the
> -link-report output as a -load-externs in the same way it was used when
> compiling Flex modules. The goal for the module is, like Flex, to not have
> any classes in the module that exist in the main app. Then it doesn’t
> matter about class renaming within the release-mode JS file.
>
>
>
> HTH,
>
> -Alex
>
>
>
> *From: *Roman Isitua <ro...@gmail.com>
> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Date: *Monday, January 3, 2022 at 12:37 PM
> *To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Subject: *Re: Compiling Modules (was Re: Load time is very slow)
>
>
>
>
>
> I can confirm that classes are being renamed in both files.
>
>
>
> I have attempted your suggestion i.e. removing variable maps and property
> maps then use
>
> -externs-report;-export-public-symbols=true;-prevent-rename-public-symbols=true;
>
>
>
>
> I get the below error
>
>
>
> command line Error: configuration variable 'externs-report' expected 1
> argument(s), got 0.
>
>
>
> I cannot find any documentation on how to use the -externs-report
> argument. What does it do ? and what are the acceptable values ?
>
>
>
> Regards,
>
>
>
>
>
> On Sun, Jan 2, 2022 at 9:06 AM Alex Harui <ah...@adobe.com> wrote:
>
> Hi Roman,
>
>
>
> It might be more complicated. The settings are probably doing something
> since you reported that the error occurred in the app vs the module
> depending on the settings.
>
>
>
> I went back and looked at the original module example in
> examples/royale/ModuleExample and was surprised there weren’t more compiler
> settings. I thought we’d found a way to externalize the main app’s code
> for the module. Because if both the app and module have a copy of
> SimpleCSSValuesImpl or any other class that both JS files use, there could
> be issues as to which one gets loaded (maybe both) and what export aliases
> are pointing to. Sounds like changing settings affected whether the
> aliases pointed at module code vs app code.
>
>
>
> I thought we were using similar settings to what we used for SWF where the
> module would not contain a copy of SimpleCSSValuesImpl so it would use the
> one loaded by the main app, but I didn’t see those settings. We might need
> to make that work because otherwise I think static initializations won’t do
> the right thing. Or maybe we’ve figured out that it is simpler just to
> write defensive code that doesn’t get broken. But also, if the module has
> its own copy of code already loaded by the main app, that’s sort of a waste
> of bytes. Maybe there was a minification issue with not having the module
> link in classes already linked into the main app. I see an -externs-report
> option in the compiler but the example doesn’t seem to use it.
>
>
>
> You should be able to scan the JS files and see if a class is in both
> module and app and if it is getting renamed.
>
>
>
> I don’t know if I will have time to investigate further. The currently
> recommended options for modules involving variable maps and property maps
> may need to be abandoned in favor of externs and preventing renames.
>
>
>
> -Alex
>
>
>
>
>
> *From: *Roman Isitua <ro...@gmail.com>
> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Date: *Saturday, January 1, 2022 at 3:02 AM
> *To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Subject: *Re: Compiling Modules (was Re: Load time is very slow)
>
>
>
> Alex, thank you for your detailed analysis of the error log.
>
>
>
> I agree with you that the best strategy is to prevent renaming of
> public/exports used by the module. I have tried different options to
> prevent renaming
>
> It appears none of them stops this. From my observation, it appears that
> this default options below
>
>
>
>
> -export-public-symbols=true;-prevent-rename-public-symbols=true;-prevent-rename-public-instance-accessors=true;
>
>
>
> Only seem to affect the main application (main module) but have no effect
> on the other modules even though I ensured they were applied in
> their respective module pom. I came to this conclusion when I decided to
> turn set -prevent-rename-public-symbols=false
>
>
>
> I noticed that I got the same error but this time around in the main
> module.
>
>
>
> Uncaught TypeError: this.rb[(intermediate value).Kd(...)] is not a function
> at HN.iI.send (FrontEnd.js:970)
> at nI.EH.Ea (FrontEnd.js:880)
> at ON.q6 (FrontEnd.js:1815)
> at TN.L2 (FrontEnd.js:2034)
> at hF.Xf (FrontEnd.js:2063)
> at lF.kb (FrontEnd.js:1233)
> at lF.Vf (FrontEnd.js:1224)
> at cF.O (FrontEnd.js:659)
> at cF.M.w (FrontEnd.js:661)
> at gQ.mA.M (FrontEnd.js:241)
>
>
>
> FrontEnd.js maps to FrontEnd.as in my application and is the entry point
> of the application. This confirms that -prevent-rename-public-symbols=false
> has
>
> an effect on the main module but no effect on other modules even though
> they were applied in the respective module pom's.
>
>
>
> Maybe there are other options I am overlooking.
>
>
>
> On Sat, Jan 1, 2022 at 9:31 AM Alex Harui <ah...@adobe.com> wrote:
>
> In case it helps, the minification (variable renaming) mechanism is
> essentially guaranteed to cause problems in modules. The Closure Compiler
> basically takes variables, sees if it is worth renaming it, then gives it
> the name ‘a’, then ‘b’, and so-on, (it skips a few letters, IIRC), then
> moves on to ‘aa’, and ‘ab’, etc. The odds that the compiler will encounter
> the same variables in the same order when compiling an app and one or more
> modules is close to zero.
>
>
>
> I did some work to try to dump the mapping of the renamed variables in the
> main app and use that when compiling the modules. It was working for a
> while, then some code was added to the framework that started fooling the
> Closure Compiler. I spent some time trying to fix the Closure Compiler,
> but ran out of time. Meanwhile, Josh was adding more control over renaming
> so I moved on to other things.
>
>
>
> IMO, the best strategy to take would be to try to control what gets
> renamed. All public/exports from the app that are used by the module
> should not be renamed. That will definitely make the app and modules
> bigger, but unless the Closure Compiler folks become interested in
> runtime-loaded modules, it is challenging for the Royale compiler to allow
> aggressive renaming.
>
>
>
> I think what is going on with the exceptions below is that exporting
> doesn’t really prevent renaming. It only sets up an externally-visible
> alias to a renamed variable. Especially for static members. So it isn’t
> sufficient to export public variables, the code within the module must not
> let the Closure Compiler think that the intra-module references can be
> renamed, in this case, from SimpleCSSValuesImpl to QI
>
>
>
> I don’t know the renaming options we’ve added to the Royale Compiler, so I
> don’t know if there is an option to control that. I think there is a way
> to convince the Closure Compiler to not rename SimpleCSSValuesImpl because
> I’ve seen other class names not get renamed.
>
>
>
> HTH,
>
> -Alex
>
>
>
> *From: *Roman Isitua <ro...@gmail.com>
> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Date: *Friday, December 31, 2021 at 10:42 AM
> *To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Subject: *Re: Compiling Modules (was Re: Load time is very slow)
>
>
>
> I have tested on both. The error log is the same.
>
>
>
> I don't understand your second question. Kindly clarify ?
>
>
>
>
>
> I followed strictly the approach used for loading modules here in this
> example.
>
> This is the only method I know for loading modules. If there is another
> method please share.
>
>
>
>
>
>
> https://royale.apache.org/dividing-an-apache-royale-application-with-modules/
> <https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Froyale.apache.org%2Fdividing-an-apache-royale-application-with-modules%2F&data=04%7C01%7Caharui%40adobe.com%7C1d7c7cb8b21a41f95a3a08d9d6e70fa8%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637777110181789253%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=cSD3O66te1pUE65rXeSprpwfLuZEaCukh8bHifj7Y98%3D&reserved=0>
>
>
>
> On Fri, 31 Dec 2021, 19:14 Maria Jose Esteve, <mj...@iest.com> wrote:
>
> @Roman, which branch did you compile the SDK from, ROYALE_INTERFACE_INFO
> or develop?
>
> Could you pass the Overview.mxml view to the main application? (to rule
> it out)
>
>
>
> Hiedra
>
>
>
> *De:* Roman Isitua <ro...@gmail.com>
> *Enviado el:* viernes, 31 de diciembre de 2021 17:56
> *Para:* users@royale.apache.org
> *Asunto:* Re: Compiling Modules (was Re: Load time is very slow)
>
>
>
> I have tried tracing where the errors are happening whenever I test the
> release version
>
> Uncaught TypeError: Ql.valuesImpl.init is not a function
> at Hr.Cr.um (Overview.js:846)
> at Function.ep.generateMXMLProperties (Overview.js:795)
> at Hr.Sp.generateMXMLAttributes (Overview.js:599)
> at new Hr (Overview.js:864)
> at PN.M.loadHandler (FrontEnd.js:2042)
> 9Overview.js:173 Uncaught TypeError: this.createElement is not a function
> at $B.V (Overview.js:173)
> at new $B (FrontEnd.js:2430)
> at EP.convert (FrontEnd.js:2430)
> at Zy (FrontEnd.js:261)
> at HTMLAnchorElement.Uy (FrontEnd.js:121)
> at HTMLAnchorElement.Sy.b (FrontEnd.js:117)
>
>
>
>
>
> The highlighted code in red is declared as follows in the Overview.mxml
> (maven module)
>
>
>
> <j:valuesImpl>
>
> <js:SimpleCSSValuesImpl/>
>
> </j:valuesImpl>
>
>
>
> The j:valuesImpl points to the following code in jewel Module.js
>
>
>
> /**
> * @nocollapse
> * @export
> * @type {org.apache.royale.core.IValuesImpl}
> */
> org.apache.royale.jewel.Module.prototype.valuesImpl;
>
>
> org.apache.royale.jewel.Module.prototype.set__valuesImpl = function(value)
> {
> org.apache.royale.core.ValuesManager.valuesImpl.init(this);
> };
>
>
>
>
>
> it appears this function is improperly renamed and whenever the app tries
> to load the module is not able to recognise it as a function.
>
>
>
> The same issue of improper function renaming is happening in the second
> error as well
>
>
>
> 9Overview.js:173 Uncaught TypeError: this.createElement is not a function
>
>
>
>
>
> On Thu, Dec 30, 2021 at 10:42 PM Roman Isitua <ro...@gmail.com>
> wrote:
>
>
>
> I have applied the js compiler option as follows
>
>
>
>
> <additionalCompilerOptions>-source-map=false;-compiler.show-binding-warnings=false;-js-default-initializers=true;-js-dynamic-access-unknown-members=true;
> -js-compiler-option=--variable_map_output_file
> gccvars.txt;-js-compiler-option+=--property_map_output_file gccprops.txt
> </additionalCompilerOptions>
>
>
>
>
>
> I get the same error as before when attempting to launch the jewel module.
>
>
>
> *Error! Filename not specified.*
>
>
>
>
>
> Same error trace.
>
>
>
> Uncaught TypeError: cm.valuesImpl.init is not a function
> at Rr.Mr.yl (Overview.js:786)
> at Function.iq.generateMXMLProperties (Overview.js:736)
> at Rr.hq.generateMXMLAttributes (Overview.js:546)
> at new Rr (Overview.js:804)
> at LN.J.loadHandler (FrontEnd.js:1967)
> FrontEnd.js:1640 Uncaught TypeError: M is not a function
> at oM.J.handleMouseOut (FrontEnd.js:1640)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:248)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> FrontEnd.js:1640 Uncaught TypeError: M is not a function
> at oM.J.handleMouseOver (FrontEnd.js:1640)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:248)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> FrontEnd.js:1640 Uncaught TypeError: M is not a function
> at oM.J.handleMouseOut (FrontEnd.js:1640)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:248)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> FrontEnd.js:1640 Uncaught TypeError: M is not a function
> at oM.J.handleMouseOver (FrontEnd.js:1640)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:248)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> FrontEnd.js:1640 Uncaught TypeError: M is not a function
> at oM.J.handleMouseOut (FrontEnd.js:1640)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:248)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> FrontEnd.js:1640 Uncaught TypeError: M is not a function
> at oM.J.handleMouseOver (FrontEnd.js:1640)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:248)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> FrontEnd.js:1640 Uncaught TypeError: M is not a function
> at oM.J.handleMouseOut (FrontEnd.js:1640)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:248)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> 3Overview.js:56 Uncaught TypeError: Cannot read properties of undefined
> (reading 'prototype')
> at P (Overview.js:56)
> at SG.convert (FrontEnd.js:904)
> at ny (FrontEnd.js:248)
> at HTMLElement.iy (FrontEnd.js:125)
> at HTMLElement.b (FrontEnd.js:121)
>
>
>
> On Thu, Dec 30, 2021 at 6:56 PM Harbs <ha...@gmail.com> wrote:
>
> 1. I’d get rid of the agressive minification options. It will likely cause
> issues. If you get it to work without those options, you can try to add
> them back in and see if it still works.
>
> 2. You seem to be missing the compiler options explained here:
> https://apache.github.io/royale-docs/features/modules#minification
> <https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapache.github.io%2Froyale-docs%2Ffeatures%2Fmodules%23minification&data=04%7C01%7Caharui%40adobe.com%7C1d7c7cb8b21a41f95a3a08d9d6e70fa8%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637777110181789253%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=TmGB%2FUVi4sHZkHgquFR1x7V6%2BBokuk1ncNA4C8NHEj0%3D&reserved=0>
>
>
>
> For a pom, it would look something like this (adjust your paths to match
> your setup):
>
>
>
> Main app:
>
> <additionalCompilerOptions>-source-map=true;-js-compiler-option=--variable_map_output_file
> gccvars.txt;-js-compiler-option+=--property_map_output_file
> gccprops.txt</additionalCompilerOptions>
>
>
>
> Module:
>
> <additionalCompilerOptions>-source-map=true;-js-compiler-option=--variable_map_input_file
> ../../../../../MainApp/bin/js-release/gccvars.txt;-js-compiler-option+=--property_map_input_file
> ../../../../../MainApp/bin/js-release/gccprops.txt</additionalCompilerOptions>
>
>
>
> On Dec 30, 2021, at 7:43 PM, Roman Isitua <ro...@gmail.com> wrote:
>
>
>
> I think it will be better for me to share my pom's that way you can see
> all the compilation options used. The pom for the parent (FmClient2), the
> MainApp and one module (Overview) have been attached to this email.
>
>
>
>
>
> On Thu, Dec 30, 2021 at 6:22 PM Harbs <ha...@gmail.com> wrote:
>
> Roman, can you share your full compiler options?
>
>
>
> I decided to remove the below settings completely
> -export-public-symbols=false
> -prevent-rename-protected-symbols=false
> -prevent-rename-public-symbols=false
> -prevent-rename-internal-symbols=false
>
>
> I enabled the below settings
>
> -js-dynamic-access-unknown-members=true;
> -js-default-initializers=true
>
>
> The release version starts up
>
>
>
> Hiedra, that’s great!
>
>
>
> On Dec 30, 2021, at 7:15 PM, Roman Isitua <ro...@gmail.com> wrote:
>
>
>
>
>
> Yes. I am testing with the sdk compiled on branch ROYALE_INTERFACE_INFO
>
>
>
> On Thu, Dec 30, 2021 at 6:10 PM Maria Jose Esteve <mj...@iest.com>
> wrote:
>
> Roman, are you testing with the SDK compiled from the Harb branches,
> ROYALE_INTERFACE_INFO, or from develop?
>
>
>
> Hiedra
>
>
>
> *De:* Roman Isitua <ro...@gmail.com>
> *Enviado el:* jueves, 30 de diciembre de 2021 16:52
> *Para:* users@royale.apache.org
> *Asunto:* Re: Compiling Modules (was Re: Load time is very slow)
>
>
>
> I decided to remove the below settings completely
> -export-public-symbols=false
> -prevent-rename-protected-symbols=false
> -prevent-rename-public-symbols=false
> -prevent-rename-internal-symbols=false
>
>
> I enabled the below settings
>
> -js-dynamic-access-unknown-members=true;
> -js-default-initializers=true
>
>
> The release version starts up
>
>
>
>
>
>
>
> <image001.png>
>
>
>
>
>
> <image002.png>
>
>
>
> However, the moment I launch a module. I get the below error
>
>
>
> <image003.png>
>
>
>
>
>
> It appears to be failing when I launch the "*Overview*" module
> (by clicking the Overview side menu).
>
>
>
> So my current observation is that by retaining only two settings
>
>
>
> -js-dynamic-access-unknown-members=true;
> -js-default-initializers=true
>
>
>
> The release module starts up but the app fails whenever I launch a module.
>
>
>
> The smallest size settings in the documentation do not work. The app does
> not start up.
>
>
>
> -export-public-symbols=false
> -prevent-rename-protected-symbols=false
> -prevent-rename-public-symbols=false
> -prevent-rename-internal-symbols=false
>
>
>
>
>
>
>
> The error trace is below
>
>
>
>
>
> Uncaught TypeError: cm.valuesImpl.init is not a function
> at Wr.Rr.pl
> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwr.rr.pl%2F&data=04%7C01%7Caharui%40adobe.com%7C1d7c7cb8b21a41f95a3a08d9d6e70fa8%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637777110181789253%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=kLKHTMQo09InO3h%2BlsWmG3ofZz5DAQ5wc3egxibPPQE%3D&reserved=0>
> (Overview.js:792)
> at Function.mq.generateMXMLProperties (Overview.js:743)
> at Wr.lq.generateMXMLAttributes (Overview.js:551)
> at new Wr (Overview.js:810)
> at QN.J.loadHandler (FrontEnd.js:1978)
> 3Overview.js:56 Uncaught TypeError: Cannot read properties of undefined
> (reading 'prototype')
> at P (Overview.js:56)
> at VG.convert (FrontEnd.js:910)
> at ny (FrontEnd.js:250)
> at HTMLElement.iy (FrontEnd.js:125)
> at HTMLElement.b (FrontEnd.js:121)
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOut (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOver (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOver @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOut (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOut @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOver (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOver @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOut (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOut @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOver (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOver @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOut (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOut @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOver (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOver @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOut (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOut @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
>
>
>
> On Thu, Dec 30, 2021 at 4:32 PM Roman Isitua <ro...@gmail.com>
> wrote:
>
> I get the same error even when I set
> the -js-dynamic-access-unknown-members=true;
>
>
>
> On Thu, Dec 30, 2021 at 4:24 PM Roman Isitua <ro...@gmail.com>
> wrote:
>
>
>
> Using the below settings,
>
> -export-public-symbols=false
> -prevent-rename-protected-symbols=false
> -prevent-rename-public-symbols=false
> -prevent-rename-internal-symbols=false
> -js-dynamic-access-unknown-members=false;
>
> -js-default-initializers=true
>
>
> Debug version runs fine. The release version does not start up
>
> <image004.png>
>
>
> I get the below errors
>
> Uncaught TypeError: Cannot read properties of undefined (reading 'apply')
> at KE.hm (FrontEnd.js:1600)
> at XE.M.Fb (FrontEnd.js:943)
> at XE.M.uh (FrontEnd.js:937)
> at FE.M.na
> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Ffe.m.na%2F&data=04%7C01%7Caharui%40adobe.com%7C1d7c7cb8b21a41f95a3a08d9d6e70fa8%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637777110181789253%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=xYEuPeO%2BXVNoWjqiGBl2EiL6sNNRzWr8tLEoELhWbTY%3D&reserved=0>
> (FrontEnd.js:497)
> at FE.M.v (FrontEnd.js:497)
> at dR.M.S (FrontEnd.js:213)
> at dR.Nz.S (FrontEnd.js:217)
> at dR.M.start (FrontEnd.js:1396)
> at index.html:45
> :8080/favicon.ico:1 Failed to load resource: the server responded with a
> status of 404 (Not Found)
>
>
>
>
>
> FrontEnd.js is the start up class for the application. i.e. It implements
> the Jewel application class.
>
>
>
>
>
>
>
> On Thu, Dec 30, 2021 at 3:19 PM Roman Isitua <ro...@gmail.com>
> wrote:
>
> Hi Harb,
>
>
>
> Thanks for your response. I have gone through the documentation. I will do
> my test again starting with the smallest size option and share my findings.
>
>
>
> Regards,
>
>
>
> On Thu, Dec 30, 2021 at 10:59 AM Harbs <ha...@gmail.com> wrote:
>
> Sorry for my deal in responding.
>
>
>
> Let’s take a step back.
>
>
>
> I’m not sure how you are compiling your modules. I just added some content
> to the module documentation page which explains what compiler options you
> need while compiling modules. (It still needs some editing.)
> https://apache.github.io/royale-docs/features/modules#minification
> <https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapache.github.io%2Froyale-docs%2Ffeatures%2Fmodules%23minification&data=04%7C01%7Caharui%40adobe.com%7C1d7c7cb8b21a41f95a3a08d9d6e70fa8%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637777110181789253%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=TmGB%2FUVi4sHZkHgquFR1x7V6%2BBokuk1ncNA4C8NHEj0%3D&reserved=0>
>
>
>
> Are you using those options?
>
>
>
> On Dec 29, 2021, at 2:19 AM, Maria Jose Esteve <mj...@iest.com> wrote:
>
>
>
> Hi, Let me join you with these tests....
>
>
>
> @Harb, I have compiled the SDK from this branch, feature/ROYALE_INTERFACE_INFO,
> and when running in debug I get this error:
>
>
>
> Message on the PURGE CONSOLE is displayed:
>
>
>
> Cannot convert org.apache.royale.reflection.beads.ClassAliasBead to IBead
>
>
>
> Message in the IDE Window:
>
>
>
> Se produjo una excepción: TypeError: Cannot convert [object Object] to
> IBead
>
> at App.org.apache.royale.core.ElementWrapper.addBead (
> http://localhost:8080/WNetSuitePlus/org/apache/royale/core/ElementWrapper.js:114:11
> )
>
> at App.org.apache.royale.core.HTMLElementWrapper.addBead (
> http://localhost:8080/WNetSuitePlus/org/apache/royale/core/HTMLElementWrapper.js:43:65
> )
>
> at App.org.apache.royale.jewel.Application.start (
> http://localhost:8080/WNetSuitePlus/org/apache/royale/jewel/Application.js:246:10
> )
>
> at App.App_loadXML (http://localhost:8080/WNetSuitePlus/App.js:1681:25
> )
>
> at
> org.apache.royale.net.URLLoader.org.apache.royale.events.EventDispatcher.fireListeners
> (
> http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:97:23
> )
>
> at Function.goog.events.EventTarget.dispatchEventInternal_ (
> http://localhost:8080/WNetSuitePlus/library/closure/goog/events/eventtarget.js:381:26
> )
>
> at
> org.apache.royale.net.URLLoader.org.apache.royale.events.EventDispatcher.dispatchEvent
> (
> http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:72:37
> )
>
> at org.apache.royale.net.URLLoader.jsEventHandler (
> http://localhost:8080/WNetSuitePlus/org/apache/royale/net/URLLoader.js:169:12
> )
>
>
>
> Call stack:
>
>
>
> <image003.png>
>
>
>
> [INFO] Executing MXMLC in tool group Royale with args: [
>
>
> -load-config=D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\compile-app-config.xml,
>
> -js-default-initializers=true,
>
> -source-map=true,
>
> -js-dynamic-access-unknown-members=true,
>
>
> -keep-as3-metadata+=Inject,Dispatcher,EventHandler,Event,PostConstruct,PreDestroy,ViewAdded,ViewRemoved,Bindable,Transient,
>
> -keep-code-with-metadata=Inject,
>
> -show-binding-warnings=false,
>
> -export-public-symbols=false,
>
> -prevent-rename-protected-symbols=false,
>
> -prevent-rename-internal-symbols=false,
>
>
> -js-output=D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\javascript,
>
> -compiler.targets=JSRoyale,
>
>
> D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\src\main\royale\App.mxml
>
>
>
>
>
> The release execution does not change, the error is the same as before
> (SDK compilation from the develop branch):
>
>
>
> Se produjo una excepción: ReferenceError: Error #1065: Variable
> com.iest.winplusweb.models.MasterConfigSystemModel is not defined.
>
> at yR (http://localhost:8080/WPWebRelease/App.js:3605:1771)
>
> at Mya (http://localhost:8080/WPWebRelease/App.js:3343:365)
>
> at AR.J.usa (http://localhost:8080/WPWebRelease/App.js:434:441)
>
> at GFa.J.fromTypeDefinition (
> http://localhost:8080/WPWebRelease/App.js:5706:139)
>
> at Function.YT.getTypeDescriptor (
> http://localhost:8080/WPWebRelease/App.js:4570:820)
>
> at Function.fX.constructBean (
> http://localhost:8080/WPWebRelease/App.js:2336:472)
>
> at r$.J.initialize (http://localhost:8080/WPWebRelease/App.js:5041:66)
>
> at OW.J.init (http://localhost:8080/WPWebRelease/App.js:950:452)
>
> at OW.J.u (http://localhost:8080/WPWebRelease/App.js:951:454)
>
> at $$.J.addBead (http://localhost:8080/WPWebRelease/App.js:357:549)
>
>
>
> The main difference:
>
> project compiled from "SDK-develop" runs fine in js-debug and gives error
> in js-release and, compiled from "SDK-ROYALE_INTERFACE_INFO" does not
> launch because of conversion error.
>
>
>
> Hiedra
>
>
>
> *De:* Roman Isitua <ro...@gmail.com>
> *Enviado el:* martes, 28 de diciembre de 2021 15:55
> *Para:* users@royale.apache.org
> *Asunto:* Re: Load time is very slow
>
>
>
> @Harb
>
>
>
> I have checked out the feature/ROYALE_INTERFACE_INFO branch and compiled
> asjs and compiler. I have rebuilt my application with modules in release
> mode.
>
>
>
> I get the following error when I attempt to launch a module
>
>
>
>
>
> <image001.png>
>
>
>
>
>
> The module loads fine in debug mode
>
>
>
> <image002.png>
>
>
>
>
>
> Snippets of the log
>
>
>
> Overview.js:786 Uncaught TypeError: cm.valuesImpl.init is not a function
> at Rr.Mr.yl (Overview.js:786)
> at Function.iq.generateMXMLProperties (Overview.js:736)
> at Rr.hq.generateMXMLAttributes (Overview.js:546)
> at new Rr (Overview.js:804)
> at LN.J.loadHandler (FrontEnd.js:1967)
> Mr.yl @ Overview.js:786
> iq.generateMXMLProperties @ Overview.js:736
> hq.generateMXMLAttributes @ Overview.js:546
> Rr @ Overview.js:804
> J.loadHandler @ FrontEnd.js:1967
> load (async)
> LN.loadModule @ FrontEnd.js:1965
> dN.loadModule @ FrontEnd.js:2406
> LD.Un @ FrontEnd.js:1809
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:248
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
>
>
>
>
>
> I have attached the full log to this email.
>
>
>
>
>
>
>
>
>
> On Tue, Dec 28, 2021 at 2:51 PM Roman Isitua <ro...@gmail.com>
> wrote:
>
> Hi Maria,
>
>
>
> Prior to starting this mail discussion "Load time is very slow". I can
> confirm I have only been compiling in debug mode. My target\javascript\bin\
> only had js-debug. It was after I upgraded my royale sdk from 0.9.7 to
> 0.9.8 that I compiled in release mode.
>
>
>
>
>
>
>
> On Tue, Dec 28, 2021 at 2:24 PM Maria Jose Esteve <mj...@iest.com>
> wrote:
>
> Hi, @Roman, I think you are doing a double compile can it be? My times are
> the same as yours and I always compile in debug and release.
>
>
>
> Look at your target folder " target\javascript\bin\" and if you have two
> folders: js-debug and js-release you are compiling always double.
>
>
>
> In my case, the architecture of my project as well as the Maven
> compilation files (pom.xml) were provided by an external company (we didn't
> know anything about Maven or Royale at that time) and I understand that
> this formula was chosen to show us the options we had.
>
>
>
> A priori and without doing any test as Harb has done, I think that
> modularity gives us the advantage of compiling parts of the code once and
> not compiling them again if they are not modified. So far WITH MY
> COMPILATION TIMES, sometimes more than 1 minute, this is fundamental. But
> of course, now we have the problem of minification of the modules and it is
> really a serious problem because it is impossible for us to deploy in
> production.
>
>
>
> I will try to separate the compiación realese with a profile and if I
> succeed I will pass it to you @Roman.
>
>
>
> @Harb what do you mean by compiling the ROYALE_INTERFACE_INFO branch?
>
>
>
> Hiedra
>
>
>
> *De:* Harbs <ha...@gmail.com>
> *Enviado el:* lunes, 27 de diciembre de 2021 18:32
> *Para:* users@royale.apache.org
> *Asunto:* Re: Load time is very slow
>
>
>
> That doesn’t sound right.
>
>
>
> Are you sure you’re compiling debug and not release? That sounds like
> release build times.
>
>
>
> On Dec 27, 2021, at 3:31 PM, Roman Isitua <ro...@gmail.com> wrote:
>
>
>
> Wow ! You are using a workstation with a bleeding edge processor.
>
>
>
> I just compiled my app now. It took 44 seconds. (First compilation after
> ide start up.) Subsequently compilations are usually 19s to 20s.
>
>
>
> My application code base is very very small compared to yours. As we
> continue to add functionality, I expect the compile times to rise.
>
>
>
>
>
>
>
>
>
> <MainApp_pom.xml><Overview_pom.xml><fm_client2_pom.xml>
>
>
>
>
Re: Compiling Modules (was Re: Load time is very slow)
Posted by Alex Harui <ah...@adobe.com>.
Hi Roman,
All prevent-rename options should be set to true or left to their default values. Looks like they are false in the main app.
Please post the contents of the compile-app-config.xml files.
Also, please make sure the bin/js-debug folders have been deleted before compiling.
The compile-app-config.xml files contain the prevent-rename-object-keys setting in the example. You can specify it for your app in compile-app-config.xml as well.
Then if it still doesn’t work, I’ll want to see the bin/js-release folders. You can attach them to a Git Issue if it doesn’t contain sensitive information or we can discuss other ways.
-Alex
From: Roman Isitua <ro...@gmail.com>
Reply-To: "users@royale.apache.org" <us...@royale.apache.org>
Date: Thursday, January 13, 2022 at 2:50 PM
To: "users@royale.apache.org" <us...@royale.apache.org>
Subject: Re: Compiling Modules (was Re: Load time is very slow)
I have performed the test.
- I created a new branch locally called ReleaseModules for compiler and asjs respectively. (git branch ReleaseModules)
- check out to ReleaseModules for compiler and asjs respectively. (git checkout ReleaseModules)
- Then pulled from ReleaseModules. (git pull origin ReleaseModules) for compiler and asjs respectively.
- Then built the compiler and asjs respectively. (mvn clean install)
I am still unable to load the module. However the error is different from the previous test.
[cid:ii_kydjrhyh0]
The error log
Failed to load resource: the server responded with a status of 404 (Not Found)
Overview.js:1270 Uncaught TypeError: Cannot read properties of undefined (reading 'init')
at A_Aeh.A_A.g.h.v.$d.Qo (Overview.js:1270:627)
at Function.A_A.g.h.i.Ua.generateMXMLProperties (Overview.js:1196:316)
at A_Aeh.A_A.g.h.v.qc.generateMXMLAttributes (Overview.js:930:358)
at new A_Aeh (Overview.js:1296:431)
at MN.J.loadHandler (FrontEnd.js:1963:188)
Let me also share the compilation settings used. (correct me if I am wrong)
for main app
--- royale-maven-plugin:0.9.9-SNAPSHOT:compile-app (default-compile-app) @ MainApp ---
[INFO] Executing MXMLC in tool group Royale with args: [-load-config=C:\Users\nyemi\git\SpacioFM2\SpacioFM2\FmClient2\MainApp\target\compile-app-config.xml, -compiler.show-binding-warnings=false, -source-map=false, -js-default-initializers=true, -js-dynamic-access-unknown-members=true, -keep-as3-metadata+=Inject,Dispatcher,EventHandler,PostConstruct,PreDestroy,ViewAdded,ViewRemoved,Bindable,Transient, -js-output=C:\Users\nyemi\git\SpacioFM2\SpacioFM2\FmClient2\MainApp\target\javascript, -compiler.targets=JSRoyale, C:\Users\nyemi\git\SpacioFM2\SpacioFM2\FmClient2\MainApp\src\main\royale\FrontEnd.mxml]
for the module
[INFO] --- royale-maven-plugin:0.9.9-SNAPSHOT:compile-app (default-compile-app) @ Overview ---
[INFO] Executing MXMLC in tool group Royale with args: [-load-config=C:\Users\nyemi\git\SpacioFM2\SpacioFM2\FmClient2\Overview\target\compile-app-config.xml, -compiler.show-binding-warnings=false, -source-map=false, -js-default-initializers=true, -js-dynamic-access-unknown-members=true, -js-output=C:\Users\nyemi\git\SpacioFM2\SpacioFM2\FmClient2\Overview\target\javascript, -compiler.targets=JSRoyale, C:\Users\nyemi\git\SpacioFM2\SpacioFM2\FmClient2\Overview\src\main\royale\Overview.mxml]
I can't see the -prevent-rename-object-keys you mentioned being supplied automatically.
I have attached the pom's for the maven project so you can inspect the settings I used. I am not sure that I am applying them correctly.
MainApp.xml is the Main application. Overview.xml is the module. FmClient2.xml is the parent project.
Regards,
On Wed, Jan 12, 2022 at 9:04 AM Alex Harui <ah...@adobe.com>> wrote:
I pushed a ReleaseModules branch in royale-compiler and royale-asjs.
These changes cause the royale-asjs/examples/royale/ModuleExample release version to work.
The big challenge is that it turned out there is a fair amount of infrastructure that is not exported/public. The Language utilities, ROYALE_CLASS_INFO, the superclass_ property, cssData and others are going to get renamed. And thus renamed differently in the main app vs the module.
That’s why the current compiler’s strategy was to try to copy the renaming map from the main app to the module, but it didn’t always work. There seems to be a bug in the Closure Compiler that a set of externs causes the compiler to mis-handle package-paths. Also, it meant that the module contained its own copy of most of the infrastructure
The new compiler strategy is a bit more like the old Flex module strategy. The module tries to not contain a copy of code that already exists in the main app. Some of the goog/base.js stuff still gets copied though. Then because we avoid renaming more things, the module can reference the shared infrastructure in the main app.
The new compiler detects if what is being compiled is a loader of modules (because it is generating an externs-report) or is a Module and prevents renaming of Language APIs, modified base.js to not rename the superClass_ property used for calling super() and a few other things. In addition, I added a -prevent-rename-object-keys compiler option that works as a post-processor. It scans the js files being copied into bin/js-debug and adds quotes around things.
By making these changes, I was able to get the closure compiler to mis-handle the packages in a more predictable way, so another thing the new compiler does is post-process the output file to remove the incorrect package code. The incorrect code would re-init package paths like “org” or “org.apache.royale”.
Anyway, give it a try and see if it works. Probably we’ll find out there is more infrastructure that needs to not be renamed, but I think this has a better chance of working as we aren’t blocked by the compiler outputting bad code. Many months ago I tried to understand how why the Closure Compiler output bad code, but ran out of time.
Another difference is that the new compiler strategy doesn’t use custom overrides of Closure Compiler passes which was fragile and will make it easier to upgrade to newer versions of Closure Compiler.
HTH,
-Alex
From: Alex Harui <ah...@adobe.com>>
Reply-To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Date: Wednesday, January 5, 2022 at 9:53 AM
To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Subject: Re: Compiling Modules (was Re: Load time is very slow)
I probably won’t have time to really dig into this until the weekend. It is looking like the Closure Compiler gets confused when presented with externs for the same package tree that the module is generating new classes for.
-Alex
From: Roman Isitua <ro...@gmail.com>>
Reply-To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Date: Tuesday, January 4, 2022 at 1:57 PM
To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Subject: Re: Compiling Modules (was Re: Load time is very slow)
Okay. I knew I was missing something.
I will test again when the update for load-externs is available.
On Tue, Jan 4, 2022 at 6:02 PM Alex Harui <ah...@adobe.com>> wrote:
Essentially, -externs-report is for the Closure (JS) Compiler. -link-report and -load-externs (one leading ‘-‘) is for the Royale Compiler to tell the Royale Compiler what classes to feed to the Closure Compiler. Both contain the same data (the set of classes used in the main app), just formatted differently and used differently.
The –externs option for the Closure Compiler then tells the Closure Compiler not to look for classes in the set of files it is supposed to minify.
So, you have the right settings for the main app, but for the module, it should be:
-js-compiler-option=--externs extrep.txt; -load-externs linkrep.txt;
However, even that won’t work today, as the Royale Compiler is not handling -load-externs on the JS prep for Closure Compiler. I have some local changes to the compiler that mixes most of it, but am facing issues with how Closure handles package paths. If that can be resolved, then we have a good chance of things working.
-Alex
From: Roman Isitua <ro...@gmail.com>>
Reply-To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Date: Tuesday, January 4, 2022 at 12:39 AM
To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Subject: Re: Compiling Modules (was Re: Load time is very slow)
Thanks for the update.
I attempted the following:
1. In the main application, I use the following setting:
-externs-report=extrep.txt; -link-report=linkrep.txt;
2. In the module I use the following
-js-compiler-option=--externs extrep.txt; -js-compiler-option+=--load-externs linkrep.txt;
The main application compiles successfully, I get a compilation error with the module
"--load-externs" is not a valid option
Sample usage: --compilation_level (-O) VAL --externs VAL --js VAL --js_output_file VAL --warning_level (-W) [QUIET | DEFAULT
| VERBOSE]
Run with --help for all options and details
Internal error: java.lang.NullPointerException com.google.javascript.jscomp.CommandLineRunner.createOptions(CommandLineRunner.java:1809)org.apache.royale.compiler.utils.JSClosureCompilerWrapper$CompilerOptionsParser.getOptions(JSClosureCompilerWrapper.java:529)org.apache.royale.compiler.utils.JSClosureCompilerWrapper.<init>(JSClosureCompilerWrapper.java:77)org.apache.royale.compiler.internal.codegen.mxml.royale.MXMLRoyalePublisher.publish(MXMLRoyalePublisher.java:395)org.apache.royale.compiler.clients.M
I don't think I am using this option correctly.
.....
On Tue, Jan 4, 2022 at 8:44 AM Alex Harui <ah...@adobe.com>> wrote:
I found some time to investigate. The -externs-report option is mostly working correctly, but other compiler changes are needed to try to avoid duplicate code in the module. I might have time to investigate more this coming weekend. It does appear that if we can correctly reference the app’s class from the module that it will work. The Closure Compiler let me compile the module after I externalize and avoid requires on everything in the main app’s externs report and -js link report, but the references in the module have collapsed packages which is either incorrect or aliases need to be created.
However I think this new approach has a better chance of working than trying to match renaming tables.
-Alex
From: Alex Harui <ah...@adobe.com>>
Reply-To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Date: Monday, January 3, 2022 at 2:30 PM
To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Subject: Re: Compiling Modules (was Re: Load time is very slow)
The -externs-report option should be similar to the -link-report option. It takes a filename. The compiler should output the classes used in the JS compile into that file. To use externs, I think you don’t need to prevent renaming in the application as long as public variables are exported. I think you specify -externs-report when compiling the application.
You may also need to output a -link-report from the application as well.
I think you then specify the externs-report file as an -externs for the -js-compiler-options when compiling the module. And maybe also specify the -link-report output as a -load-externs in the same way it was used when compiling Flex modules. The goal for the module is, like Flex, to not have any classes in the module that exist in the main app. Then it doesn’t matter about class renaming within the release-mode JS file.
HTH,
-Alex
From: Roman Isitua <ro...@gmail.com>>
Reply-To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Date: Monday, January 3, 2022 at 12:37 PM
To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Subject: Re: Compiling Modules (was Re: Load time is very slow)
I can confirm that classes are being renamed in both files.
I have attempted your suggestion i.e. removing variable maps and property maps then use
-externs-report;-export-public-symbols=true;-prevent-rename-public-symbols=true;
I get the below error
command line Error: configuration variable 'externs-report' expected 1 argument(s), got 0.
I cannot find any documentation on how to use the -externs-report argument. What does it do ? and what are the acceptable values ?
Regards,
On Sun, Jan 2, 2022 at 9:06 AM Alex Harui <ah...@adobe.com>> wrote:
Hi Roman,
It might be more complicated. The settings are probably doing something since you reported that the error occurred in the app vs the module depending on the settings.
I went back and looked at the original module example in examples/royale/ModuleExample and was surprised there weren’t more compiler settings. I thought we’d found a way to externalize the main app’s code for the module. Because if both the app and module have a copy of SimpleCSSValuesImpl or any other class that both JS files use, there could be issues as to which one gets loaded (maybe both) and what export aliases are pointing to. Sounds like changing settings affected whether the aliases pointed at module code vs app code.
I thought we were using similar settings to what we used for SWF where the module would not contain a copy of SimpleCSSValuesImpl so it would use the one loaded by the main app, but I didn’t see those settings. We might need to make that work because otherwise I think static initializations won’t do the right thing. Or maybe we’ve figured out that it is simpler just to write defensive code that doesn’t get broken. But also, if the module has its own copy of code already loaded by the main app, that’s sort of a waste of bytes. Maybe there was a minification issue with not having the module link in classes already linked into the main app. I see an -externs-report option in the compiler but the example doesn’t seem to use it.
You should be able to scan the JS files and see if a class is in both module and app and if it is getting renamed.
I don’t know if I will have time to investigate further. The currently recommended options for modules involving variable maps and property maps may need to be abandoned in favor of externs and preventing renames.
-Alex
From: Roman Isitua <ro...@gmail.com>>
Reply-To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Date: Saturday, January 1, 2022 at 3:02 AM
To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Subject: Re: Compiling Modules (was Re: Load time is very slow)
Alex, thank you for your detailed analysis of the error log.
I agree with you that the best strategy is to prevent renaming of public/exports used by the module. I have tried different options to prevent renaming
It appears none of them stops this. From my observation, it appears that this default options below
-export-public-symbols=true;-prevent-rename-public-symbols=true;-prevent-rename-public-instance-accessors=true;
Only seem to affect the main application (main module) but have no effect on the other modules even though I ensured they were applied in their respective module pom. I came to this conclusion when I decided to turn set -prevent-rename-public-symbols=false
I noticed that I got the same error but this time around in the main module.
Uncaught TypeError: this.rb[(intermediate value).Kd(...)] is not a function
at HN.iI.send (FrontEnd.js:970)
at nI.EH.Ea (FrontEnd.js:880)
at ON.q6 (FrontEnd.js:1815)
at TN.L2 (FrontEnd.js:2034)
at hF.Xf (FrontEnd.js:2063)
at lF.kb (FrontEnd.js:1233)
at lF.Vf (FrontEnd.js:1224)
at cF.O (FrontEnd.js:659)
at cF.M.w (FrontEnd.js:661)
at gQ.mA.M (FrontEnd.js:241)
FrontEnd.js maps to FrontEnd.as in my application and is the entry point of the application. This confirms that -prevent-rename-public-symbols=false has
an effect on the main module but no effect on other modules even though they were applied in the respective module pom's.
Maybe there are other options I am overlooking.
On Sat, Jan 1, 2022 at 9:31 AM Alex Harui <ah...@adobe.com>> wrote:
In case it helps, the minification (variable renaming) mechanism is essentially guaranteed to cause problems in modules. The Closure Compiler basically takes variables, sees if it is worth renaming it, then gives it the name ‘a’, then ‘b’, and so-on, (it skips a few letters, IIRC), then moves on to ‘aa’, and ‘ab’, etc. The odds that the compiler will encounter the same variables in the same order when compiling an app and one or more modules is close to zero.
I did some work to try to dump the mapping of the renamed variables in the main app and use that when compiling the modules. It was working for a while, then some code was added to the framework that started fooling the Closure Compiler. I spent some time trying to fix the Closure Compiler, but ran out of time. Meanwhile, Josh was adding more control over renaming so I moved on to other things.
IMO, the best strategy to take would be to try to control what gets renamed. All public/exports from the app that are used by the module should not be renamed. That will definitely make the app and modules bigger, but unless the Closure Compiler folks become interested in runtime-loaded modules, it is challenging for the Royale compiler to allow aggressive renaming.
I think what is going on with the exceptions below is that exporting doesn’t really prevent renaming. It only sets up an externally-visible alias to a renamed variable. Especially for static members. So it isn’t sufficient to export public variables, the code within the module must not let the Closure Compiler think that the intra-module references can be renamed, in this case, from SimpleCSSValuesImpl to QI
I don’t know the renaming options we’ve added to the Royale Compiler, so I don’t know if there is an option to control that. I think there is a way to convince the Closure Compiler to not rename SimpleCSSValuesImpl because I’ve seen other class names not get renamed.
HTH,
-Alex
From: Roman Isitua <ro...@gmail.com>>
Reply-To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Date: Friday, December 31, 2021 at 10:42 AM
To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Subject: Re: Compiling Modules (was Re: Load time is very slow)
I have tested on both. The error log is the same.
I don't understand your second question. Kindly clarify ?
I followed strictly the approach used for loading modules here in this example.
This is the only method I know for loading modules. If there is another method please share.
https://royale.apache.org/dividing-an-apache-royale-application-with-modules/<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Froyale.apache.org%2Fdividing-an-apache-royale-application-with-modules%2F&data=04%7C01%7Caharui%40adobe.com%7C1d7c7cb8b21a41f95a3a08d9d6e70fa8%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637777110181789253%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=cSD3O66te1pUE65rXeSprpwfLuZEaCukh8bHifj7Y98%3D&reserved=0>
On Fri, 31 Dec 2021, 19:14 Maria Jose Esteve, <mj...@iest.com>> wrote:
@Roman, which branch did you compile the SDK from, ROYALE_INTERFACE_INFO or develop?
Could you pass the Overview.mxml view to the main application? (to rule it out)
Hiedra
De: Roman Isitua <ro...@gmail.com>>
Enviado el: viernes, 31 de diciembre de 2021 17:56
Para: users@royale.apache.org<ma...@royale.apache.org>
Asunto: Re: Compiling Modules (was Re: Load time is very slow)
I have tried tracing where the errors are happening whenever I test the release version
Uncaught TypeError: Ql.valuesImpl.init is not a function
at Hr.Cr.um (Overview.js:846)
at Function.ep.generateMXMLProperties (Overview.js:795)
at Hr.Sp.generateMXMLAttributes (Overview.js:599)
at new Hr (Overview.js:864)
at PN.M.loadHandler (FrontEnd.js:2042)
9Overview.js:173 Uncaught TypeError: this.createElement is not a function
at $B.V (Overview.js:173)
at new $B (FrontEnd.js:2430)
at EP.convert (FrontEnd.js:2430)
at Zy (FrontEnd.js:261)
at HTMLAnchorElement.Uy (FrontEnd.js:121)
at HTMLAnchorElement.Sy.b (FrontEnd.js:117)
The highlighted code in red is declared as follows in the Overview.mxml (maven module)
<j:valuesImpl>
<js:SimpleCSSValuesImpl/>
</j:valuesImpl>
The j:valuesImpl points to the following code in jewel Module.js
/**
* @nocollapse
* @export
* @type {org.apache.royale.core.IValuesImpl}
*/
org.apache.royale.jewel.Module.prototype.valuesImpl;
org.apache.royale.jewel.Module.prototype.set__valuesImpl = function(value) {
org.apache.royale.core.ValuesManager.valuesImpl.init(this);
};
it appears this function is improperly renamed and whenever the app tries to load the module is not able to recognise it as a function.
The same issue of improper function renaming is happening in the second error as well
9Overview.js:173 Uncaught TypeError: this.createElement is not a function
On Thu, Dec 30, 2021 at 10:42 PM Roman Isitua <ro...@gmail.com>> wrote:
I have applied the js compiler option as follows
<additionalCompilerOptions>-source-map=false;-compiler.show-binding-warnings=false;-js-default-initializers=true;-js-dynamic-access-unknown-members=true;
-js-compiler-option=--variable_map_output_file gccvars.txt;-js-compiler-option+=--property_map_output_file gccprops.txt
</additionalCompilerOptions>
I get the same error as before when attempting to launch the jewel module.
Error! Filename not specified.
Same error trace.
Uncaught TypeError: cm.valuesImpl.init is not a function
at Rr.Mr.yl (Overview.js:786)
at Function.iq.generateMXMLProperties (Overview.js:736)
at Rr.hq.generateMXMLAttributes (Overview.js:546)
at new Rr (Overview.js:804)
at LN.J.loadHandler (FrontEnd.js:1967)
FrontEnd.js:1640 Uncaught TypeError: M is not a function
at oM.J.handleMouseOut (FrontEnd.js:1640)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:248)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
FrontEnd.js:1640 Uncaught TypeError: M is not a function
at oM.J.handleMouseOver (FrontEnd.js:1640)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:248)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
FrontEnd.js:1640 Uncaught TypeError: M is not a function
at oM.J.handleMouseOut (FrontEnd.js:1640)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:248)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
FrontEnd.js:1640 Uncaught TypeError: M is not a function
at oM.J.handleMouseOver (FrontEnd.js:1640)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:248)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
FrontEnd.js:1640 Uncaught TypeError: M is not a function
at oM.J.handleMouseOut (FrontEnd.js:1640)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:248)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
FrontEnd.js:1640 Uncaught TypeError: M is not a function
at oM.J.handleMouseOver (FrontEnd.js:1640)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:248)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
FrontEnd.js:1640 Uncaught TypeError: M is not a function
at oM.J.handleMouseOut (FrontEnd.js:1640)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:248)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
3Overview.js:56 Uncaught TypeError: Cannot read properties of undefined (reading 'prototype')
at P (Overview.js:56)
at SG.convert (FrontEnd.js:904)
at ny (FrontEnd.js:248)
at HTMLElement.iy (FrontEnd.js:125)
at HTMLElement.b (FrontEnd.js:121)
On Thu, Dec 30, 2021 at 6:56 PM Harbs <ha...@gmail.com>> wrote:
1. I’d get rid of the agressive minification options. It will likely cause issues. If you get it to work without those options, you can try to add them back in and see if it still works.
2. You seem to be missing the compiler options explained here: https://apache.github.io/royale-docs/features/modules#minification<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapache.github.io%2Froyale-docs%2Ffeatures%2Fmodules%23minification&data=04%7C01%7Caharui%40adobe.com%7C1d7c7cb8b21a41f95a3a08d9d6e70fa8%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637777110181789253%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=TmGB%2FUVi4sHZkHgquFR1x7V6%2BBokuk1ncNA4C8NHEj0%3D&reserved=0>
For a pom, it would look something like this (adjust your paths to match your setup):
Main app:
<additionalCompilerOptions>-source-map=true;-js-compiler-option=--variable_map_output_file gccvars.txt;-js-compiler-option+=--property_map_output_file gccprops.txt</additionalCompilerOptions>
Module:
<additionalCompilerOptions>-source-map=true;-js-compiler-option=--variable_map_input_file ../../../../../MainApp/bin/js-release/gccvars.txt;-js-compiler-option+=--property_map_input_file ../../../../../MainApp/bin/js-release/gccprops.txt</additionalCompilerOptions>
On Dec 30, 2021, at 7:43 PM, Roman Isitua <ro...@gmail.com>> wrote:
I think it will be better for me to share my pom's that way you can see all the compilation options used. The pom for the parent (FmClient2), the MainApp and one module (Overview) have been attached to this email.
On Thu, Dec 30, 2021 at 6:22 PM Harbs <ha...@gmail.com>> wrote:
Roman, can you share your full compiler options?
I decided to remove the below settings completely
-export-public-symbols=false
-prevent-rename-protected-symbols=false
-prevent-rename-public-symbols=false
-prevent-rename-internal-symbols=false
I enabled the below settings
-js-dynamic-access-unknown-members=true;
-js-default-initializers=true
The release version starts up
Hiedra, that’s great!
On Dec 30, 2021, at 7:15 PM, Roman Isitua <ro...@gmail.com>> wrote:
Yes. I am testing with the sdk compiled on branch ROYALE_INTERFACE_INFO
On Thu, Dec 30, 2021 at 6:10 PM Maria Jose Esteve <mj...@iest.com>> wrote:
Roman, are you testing with the SDK compiled from the Harb branches, ROYALE_INTERFACE_INFO, or from develop?
Hiedra
De: Roman Isitua <ro...@gmail.com>>
Enviado el: jueves, 30 de diciembre de 2021 16:52
Para: users@royale.apache.org<ma...@royale.apache.org>
Asunto: Re: Compiling Modules (was Re: Load time is very slow)
I decided to remove the below settings completely
-export-public-symbols=false
-prevent-rename-protected-symbols=false
-prevent-rename-public-symbols=false
-prevent-rename-internal-symbols=false
I enabled the below settings
-js-dynamic-access-unknown-members=true;
-js-default-initializers=true
The release version starts up
<image001.png>
<image002.png>
However, the moment I launch a module. I get the below error
<image003.png>
It appears to be failing when I launch the "Overview" module (by clicking the Overview side menu).
So my current observation is that by retaining only two settings
-js-dynamic-access-unknown-members=true;
-js-default-initializers=true
The release module starts up but the app fails whenever I launch a module.
The smallest size settings in the documentation do not work. The app does not start up.
-export-public-symbols=false
-prevent-rename-protected-symbols=false
-prevent-rename-public-symbols=false
-prevent-rename-internal-symbols=false
The error trace is below
Uncaught TypeError: cm.valuesImpl.init is not a function
at Wr.Rr.pl<https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwr.rr.pl%2F&data=04%7C01%7Caharui%40adobe.com%7C1d7c7cb8b21a41f95a3a08d9d6e70fa8%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637777110181789253%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=kLKHTMQo09InO3h%2BlsWmG3ofZz5DAQ5wc3egxibPPQE%3D&reserved=0> (Overview.js:792)
at Function.mq.generateMXMLProperties (Overview.js:743)
at Wr.lq.generateMXMLAttributes (Overview.js:551)
at new Wr (Overview.js:810)
at QN.J.loadHandler (FrontEnd.js:1978)
3Overview.js:56 Uncaught TypeError: Cannot read properties of undefined (reading 'prototype')
at P (Overview.js:56)
at VG.convert (FrontEnd.js:910)
at ny (FrontEnd.js:250)
at HTMLElement.iy (FrontEnd.js:125)
at HTMLElement.b (FrontEnd.js:121)
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOut (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOver (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOver @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOut (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOut @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOver (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOver @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOut (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOut @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOver (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOver @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOut (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOut @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOver (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOver @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOut (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOut @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
On Thu, Dec 30, 2021 at 4:32 PM Roman Isitua <ro...@gmail.com>> wrote:
I get the same error even when I set the -js-dynamic-access-unknown-members=true;
On Thu, Dec 30, 2021 at 4:24 PM Roman Isitua <ro...@gmail.com>> wrote:
Using the below settings,
-export-public-symbols=false
-prevent-rename-protected-symbols=false
-prevent-rename-public-symbols=false
-prevent-rename-internal-symbols=false
-js-dynamic-access-unknown-members=false;
-js-default-initializers=true
Debug version runs fine. The release version does not start up
<image004.png>
I get the below errors
Uncaught TypeError: Cannot read properties of undefined (reading 'apply')
at KE.hm (FrontEnd.js:1600)
at XE.M.Fb (FrontEnd.js:943)
at XE.M.uh (FrontEnd.js:937)
at FE.M.na<https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Ffe.m.na%2F&data=04%7C01%7Caharui%40adobe.com%7C1d7c7cb8b21a41f95a3a08d9d6e70fa8%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637777110181789253%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=xYEuPeO%2BXVNoWjqiGBl2EiL6sNNRzWr8tLEoELhWbTY%3D&reserved=0> (FrontEnd.js:497)
at FE.M.v (FrontEnd.js:497)
at dR.M.S (FrontEnd.js:213)
at dR.Nz.S (FrontEnd.js:217)
at dR.M.start (FrontEnd.js:1396)
at index.html:45
:8080/favicon.ico:1 Failed to load resource: the server responded with a status of 404 (Not Found)
FrontEnd.js is the start up class for the application. i.e. It implements the Jewel application class.
On Thu, Dec 30, 2021 at 3:19 PM Roman Isitua <ro...@gmail.com>> wrote:
Hi Harb,
Thanks for your response. I have gone through the documentation. I will do my test again starting with the smallest size option and share my findings.
Regards,
On Thu, Dec 30, 2021 at 10:59 AM Harbs <ha...@gmail.com>> wrote:
Sorry for my deal in responding.
Let’s take a step back.
I’m not sure how you are compiling your modules. I just added some content to the module documentation page which explains what compiler options you need while compiling modules. (It still needs some editing.) https://apache.github.io/royale-docs/features/modules#minification<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapache.github.io%2Froyale-docs%2Ffeatures%2Fmodules%23minification&data=04%7C01%7Caharui%40adobe.com%7C1d7c7cb8b21a41f95a3a08d9d6e70fa8%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637777110181789253%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=TmGB%2FUVi4sHZkHgquFR1x7V6%2BBokuk1ncNA4C8NHEj0%3D&reserved=0>
Are you using those options?
On Dec 29, 2021, at 2:19 AM, Maria Jose Esteve <mj...@iest.com>> wrote:
Hi, Let me join you with these tests....
@Harb, I have compiled the SDK from this branch, feature/ROYALE_INTERFACE_INFO, and when running in debug I get this error:
Message on the PURGE CONSOLE is displayed:
Cannot convert org.apache.royale.reflection.beads.ClassAliasBead to IBead
Message in the IDE Window:
Se produjo una excepción: TypeError: Cannot convert [object Object] to IBead
at App.org.apache.royale.core.ElementWrapper.addBead (http://localhost:8080/WNetSuitePlus/org/apache/royale/core/ElementWrapper.js:114:11)
at App.org.apache.royale.core.HTMLElementWrapper.addBead (http://localhost:8080/WNetSuitePlus/org/apache/royale/core/HTMLElementWrapper.js:43:65)
at App.org.apache.royale.jewel.Application.start (http://localhost:8080/WNetSuitePlus/org/apache/royale/jewel/Application.js:246:10)
at App.App_loadXML (http://localhost:8080/WNetSuitePlus/App.js:1681:25)
at org.apache.royale.net.URLLoader.org.apache.royale.events.EventDispatcher.fireListeners (http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:97:23)
at Function.goog.events.EventTarget.dispatchEventInternal_ (http://localhost:8080/WNetSuitePlus/library/closure/goog/events/eventtarget.js:381:26)
at org.apache.royale.net.URLLoader.org.apache.royale.events.EventDispatcher.dispatchEvent (http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:72:37)
at org.apache.royale.net.URLLoader.jsEventHandler (http://localhost:8080/WNetSuitePlus/org/apache/royale/net/URLLoader.js:169:12)
Call stack:
<image003.png>
[INFO] Executing MXMLC in tool group Royale with args: [
-load-config=D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\compile-app-config.xml,
-js-default-initializers=true,
-source-map=true,
-js-dynamic-access-unknown-members=true,
-keep-as3-metadata+=Inject,Dispatcher,EventHandler,Event,PostConstruct,PreDestroy,ViewAdded,ViewRemoved,Bindable,Transient,
-keep-code-with-metadata=Inject,
-show-binding-warnings=false,
-export-public-symbols=false,
-prevent-rename-protected-symbols=false,
-prevent-rename-internal-symbols=false,
-js-output=D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\javascript,
-compiler.targets=JSRoyale,
D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\src\main\royale\App.mxml
The release execution does not change, the error is the same as before (SDK compilation from the develop branch):
Se produjo una excepción: ReferenceError: Error #1065: Variable com.iest.winplusweb.models.MasterConfigSystemModel is not defined.
at yR (http://localhost:8080/WPWebRelease/App.js:3605:1771)
at Mya (http://localhost:8080/WPWebRelease/App.js:3343:365)
at AR.J.usa (http://localhost:8080/WPWebRelease/App.js:434:441)
at GFa.J.fromTypeDefinition (http://localhost:8080/WPWebRelease/App.js:5706:139)
at Function.YT.getTypeDescriptor (http://localhost:8080/WPWebRelease/App.js:4570:820)
at Function.fX.constructBean (http://localhost:8080/WPWebRelease/App.js:2336:472)
at r$.J.initialize (http://localhost:8080/WPWebRelease/App.js:5041:66)
at OW.J.init (http://localhost:8080/WPWebRelease/App.js:950:452)
at OW.J.u (http://localhost:8080/WPWebRelease/App.js:951:454)
at $$.J.addBead (http://localhost:8080/WPWebRelease/App.js:357:549)
The main difference:
project compiled from "SDK-develop" runs fine in js-debug and gives error in js-release and, compiled from "SDK-ROYALE_INTERFACE_INFO" does not launch because of conversion error.
Hiedra
De: Roman Isitua <ro...@gmail.com>>
Enviado el: martes, 28 de diciembre de 2021 15:55
Para: users@royale.apache.org<ma...@royale.apache.org>
Asunto: Re: Load time is very slow
@Harb
I have checked out the feature/ROYALE_INTERFACE_INFO branch and compiled asjs and compiler. I have rebuilt my application with modules in release mode.
I get the following error when I attempt to launch a module
<image001.png>
The module loads fine in debug mode
<image002.png>
Snippets of the log
Overview.js:786 Uncaught TypeError: cm.valuesImpl.init is not a function
at Rr.Mr.yl (Overview.js:786)
at Function.iq.generateMXMLProperties (Overview.js:736)
at Rr.hq.generateMXMLAttributes (Overview.js:546)
at new Rr (Overview.js:804)
at LN.J.loadHandler (FrontEnd.js:1967)
Mr.yl @ Overview.js:786
iq.generateMXMLProperties @ Overview.js:736
hq.generateMXMLAttributes @ Overview.js:546
Rr @ Overview.js:804
J.loadHandler @ FrontEnd.js:1967
load (async)
LN.loadModule @ FrontEnd.js:1965
dN.loadModule @ FrontEnd.js:2406
LD.Un @ FrontEnd.js:1809
ny @ FrontEnd.js:123
ny @ FrontEnd.js:248
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
I have attached the full log to this email.
On Tue, Dec 28, 2021 at 2:51 PM Roman Isitua <ro...@gmail.com>> wrote:
Hi Maria,
Prior to starting this mail discussion "Load time is very slow". I can confirm I have only been compiling in debug mode. My target\javascript\bin\ only had js-debug. It was after I upgraded my royale sdk from 0.9.7 to 0.9.8 that I compiled in release mode.
On Tue, Dec 28, 2021 at 2:24 PM Maria Jose Esteve <mj...@iest.com>> wrote:
Hi, @Roman, I think you are doing a double compile can it be? My times are the same as yours and I always compile in debug and release.
Look at your target folder " target\javascript\bin\" and if you have two folders: js-debug and js-release you are compiling always double.
In my case, the architecture of my project as well as the Maven compilation files (pom.xml) were provided by an external company (we didn't know anything about Maven or Royale at that time) and I understand that this formula was chosen to show us the options we had.
A priori and without doing any test as Harb has done, I think that modularity gives us the advantage of compiling parts of the code once and not compiling them again if they are not modified. So far WITH MY COMPILATION TIMES, sometimes more than 1 minute, this is fundamental. But of course, now we have the problem of minification of the modules and it is really a serious problem because it is impossible for us to deploy in production.
I will try to separate the compiación realese with a profile and if I succeed I will pass it to you @Roman.
@Harb what do you mean by compiling the ROYALE_INTERFACE_INFO branch?
Hiedra
De: Harbs <ha...@gmail.com>>
Enviado el: lunes, 27 de diciembre de 2021 18:32
Para: users@royale.apache.org<ma...@royale.apache.org>
Asunto: Re: Load time is very slow
That doesn’t sound right.
Are you sure you’re compiling debug and not release? That sounds like release build times.
On Dec 27, 2021, at 3:31 PM, Roman Isitua <ro...@gmail.com>> wrote:
Wow ! You are using a workstation with a bleeding edge processor.
I just compiled my app now. It took 44 seconds. (First compilation after ide start up.) Subsequently compilations are usually 19s to 20s.
My application code base is very very small compared to yours. As we continue to add functionality, I expect the compile times to rise.
<MainApp_pom.xml><Overview_pom.xml><fm_client2_pom.xml>
Re: Compiling Modules (was Re: Load time is very slow)
Posted by Roman Isitua <ro...@gmail.com>.
I have performed the test.
- I created a new branch locally called ReleaseModules for compiler and
asjs respectively. (git branch ReleaseModules)
- check out to ReleaseModules for compiler and asjs respectively. (git
checkout ReleaseModules)
- Then pulled from ReleaseModules. (git pull origin ReleaseModules) for
compiler and asjs respectively.
- Then built the compiler and asjs respectively. (mvn clean install)
I am still unable to load the module. However the error is different from
the previous test.
[image: image.png]
The error log
Failed to load resource: the server responded with a status of 404 (Not
Found)
Overview.js:1270 Uncaught TypeError: Cannot read properties of undefined
(reading 'init')
at A_Aeh.A_A.g.h.v.$d.Qo (Overview.js:1270:627)
at Function.A_A.g.h.i.Ua.generateMXMLProperties (Overview.js:1196:316)
at A_Aeh.A_A.g.h.v.qc.generateMXMLAttributes (Overview.js:930:358)
at new A_Aeh (Overview.js:1296:431)
at MN.J.loadHandler (FrontEnd.js:1963:188)
Let me also share the compilation settings used. (correct me if I am wrong)
for main app
--- royale-maven-plugin:0.9.9-SNAPSHOT:compile-app (default-compile-app) @
MainApp ---
[INFO] Executing MXMLC in tool group Royale with args:
[-load-config=C:\Users\nyemi\git\SpacioFM2\SpacioFM2\FmClient2\MainApp\target\compile-app-config.xml,
-compiler.show-binding-warnings=false, -source-map=false,
-js-default-initializers=true, -js-dynamic-access-unknown-members=true,
-keep-as3-metadata+=Inject,Dispatcher,EventHandler,PostConstruct,PreDestroy,ViewAdded,ViewRemoved,Bindable,Transient,
-js-output=C:\Users\nyemi\git\SpacioFM2\SpacioFM2\FmClient2\MainApp\target\javascript,
-compiler.targets=JSRoyale,
C:\Users\nyemi\git\SpacioFM2\SpacioFM2\FmClient2\MainApp\src\main\royale\FrontEnd.mxml]
for the module
[INFO] --- royale-maven-plugin:0.9.9-SNAPSHOT:compile-app
(default-compile-app) @ Overview ---
[INFO] Executing MXMLC in tool group Royale with args:
[-load-config=C:\Users\nyemi\git\SpacioFM2\SpacioFM2\FmClient2\Overview\target\compile-app-config.xml,
-compiler.show-binding-warnings=false, -source-map=false,
-js-default-initializers=true, -js-dynamic-access-unknown-members=true,
-js-output=C:\Users\nyemi\git\SpacioFM2\SpacioFM2\FmClient2\Overview\target\javascript,
-compiler.targets=JSRoyale,
C:\Users\nyemi\git\SpacioFM2\SpacioFM2\FmClient2\Overview\src\main\royale\Overview.mxml]
I can't see the -prevent-rename-object-keys you mentioned being supplied
automatically.
I have attached the pom's for the maven project so you can inspect the
settings I used. I am not sure that I am applying them correctly.
MainApp.xml is the Main application. Overview.xml is the module.
FmClient2.xml is the parent project.
Regards,
On Wed, Jan 12, 2022 at 9:04 AM Alex Harui <ah...@adobe.com> wrote:
> I pushed a ReleaseModules branch in royale-compiler and royale-asjs.
>
>
>
> These changes cause the royale-asjs/examples/royale/ModuleExample release
> version to work.
>
>
>
> The big challenge is that it turned out there is a fair amount of
> infrastructure that is not exported/public. The Language utilities,
> ROYALE_CLASS_INFO, the superclass_ property, cssData and others are going
> to get renamed. And thus renamed differently in the main app vs the module.
>
>
>
> That’s why the current compiler’s strategy was to try to copy the renaming
> map from the main app to the module, but it didn’t always work. There
> seems to be a bug in the Closure Compiler that a set of externs causes the
> compiler to mis-handle package-paths. Also, it meant that the module
> contained its own copy of most of the infrastructure
>
>
>
> The new compiler strategy is a bit more like the old Flex module
> strategy. The module tries to not contain a copy of code that already
> exists in the main app. Some of the goog/base.js stuff still gets copied
> though. Then because we avoid renaming more things, the module can
> reference the shared infrastructure in the main app.
>
>
>
> The new compiler detects if what is being compiled is a loader of modules
> (because it is generating an externs-report) or is a Module and prevents
> renaming of Language APIs, modified base.js to not rename the superClass_
> property used for calling super() and a few other things. In addition, I
> added a -prevent-rename-object-keys compiler option that works as a
> post-processor. It scans the js files being copied into bin/js-debug and
> adds quotes around things.
>
>
>
> By making these changes, I was able to get the closure compiler to
> mis-handle the packages in a more predictable way, so another thing the new
> compiler does is post-process the output file to remove the incorrect
> package code. The incorrect code would re-init package paths like “org” or
> “org.apache.royale”.
>
>
>
> Anyway, give it a try and see if it works. Probably we’ll find out there
> is more infrastructure that needs to not be renamed, but I think this has a
> better chance of working as we aren’t blocked by the compiler outputting
> bad code. Many months ago I tried to understand how why the Closure
> Compiler output bad code, but ran out of time.
>
>
>
> Another difference is that the new compiler strategy doesn’t use custom
> overrides of Closure Compiler passes which was fragile and will make it
> easier to upgrade to newer versions of Closure Compiler.
>
>
>
> HTH,
>
> -Alex
>
>
>
> *From: *Alex Harui <ah...@adobe.com>
> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Date: *Wednesday, January 5, 2022 at 9:53 AM
> *To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Subject: *Re: Compiling Modules (was Re: Load time is very slow)
>
>
>
> I probably won’t have time to really dig into this until the weekend. It
> is looking like the Closure Compiler gets confused when presented with
> externs for the same package tree that the module is generating new classes
> for.
>
>
>
> -Alex
>
>
>
> *From: *Roman Isitua <ro...@gmail.com>
> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Date: *Tuesday, January 4, 2022 at 1:57 PM
> *To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Subject: *Re: Compiling Modules (was Re: Load time is very slow)
>
>
>
> Okay. I knew I was missing something.
>
>
>
> I will test again when the update for load-externs is available.
>
>
>
> On Tue, Jan 4, 2022 at 6:02 PM Alex Harui <ah...@adobe.com> wrote:
>
> Essentially, -externs-report is for the Closure (JS) Compiler.
> -link-report and -load-externs (one leading ‘-‘) is for the Royale Compiler
> to tell the Royale Compiler what classes to feed to the Closure Compiler.
> Both contain the same data (the set of classes used in the main app), just
> formatted differently and used differently.
>
>
>
> The –externs option for the Closure Compiler then tells the Closure
> Compiler not to look for classes in the set of files it is supposed to
> minify.
>
>
>
> So, you have the right settings for the main app, but for the module, it
> should be:
>
> *-js-compiler-option=--externs extrep.txt; -load-externs linkrep.txt;*
>
>
>
> However, even that won’t work today, as the Royale Compiler is not
> handling -load-externs on the JS prep for Closure Compiler. I have some
> local changes to the compiler that mixes most of it, but am facing issues
> with how Closure handles package paths. If that can be resolved, then we
> have a good chance of things working.
>
>
>
> -Alex
>
>
>
> *From: *Roman Isitua <ro...@gmail.com>
> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Date: *Tuesday, January 4, 2022 at 12:39 AM
> *To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Subject: *Re: Compiling Modules (was Re: Load time is very slow)
>
>
>
> Thanks for the update.
>
>
>
> I attempted the following:
>
>
>
> 1. In the main application, I use the following setting:
>
> *-externs-report=extrep.txt; -link-report=linkrep.txt;*
>
>
>
> 2. In the module I use the following
>
>
>
> *-js-compiler-option=--externs extrep.txt;
> -js-compiler-option+=--load-externs linkrep.txt;*
>
>
>
> The main application compiles successfully, I get a compilation error with
> the module
>
>
>
> "--load-externs" is not a valid option
> Sample usage: --compilation_level (-O) VAL --externs VAL --js VAL
> --js_output_file VAL --warning_level (-W) [QUIET | DEFAULT
> | VERBOSE]
> Run with --help for all options and details
> Internal error: java.lang.NullPointerException
> com.google.javascript.jscomp.CommandLineRunner.createOptions(CommandLineRunner.java:1809)org.apache.royale.compiler.utils.JSClosureCompilerWrapper$CompilerOptionsParser.getOptions(JSClosureCompilerWrapper.java:529)org.apache.royale.compiler.utils.JSClosureCompilerWrapper.<init>(JSClosureCompilerWrapper.java:77)org.apache.royale.compiler.internal.codegen.mxml.royale.MXMLRoyalePublisher.publish(MXMLRoyalePublisher.java:395)org.apache.royale.compiler.clients.M
>
>
>
>
>
>
>
> I don't think I am using this option correctly.
>
>
>
>
>
>
>
> .....
>
>
>
> On Tue, Jan 4, 2022 at 8:44 AM Alex Harui <ah...@adobe.com> wrote:
>
> I found some time to investigate. The -externs-report option is mostly
> working correctly, but other compiler changes are needed to try to avoid
> duplicate code in the module. I might have time to investigate more this
> coming weekend. It does appear that if we can correctly reference the
> app’s class from the module that it will work. The Closure Compiler let me
> compile the module after I externalize and avoid requires on everything in
> the main app’s externs report and -js link report, but the references in
> the module have collapsed packages which is either incorrect or aliases
> need to be created.
>
>
>
> However I think this new approach has a better chance of working than
> trying to match renaming tables.
>
>
>
> -Alex
>
>
>
> *From: *Alex Harui <ah...@adobe.com>
> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Date: *Monday, January 3, 2022 at 2:30 PM
> *To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Subject: *Re: Compiling Modules (was Re: Load time is very slow)
>
>
>
> The -externs-report option should be similar to the -link-report option.
> It takes a filename. The compiler should output the classes used in the JS
> compile into that file. To use externs, I think you don’t need to prevent
> renaming in the application as long as public variables are exported. I
> think you specify -externs-report when compiling the application.
>
>
>
> You may also need to output a -link-report from the application as well.
>
>
>
> I think you then specify the externs-report file as an -externs for the
> -js-compiler-options when compiling the module. And maybe also specify the
> -link-report output as a -load-externs in the same way it was used when
> compiling Flex modules. The goal for the module is, like Flex, to not have
> any classes in the module that exist in the main app. Then it doesn’t
> matter about class renaming within the release-mode JS file.
>
>
>
> HTH,
>
> -Alex
>
>
>
> *From: *Roman Isitua <ro...@gmail.com>
> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Date: *Monday, January 3, 2022 at 12:37 PM
> *To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Subject: *Re: Compiling Modules (was Re: Load time is very slow)
>
>
>
>
>
> I can confirm that classes are being renamed in both files.
>
>
>
> I have attempted your suggestion i.e. removing variable maps and property
> maps then use
>
> -externs-report;-export-public-symbols=true;-prevent-rename-public-symbols=true;
>
>
>
>
> I get the below error
>
>
>
> command line Error: configuration variable 'externs-report' expected 1
> argument(s), got 0.
>
>
>
> I cannot find any documentation on how to use the -externs-report
> argument. What does it do ? and what are the acceptable values ?
>
>
>
> Regards,
>
>
>
>
>
> On Sun, Jan 2, 2022 at 9:06 AM Alex Harui <ah...@adobe.com> wrote:
>
> Hi Roman,
>
>
>
> It might be more complicated. The settings are probably doing something
> since you reported that the error occurred in the app vs the module
> depending on the settings.
>
>
>
> I went back and looked at the original module example in
> examples/royale/ModuleExample and was surprised there weren’t more compiler
> settings. I thought we’d found a way to externalize the main app’s code
> for the module. Because if both the app and module have a copy of
> SimpleCSSValuesImpl or any other class that both JS files use, there could
> be issues as to which one gets loaded (maybe both) and what export aliases
> are pointing to. Sounds like changing settings affected whether the
> aliases pointed at module code vs app code.
>
>
>
> I thought we were using similar settings to what we used for SWF where the
> module would not contain a copy of SimpleCSSValuesImpl so it would use the
> one loaded by the main app, but I didn’t see those settings. We might need
> to make that work because otherwise I think static initializations won’t do
> the right thing. Or maybe we’ve figured out that it is simpler just to
> write defensive code that doesn’t get broken. But also, if the module has
> its own copy of code already loaded by the main app, that’s sort of a waste
> of bytes. Maybe there was a minification issue with not having the module
> link in classes already linked into the main app. I see an -externs-report
> option in the compiler but the example doesn’t seem to use it.
>
>
>
> You should be able to scan the JS files and see if a class is in both
> module and app and if it is getting renamed.
>
>
>
> I don’t know if I will have time to investigate further. The currently
> recommended options for modules involving variable maps and property maps
> may need to be abandoned in favor of externs and preventing renames.
>
>
>
> -Alex
>
>
>
>
>
> *From: *Roman Isitua <ro...@gmail.com>
> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Date: *Saturday, January 1, 2022 at 3:02 AM
> *To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Subject: *Re: Compiling Modules (was Re: Load time is very slow)
>
>
>
> Alex, thank you for your detailed analysis of the error log.
>
>
>
> I agree with you that the best strategy is to prevent renaming of
> public/exports used by the module. I have tried different options to
> prevent renaming
>
> It appears none of them stops this. From my observation, it appears that
> this default options below
>
>
>
>
> -export-public-symbols=true;-prevent-rename-public-symbols=true;-prevent-rename-public-instance-accessors=true;
>
>
>
> Only seem to affect the main application (main module) but have no effect
> on the other modules even though I ensured they were applied in
> their respective module pom. I came to this conclusion when I decided to
> turn set -prevent-rename-public-symbols=false
>
>
>
> I noticed that I got the same error but this time around in the main
> module.
>
>
>
> Uncaught TypeError: this.rb[(intermediate value).Kd(...)] is not a function
> at HN.iI.send (FrontEnd.js:970)
> at nI.EH.Ea (FrontEnd.js:880)
> at ON.q6 (FrontEnd.js:1815)
> at TN.L2 (FrontEnd.js:2034)
> at hF.Xf (FrontEnd.js:2063)
> at lF.kb (FrontEnd.js:1233)
> at lF.Vf (FrontEnd.js:1224)
> at cF.O (FrontEnd.js:659)
> at cF.M.w (FrontEnd.js:661)
> at gQ.mA.M (FrontEnd.js:241)
>
>
>
> FrontEnd.js maps to FrontEnd.as in my application and is the entry point
> of the application. This confirms that -prevent-rename-public-symbols=false
> has
>
> an effect on the main module but no effect on other modules even though
> they were applied in the respective module pom's.
>
>
>
> Maybe there are other options I am overlooking.
>
>
>
> On Sat, Jan 1, 2022 at 9:31 AM Alex Harui <ah...@adobe.com> wrote:
>
> In case it helps, the minification (variable renaming) mechanism is
> essentially guaranteed to cause problems in modules. The Closure Compiler
> basically takes variables, sees if it is worth renaming it, then gives it
> the name ‘a’, then ‘b’, and so-on, (it skips a few letters, IIRC), then
> moves on to ‘aa’, and ‘ab’, etc. The odds that the compiler will encounter
> the same variables in the same order when compiling an app and one or more
> modules is close to zero.
>
>
>
> I did some work to try to dump the mapping of the renamed variables in the
> main app and use that when compiling the modules. It was working for a
> while, then some code was added to the framework that started fooling the
> Closure Compiler. I spent some time trying to fix the Closure Compiler,
> but ran out of time. Meanwhile, Josh was adding more control over renaming
> so I moved on to other things.
>
>
>
> IMO, the best strategy to take would be to try to control what gets
> renamed. All public/exports from the app that are used by the module
> should not be renamed. That will definitely make the app and modules
> bigger, but unless the Closure Compiler folks become interested in
> runtime-loaded modules, it is challenging for the Royale compiler to allow
> aggressive renaming.
>
>
>
> I think what is going on with the exceptions below is that exporting
> doesn’t really prevent renaming. It only sets up an externally-visible
> alias to a renamed variable. Especially for static members. So it isn’t
> sufficient to export public variables, the code within the module must not
> let the Closure Compiler think that the intra-module references can be
> renamed, in this case, from SimpleCSSValuesImpl to QI
>
>
>
> I don’t know the renaming options we’ve added to the Royale Compiler, so I
> don’t know if there is an option to control that. I think there is a way
> to convince the Closure Compiler to not rename SimpleCSSValuesImpl because
> I’ve seen other class names not get renamed.
>
>
>
> HTH,
>
> -Alex
>
>
>
> *From: *Roman Isitua <ro...@gmail.com>
> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Date: *Friday, December 31, 2021 at 10:42 AM
> *To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Subject: *Re: Compiling Modules (was Re: Load time is very slow)
>
>
>
> I have tested on both. The error log is the same.
>
>
>
> I don't understand your second question. Kindly clarify ?
>
>
>
>
>
> I followed strictly the approach used for loading modules here in this
> example.
>
> This is the only method I know for loading modules. If there is another
> method please share.
>
>
>
>
>
>
> https://royale.apache.org/dividing-an-apache-royale-application-with-modules/
> <https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Froyale.apache.org%2Fdividing-an-apache-royale-application-with-modules%2F&data=04%7C01%7Caharui%40adobe.com%7Ce0c38cc4559641ff0f2108d9d074405d%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637770019992898481%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=c65JOYsEODcatlGZtwlpe7DOQanC%2BdL3zyGSPWgBYS4%3D&reserved=0>
>
>
>
> On Fri, 31 Dec 2021, 19:14 Maria Jose Esteve, <mj...@iest.com> wrote:
>
> @Roman, which branch did you compile the SDK from, ROYALE_INTERFACE_INFO
> or develop?
>
> Could you pass the Overview.mxml view to the main application? (to rule
> it out)
>
>
>
> Hiedra
>
>
>
> *De:* Roman Isitua <ro...@gmail.com>
> *Enviado el:* viernes, 31 de diciembre de 2021 17:56
> *Para:* users@royale.apache.org
> *Asunto:* Re: Compiling Modules (was Re: Load time is very slow)
>
>
>
> I have tried tracing where the errors are happening whenever I test the
> release version
>
> Uncaught TypeError: Ql.valuesImpl.init is not a function
> at Hr.Cr.um (Overview.js:846)
> at Function.ep.generateMXMLProperties (Overview.js:795)
> at Hr.Sp.generateMXMLAttributes (Overview.js:599)
> at new Hr (Overview.js:864)
> at PN.M.loadHandler (FrontEnd.js:2042)
> 9Overview.js:173 Uncaught TypeError: this.createElement is not a function
> at $B.V (Overview.js:173)
> at new $B (FrontEnd.js:2430)
> at EP.convert (FrontEnd.js:2430)
> at Zy (FrontEnd.js:261)
> at HTMLAnchorElement.Uy (FrontEnd.js:121)
> at HTMLAnchorElement.Sy.b (FrontEnd.js:117)
>
>
>
>
>
> The highlighted code in red is declared as follows in the Overview.mxml
> (maven module)
>
>
>
> <j:valuesImpl>
>
> <js:SimpleCSSValuesImpl/>
>
> </j:valuesImpl>
>
>
>
> The j:valuesImpl points to the following code in jewel Module.js
>
>
>
> /**
> * @nocollapse
> * @export
> * @type {org.apache.royale.core.IValuesImpl}
> */
> org.apache.royale.jewel.Module.prototype.valuesImpl;
>
>
> org.apache.royale.jewel.Module.prototype.set__valuesImpl = function(value)
> {
> org.apache.royale.core.ValuesManager.valuesImpl.init(this);
> };
>
>
>
>
>
> it appears this function is improperly renamed and whenever the app tries
> to load the module is not able to recognise it as a function.
>
>
>
> The same issue of improper function renaming is happening in the second
> error as well
>
>
>
> 9Overview.js:173 Uncaught TypeError: this.createElement is not a function
>
>
>
>
>
> On Thu, Dec 30, 2021 at 10:42 PM Roman Isitua <ro...@gmail.com>
> wrote:
>
>
>
> I have applied the js compiler option as follows
>
>
>
>
> <additionalCompilerOptions>-source-map=false;-compiler.show-binding-warnings=false;-js-default-initializers=true;-js-dynamic-access-unknown-members=true;
> -js-compiler-option=--variable_map_output_file
> gccvars.txt;-js-compiler-option+=--property_map_output_file gccprops.txt
> </additionalCompilerOptions>
>
>
>
>
>
> I get the same error as before when attempting to launch the jewel module.
>
>
>
> *Error! Filename not specified.*
>
>
>
>
>
> Same error trace.
>
>
>
> Uncaught TypeError: cm.valuesImpl.init is not a function
> at Rr.Mr.yl (Overview.js:786)
> at Function.iq.generateMXMLProperties (Overview.js:736)
> at Rr.hq.generateMXMLAttributes (Overview.js:546)
> at new Rr (Overview.js:804)
> at LN.J.loadHandler (FrontEnd.js:1967)
> FrontEnd.js:1640 Uncaught TypeError: M is not a function
> at oM.J.handleMouseOut (FrontEnd.js:1640)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:248)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> FrontEnd.js:1640 Uncaught TypeError: M is not a function
> at oM.J.handleMouseOver (FrontEnd.js:1640)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:248)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> FrontEnd.js:1640 Uncaught TypeError: M is not a function
> at oM.J.handleMouseOut (FrontEnd.js:1640)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:248)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> FrontEnd.js:1640 Uncaught TypeError: M is not a function
> at oM.J.handleMouseOver (FrontEnd.js:1640)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:248)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> FrontEnd.js:1640 Uncaught TypeError: M is not a function
> at oM.J.handleMouseOut (FrontEnd.js:1640)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:248)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> FrontEnd.js:1640 Uncaught TypeError: M is not a function
> at oM.J.handleMouseOver (FrontEnd.js:1640)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:248)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> FrontEnd.js:1640 Uncaught TypeError: M is not a function
> at oM.J.handleMouseOut (FrontEnd.js:1640)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:248)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> 3Overview.js:56 Uncaught TypeError: Cannot read properties of undefined
> (reading 'prototype')
> at P (Overview.js:56)
> at SG.convert (FrontEnd.js:904)
> at ny (FrontEnd.js:248)
> at HTMLElement.iy (FrontEnd.js:125)
> at HTMLElement.b (FrontEnd.js:121)
>
>
>
> On Thu, Dec 30, 2021 at 6:56 PM Harbs <ha...@gmail.com> wrote:
>
> 1. I’d get rid of the agressive minification options. It will likely cause
> issues. If you get it to work without those options, you can try to add
> them back in and see if it still works.
>
> 2. You seem to be missing the compiler options explained here:
> https://apache.github.io/royale-docs/features/modules#minification
> <https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapache.github.io%2Froyale-docs%2Ffeatures%2Fmodules%23minification&data=04%7C01%7Caharui%40adobe.com%7Ce0c38cc4559641ff0f2108d9d074405d%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637770019992898481%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=y2M3Q%2F9KMsGdV2gANubdFhMj3uB5rzUgVxJDbF6wYKI%3D&reserved=0>
>
>
>
> For a pom, it would look something like this (adjust your paths to match
> your setup):
>
>
>
> Main app:
>
> <additionalCompilerOptions>-source-map=true;-js-compiler-option=--variable_map_output_file
> gccvars.txt;-js-compiler-option+=--property_map_output_file
> gccprops.txt</additionalCompilerOptions>
>
>
>
> Module:
>
> <additionalCompilerOptions>-source-map=true;-js-compiler-option=--variable_map_input_file
> ../../../../../MainApp/bin/js-release/gccvars.txt;-js-compiler-option+=--property_map_input_file
> ../../../../../MainApp/bin/js-release/gccprops.txt</additionalCompilerOptions>
>
>
>
> On Dec 30, 2021, at 7:43 PM, Roman Isitua <ro...@gmail.com> wrote:
>
>
>
> I think it will be better for me to share my pom's that way you can see
> all the compilation options used. The pom for the parent (FmClient2), the
> MainApp and one module (Overview) have been attached to this email.
>
>
>
>
>
> On Thu, Dec 30, 2021 at 6:22 PM Harbs <ha...@gmail.com> wrote:
>
> Roman, can you share your full compiler options?
>
>
>
> I decided to remove the below settings completely
> -export-public-symbols=false
> -prevent-rename-protected-symbols=false
> -prevent-rename-public-symbols=false
> -prevent-rename-internal-symbols=false
>
>
> I enabled the below settings
>
> -js-dynamic-access-unknown-members=true;
> -js-default-initializers=true
>
>
> The release version starts up
>
>
>
> Hiedra, that’s great!
>
>
>
> On Dec 30, 2021, at 7:15 PM, Roman Isitua <ro...@gmail.com> wrote:
>
>
>
>
>
> Yes. I am testing with the sdk compiled on branch ROYALE_INTERFACE_INFO
>
>
>
> On Thu, Dec 30, 2021 at 6:10 PM Maria Jose Esteve <mj...@iest.com>
> wrote:
>
> Roman, are you testing with the SDK compiled from the Harb branches,
> ROYALE_INTERFACE_INFO, or from develop?
>
>
>
> Hiedra
>
>
>
> *De:* Roman Isitua <ro...@gmail.com>
> *Enviado el:* jueves, 30 de diciembre de 2021 16:52
> *Para:* users@royale.apache.org
> *Asunto:* Re: Compiling Modules (was Re: Load time is very slow)
>
>
>
> I decided to remove the below settings completely
> -export-public-symbols=false
> -prevent-rename-protected-symbols=false
> -prevent-rename-public-symbols=false
> -prevent-rename-internal-symbols=false
>
>
> I enabled the below settings
>
> -js-dynamic-access-unknown-members=true;
> -js-default-initializers=true
>
>
> The release version starts up
>
>
>
>
>
>
>
> <image001.png>
>
>
>
>
>
> <image002.png>
>
>
>
> However, the moment I launch a module. I get the below error
>
>
>
> <image003.png>
>
>
>
>
>
> It appears to be failing when I launch the "*Overview*" module
> (by clicking the Overview side menu).
>
>
>
> So my current observation is that by retaining only two settings
>
>
>
> -js-dynamic-access-unknown-members=true;
> -js-default-initializers=true
>
>
>
> The release module starts up but the app fails whenever I launch a module.
>
>
>
> The smallest size settings in the documentation do not work. The app does
> not start up.
>
>
>
> -export-public-symbols=false
> -prevent-rename-protected-symbols=false
> -prevent-rename-public-symbols=false
> -prevent-rename-internal-symbols=false
>
>
>
>
>
>
>
> The error trace is below
>
>
>
>
>
> Uncaught TypeError: cm.valuesImpl.init is not a function
> at Wr.Rr.pl
> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwr.rr.pl%2F&data=04%7C01%7Caharui%40adobe.com%7Ce0c38cc4559641ff0f2108d9d074405d%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637770019992898481%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=N4Mx5wcKqYMpOWlu5N7IbWeBmPyhbDkM0OAAnOqjZlI%3D&reserved=0>
> (Overview.js:792)
> at Function.mq.generateMXMLProperties (Overview.js:743)
> at Wr.lq.generateMXMLAttributes (Overview.js:551)
> at new Wr (Overview.js:810)
> at QN.J.loadHandler (FrontEnd.js:1978)
> 3Overview.js:56 Uncaught TypeError: Cannot read properties of undefined
> (reading 'prototype')
> at P (Overview.js:56)
> at VG.convert (FrontEnd.js:910)
> at ny (FrontEnd.js:250)
> at HTMLElement.iy (FrontEnd.js:125)
> at HTMLElement.b (FrontEnd.js:121)
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOut (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOver (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOver @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOut (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOut @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOver (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOver @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOut (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOut @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOver (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOver @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOut (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOut @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOver (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOver @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOut (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOut @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
>
>
>
> On Thu, Dec 30, 2021 at 4:32 PM Roman Isitua <ro...@gmail.com>
> wrote:
>
> I get the same error even when I set
> the -js-dynamic-access-unknown-members=true;
>
>
>
> On Thu, Dec 30, 2021 at 4:24 PM Roman Isitua <ro...@gmail.com>
> wrote:
>
>
>
> Using the below settings,
>
> -export-public-symbols=false
> -prevent-rename-protected-symbols=false
> -prevent-rename-public-symbols=false
> -prevent-rename-internal-symbols=false
> -js-dynamic-access-unknown-members=false;
>
> -js-default-initializers=true
>
>
> Debug version runs fine. The release version does not start up
>
> <image004.png>
>
>
> I get the below errors
>
> Uncaught TypeError: Cannot read properties of undefined (reading 'apply')
> at KE.hm (FrontEnd.js:1600)
> at XE.M.Fb (FrontEnd.js:943)
> at XE.M.uh (FrontEnd.js:937)
> at FE.M.na
> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Ffe.m.na%2F&data=04%7C01%7Caharui%40adobe.com%7Ce0c38cc4559641ff0f2108d9d074405d%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637770019992898481%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=C0z70EcllmVEEFk21%2FuH%2FhC%2Fz8a8hrB7AuxRyMw%2FXn4%3D&reserved=0>
> (FrontEnd.js:497)
> at FE.M.v (FrontEnd.js:497)
> at dR.M.S (FrontEnd.js:213)
> at dR.Nz.S (FrontEnd.js:217)
> at dR.M.start (FrontEnd.js:1396)
> at index.html:45
> :8080/favicon.ico:1 Failed to load resource: the server responded with a
> status of 404 (Not Found)
>
>
>
>
>
> FrontEnd.js is the start up class for the application. i.e. It implements
> the Jewel application class.
>
>
>
>
>
>
>
> On Thu, Dec 30, 2021 at 3:19 PM Roman Isitua <ro...@gmail.com>
> wrote:
>
> Hi Harb,
>
>
>
> Thanks for your response. I have gone through the documentation. I will do
> my test again starting with the smallest size option and share my findings.
>
>
>
> Regards,
>
>
>
> On Thu, Dec 30, 2021 at 10:59 AM Harbs <ha...@gmail.com> wrote:
>
> Sorry for my deal in responding.
>
>
>
> Let’s take a step back.
>
>
>
> I’m not sure how you are compiling your modules. I just added some content
> to the module documentation page which explains what compiler options you
> need while compiling modules. (It still needs some editing.)
> https://apache.github.io/royale-docs/features/modules#minification
> <https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapache.github.io%2Froyale-docs%2Ffeatures%2Fmodules%23minification&data=04%7C01%7Caharui%40adobe.com%7Ce0c38cc4559641ff0f2108d9d074405d%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637770019992898481%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=y2M3Q%2F9KMsGdV2gANubdFhMj3uB5rzUgVxJDbF6wYKI%3D&reserved=0>
>
>
>
> Are you using those options?
>
>
>
> On Dec 29, 2021, at 2:19 AM, Maria Jose Esteve <mj...@iest.com> wrote:
>
>
>
> Hi, Let me join you with these tests....
>
>
>
> @Harb, I have compiled the SDK from this branch, feature/ROYALE_INTERFACE_INFO,
> and when running in debug I get this error:
>
>
>
> Message on the PURGE CONSOLE is displayed:
>
>
>
> Cannot convert org.apache.royale.reflection.beads.ClassAliasBead to IBead
>
>
>
> Message in the IDE Window:
>
>
>
> Se produjo una excepción: TypeError: Cannot convert [object Object] to
> IBead
>
> at App.org.apache.royale.core.ElementWrapper.addBead (
> http://localhost:8080/WNetSuitePlus/org/apache/royale/core/ElementWrapper.js:114:11
> )
>
> at App.org.apache.royale.core.HTMLElementWrapper.addBead (
> http://localhost:8080/WNetSuitePlus/org/apache/royale/core/HTMLElementWrapper.js:43:65
> )
>
> at App.org.apache.royale.jewel.Application.start (
> http://localhost:8080/WNetSuitePlus/org/apache/royale/jewel/Application.js:246:10
> )
>
> at App.App_loadXML (http://localhost:8080/WNetSuitePlus/App.js:1681:25
> )
>
> at
> org.apache.royale.net.URLLoader.org.apache.royale.events.EventDispatcher.fireListeners
> (
> http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:97:23
> )
>
> at Function.goog.events.EventTarget.dispatchEventInternal_ (
> http://localhost:8080/WNetSuitePlus/library/closure/goog/events/eventtarget.js:381:26
> )
>
> at
> org.apache.royale.net.URLLoader.org.apache.royale.events.EventDispatcher.dispatchEvent
> (
> http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:72:37
> )
>
> at org.apache.royale.net.URLLoader.jsEventHandler (
> http://localhost:8080/WNetSuitePlus/org/apache/royale/net/URLLoader.js:169:12
> )
>
>
>
> Call stack:
>
>
>
> <image003.png>
>
>
>
> [INFO] Executing MXMLC in tool group Royale with args: [
>
>
> -load-config=D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\compile-app-config.xml,
>
> -js-default-initializers=true,
>
> -source-map=true,
>
> -js-dynamic-access-unknown-members=true,
>
>
> -keep-as3-metadata+=Inject,Dispatcher,EventHandler,Event,PostConstruct,PreDestroy,ViewAdded,ViewRemoved,Bindable,Transient,
>
> -keep-code-with-metadata=Inject,
>
> -show-binding-warnings=false,
>
> -export-public-symbols=false,
>
> -prevent-rename-protected-symbols=false,
>
> -prevent-rename-internal-symbols=false,
>
>
> -js-output=D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\javascript,
>
> -compiler.targets=JSRoyale,
>
>
> D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\src\main\royale\App.mxml
>
>
>
>
>
> The release execution does not change, the error is the same as before
> (SDK compilation from the develop branch):
>
>
>
> Se produjo una excepción: ReferenceError: Error #1065: Variable
> com.iest.winplusweb.models.MasterConfigSystemModel is not defined.
>
> at yR (http://localhost:8080/WPWebRelease/App.js:3605:1771)
>
> at Mya (http://localhost:8080/WPWebRelease/App.js:3343:365)
>
> at AR.J.usa (http://localhost:8080/WPWebRelease/App.js:434:441)
>
> at GFa.J.fromTypeDefinition (
> http://localhost:8080/WPWebRelease/App.js:5706:139)
>
> at Function.YT.getTypeDescriptor (
> http://localhost:8080/WPWebRelease/App.js:4570:820)
>
> at Function.fX.constructBean (
> http://localhost:8080/WPWebRelease/App.js:2336:472)
>
> at r$.J.initialize (http://localhost:8080/WPWebRelease/App.js:5041:66)
>
> at OW.J.init (http://localhost:8080/WPWebRelease/App.js:950:452)
>
> at OW.J.u (http://localhost:8080/WPWebRelease/App.js:951:454)
>
> at $$.J.addBead (http://localhost:8080/WPWebRelease/App.js:357:549)
>
>
>
> The main difference:
>
> project compiled from "SDK-develop" runs fine in js-debug and gives error
> in js-release and, compiled from "SDK-ROYALE_INTERFACE_INFO" does not
> launch because of conversion error.
>
>
>
> Hiedra
>
>
>
> *De:* Roman Isitua <ro...@gmail.com>
> *Enviado el:* martes, 28 de diciembre de 2021 15:55
> *Para:* users@royale.apache.org
> *Asunto:* Re: Load time is very slow
>
>
>
> @Harb
>
>
>
> I have checked out the feature/ROYALE_INTERFACE_INFO branch and compiled
> asjs and compiler. I have rebuilt my application with modules in release
> mode.
>
>
>
> I get the following error when I attempt to launch a module
>
>
>
>
>
> <image001.png>
>
>
>
>
>
> The module loads fine in debug mode
>
>
>
> <image002.png>
>
>
>
>
>
> Snippets of the log
>
>
>
> Overview.js:786 Uncaught TypeError: cm.valuesImpl.init is not a function
> at Rr.Mr.yl (Overview.js:786)
> at Function.iq.generateMXMLProperties (Overview.js:736)
> at Rr.hq.generateMXMLAttributes (Overview.js:546)
> at new Rr (Overview.js:804)
> at LN.J.loadHandler (FrontEnd.js:1967)
> Mr.yl @ Overview.js:786
> iq.generateMXMLProperties @ Overview.js:736
> hq.generateMXMLAttributes @ Overview.js:546
> Rr @ Overview.js:804
> J.loadHandler @ FrontEnd.js:1967
> load (async)
> LN.loadModule @ FrontEnd.js:1965
> dN.loadModule @ FrontEnd.js:2406
> LD.Un @ FrontEnd.js:1809
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:248
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
>
>
>
>
>
> I have attached the full log to this email.
>
>
>
>
>
>
>
>
>
> On Tue, Dec 28, 2021 at 2:51 PM Roman Isitua <ro...@gmail.com>
> wrote:
>
> Hi Maria,
>
>
>
> Prior to starting this mail discussion "Load time is very slow". I can
> confirm I have only been compiling in debug mode. My target\javascript\bin\
> only had js-debug. It was after I upgraded my royale sdk from 0.9.7 to
> 0.9.8 that I compiled in release mode.
>
>
>
>
>
>
>
> On Tue, Dec 28, 2021 at 2:24 PM Maria Jose Esteve <mj...@iest.com>
> wrote:
>
> Hi, @Roman, I think you are doing a double compile can it be? My times are
> the same as yours and I always compile in debug and release.
>
>
>
> Look at your target folder " target\javascript\bin\" and if you have two
> folders: js-debug and js-release you are compiling always double.
>
>
>
> In my case, the architecture of my project as well as the Maven
> compilation files (pom.xml) were provided by an external company (we didn't
> know anything about Maven or Royale at that time) and I understand that
> this formula was chosen to show us the options we had.
>
>
>
> A priori and without doing any test as Harb has done, I think that
> modularity gives us the advantage of compiling parts of the code once and
> not compiling them again if they are not modified. So far WITH MY
> COMPILATION TIMES, sometimes more than 1 minute, this is fundamental. But
> of course, now we have the problem of minification of the modules and it is
> really a serious problem because it is impossible for us to deploy in
> production.
>
>
>
> I will try to separate the compiación realese with a profile and if I
> succeed I will pass it to you @Roman.
>
>
>
> @Harb what do you mean by compiling the ROYALE_INTERFACE_INFO branch?
>
>
>
> Hiedra
>
>
>
> *De:* Harbs <ha...@gmail.com>
> *Enviado el:* lunes, 27 de diciembre de 2021 18:32
> *Para:* users@royale.apache.org
> *Asunto:* Re: Load time is very slow
>
>
>
> That doesn’t sound right.
>
>
>
> Are you sure you’re compiling debug and not release? That sounds like
> release build times.
>
>
>
> On Dec 27, 2021, at 3:31 PM, Roman Isitua <ro...@gmail.com> wrote:
>
>
>
> Wow ! You are using a workstation with a bleeding edge processor.
>
>
>
> I just compiled my app now. It took 44 seconds. (First compilation after
> ide start up.) Subsequently compilations are usually 19s to 20s.
>
>
>
> My application code base is very very small compared to yours. As we
> continue to add functionality, I expect the compile times to rise.
>
>
>
>
>
>
>
>
>
> <MainApp_pom.xml><Overview_pom.xml><fm_client2_pom.xml>
>
>
>
>
Re: Compiling Modules (was Re: Load time is very slow)
Posted by Alex Harui <ah...@adobe.com>.
I pushed a ReleaseModules branch in royale-compiler and royale-asjs.
These changes cause the royale-asjs/examples/royale/ModuleExample release version to work.
The big challenge is that it turned out there is a fair amount of infrastructure that is not exported/public. The Language utilities, ROYALE_CLASS_INFO, the superclass_ property, cssData and others are going to get renamed. And thus renamed differently in the main app vs the module.
That’s why the current compiler’s strategy was to try to copy the renaming map from the main app to the module, but it didn’t always work. There seems to be a bug in the Closure Compiler that a set of externs causes the compiler to mis-handle package-paths. Also, it meant that the module contained its own copy of most of the infrastructure
The new compiler strategy is a bit more like the old Flex module strategy. The module tries to not contain a copy of code that already exists in the main app. Some of the goog/base.js stuff still gets copied though. Then because we avoid renaming more things, the module can reference the shared infrastructure in the main app.
The new compiler detects if what is being compiled is a loader of modules (because it is generating an externs-report) or is a Module and prevents renaming of Language APIs, modified base.js to not rename the superClass_ property used for calling super() and a few other things. In addition, I added a -prevent-rename-object-keys compiler option that works as a post-processor. It scans the js files being copied into bin/js-debug and adds quotes around things.
By making these changes, I was able to get the closure compiler to mis-handle the packages in a more predictable way, so another thing the new compiler does is post-process the output file to remove the incorrect package code. The incorrect code would re-init package paths like “org” or “org.apache.royale”.
Anyway, give it a try and see if it works. Probably we’ll find out there is more infrastructure that needs to not be renamed, but I think this has a better chance of working as we aren’t blocked by the compiler outputting bad code. Many months ago I tried to understand how why the Closure Compiler output bad code, but ran out of time.
Another difference is that the new compiler strategy doesn’t use custom overrides of Closure Compiler passes which was fragile and will make it easier to upgrade to newer versions of Closure Compiler.
HTH,
-Alex
From: Alex Harui <ah...@adobe.com>
Reply-To: "users@royale.apache.org" <us...@royale.apache.org>
Date: Wednesday, January 5, 2022 at 9:53 AM
To: "users@royale.apache.org" <us...@royale.apache.org>
Subject: Re: Compiling Modules (was Re: Load time is very slow)
I probably won’t have time to really dig into this until the weekend. It is looking like the Closure Compiler gets confused when presented with externs for the same package tree that the module is generating new classes for.
-Alex
From: Roman Isitua <ro...@gmail.com>
Reply-To: "users@royale.apache.org" <us...@royale.apache.org>
Date: Tuesday, January 4, 2022 at 1:57 PM
To: "users@royale.apache.org" <us...@royale.apache.org>
Subject: Re: Compiling Modules (was Re: Load time is very slow)
Okay. I knew I was missing something.
I will test again when the update for load-externs is available.
On Tue, Jan 4, 2022 at 6:02 PM Alex Harui <ah...@adobe.com>> wrote:
Essentially, -externs-report is for the Closure (JS) Compiler. -link-report and -load-externs (one leading ‘-‘) is for the Royale Compiler to tell the Royale Compiler what classes to feed to the Closure Compiler. Both contain the same data (the set of classes used in the main app), just formatted differently and used differently.
The –externs option for the Closure Compiler then tells the Closure Compiler not to look for classes in the set of files it is supposed to minify.
So, you have the right settings for the main app, but for the module, it should be:
-js-compiler-option=--externs extrep.txt; -load-externs linkrep.txt;
However, even that won’t work today, as the Royale Compiler is not handling -load-externs on the JS prep for Closure Compiler. I have some local changes to the compiler that mixes most of it, but am facing issues with how Closure handles package paths. If that can be resolved, then we have a good chance of things working.
-Alex
From: Roman Isitua <ro...@gmail.com>>
Reply-To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Date: Tuesday, January 4, 2022 at 12:39 AM
To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Subject: Re: Compiling Modules (was Re: Load time is very slow)
Thanks for the update.
I attempted the following:
1. In the main application, I use the following setting:
-externs-report=extrep.txt; -link-report=linkrep.txt;
2. In the module I use the following
-js-compiler-option=--externs extrep.txt; -js-compiler-option+=--load-externs linkrep.txt;
The main application compiles successfully, I get a compilation error with the module
"--load-externs" is not a valid option
Sample usage: --compilation_level (-O) VAL --externs VAL --js VAL --js_output_file VAL --warning_level (-W) [QUIET | DEFAULT
| VERBOSE]
Run with --help for all options and details
Internal error: java.lang.NullPointerException com.google.javascript.jscomp.CommandLineRunner.createOptions(CommandLineRunner.java:1809)org.apache.royale.compiler.utils.JSClosureCompilerWrapper$CompilerOptionsParser.getOptions(JSClosureCompilerWrapper.java:529)org.apache.royale.compiler.utils.JSClosureCompilerWrapper.<init>(JSClosureCompilerWrapper.java:77)org.apache.royale.compiler.internal.codegen.mxml.royale.MXMLRoyalePublisher.publish(MXMLRoyalePublisher.java:395)org.apache.royale.compiler.clients.M
I don't think I am using this option correctly.
.....
On Tue, Jan 4, 2022 at 8:44 AM Alex Harui <ah...@adobe.com>> wrote:
I found some time to investigate. The -externs-report option is mostly working correctly, but other compiler changes are needed to try to avoid duplicate code in the module. I might have time to investigate more this coming weekend. It does appear that if we can correctly reference the app’s class from the module that it will work. The Closure Compiler let me compile the module after I externalize and avoid requires on everything in the main app’s externs report and -js link report, but the references in the module have collapsed packages which is either incorrect or aliases need to be created.
However I think this new approach has a better chance of working than trying to match renaming tables.
-Alex
From: Alex Harui <ah...@adobe.com>>
Reply-To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Date: Monday, January 3, 2022 at 2:30 PM
To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Subject: Re: Compiling Modules (was Re: Load time is very slow)
The -externs-report option should be similar to the -link-report option. It takes a filename. The compiler should output the classes used in the JS compile into that file. To use externs, I think you don’t need to prevent renaming in the application as long as public variables are exported. I think you specify -externs-report when compiling the application.
You may also need to output a -link-report from the application as well.
I think you then specify the externs-report file as an -externs for the -js-compiler-options when compiling the module. And maybe also specify the -link-report output as a -load-externs in the same way it was used when compiling Flex modules. The goal for the module is, like Flex, to not have any classes in the module that exist in the main app. Then it doesn’t matter about class renaming within the release-mode JS file.
HTH,
-Alex
From: Roman Isitua <ro...@gmail.com>>
Reply-To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Date: Monday, January 3, 2022 at 12:37 PM
To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Subject: Re: Compiling Modules (was Re: Load time is very slow)
I can confirm that classes are being renamed in both files.
I have attempted your suggestion i.e. removing variable maps and property maps then use
-externs-report;-export-public-symbols=true;-prevent-rename-public-symbols=true;
I get the below error
command line Error: configuration variable 'externs-report' expected 1 argument(s), got 0.
I cannot find any documentation on how to use the -externs-report argument. What does it do ? and what are the acceptable values ?
Regards,
On Sun, Jan 2, 2022 at 9:06 AM Alex Harui <ah...@adobe.com>> wrote:
Hi Roman,
It might be more complicated. The settings are probably doing something since you reported that the error occurred in the app vs the module depending on the settings.
I went back and looked at the original module example in examples/royale/ModuleExample and was surprised there weren’t more compiler settings. I thought we’d found a way to externalize the main app’s code for the module. Because if both the app and module have a copy of SimpleCSSValuesImpl or any other class that both JS files use, there could be issues as to which one gets loaded (maybe both) and what export aliases are pointing to. Sounds like changing settings affected whether the aliases pointed at module code vs app code.
I thought we were using similar settings to what we used for SWF where the module would not contain a copy of SimpleCSSValuesImpl so it would use the one loaded by the main app, but I didn’t see those settings. We might need to make that work because otherwise I think static initializations won’t do the right thing. Or maybe we’ve figured out that it is simpler just to write defensive code that doesn’t get broken. But also, if the module has its own copy of code already loaded by the main app, that’s sort of a waste of bytes. Maybe there was a minification issue with not having the module link in classes already linked into the main app. I see an -externs-report option in the compiler but the example doesn’t seem to use it.
You should be able to scan the JS files and see if a class is in both module and app and if it is getting renamed.
I don’t know if I will have time to investigate further. The currently recommended options for modules involving variable maps and property maps may need to be abandoned in favor of externs and preventing renames.
-Alex
From: Roman Isitua <ro...@gmail.com>>
Reply-To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Date: Saturday, January 1, 2022 at 3:02 AM
To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Subject: Re: Compiling Modules (was Re: Load time is very slow)
Alex, thank you for your detailed analysis of the error log.
I agree with you that the best strategy is to prevent renaming of public/exports used by the module. I have tried different options to prevent renaming
It appears none of them stops this. From my observation, it appears that this default options below
-export-public-symbols=true;-prevent-rename-public-symbols=true;-prevent-rename-public-instance-accessors=true;
Only seem to affect the main application (main module) but have no effect on the other modules even though I ensured they were applied in their respective module pom. I came to this conclusion when I decided to turn set -prevent-rename-public-symbols=false
I noticed that I got the same error but this time around in the main module.
Uncaught TypeError: this.rb[(intermediate value).Kd(...)] is not a function
at HN.iI.send (FrontEnd.js:970)
at nI.EH.Ea (FrontEnd.js:880)
at ON.q6 (FrontEnd.js:1815)
at TN.L2 (FrontEnd.js:2034)
at hF.Xf (FrontEnd.js:2063)
at lF.kb (FrontEnd.js:1233)
at lF.Vf (FrontEnd.js:1224)
at cF.O (FrontEnd.js:659)
at cF.M.w (FrontEnd.js:661)
at gQ.mA.M (FrontEnd.js:241)
FrontEnd.js maps to FrontEnd.as in my application and is the entry point of the application. This confirms that -prevent-rename-public-symbols=false has
an effect on the main module but no effect on other modules even though they were applied in the respective module pom's.
Maybe there are other options I am overlooking.
On Sat, Jan 1, 2022 at 9:31 AM Alex Harui <ah...@adobe.com>> wrote:
In case it helps, the minification (variable renaming) mechanism is essentially guaranteed to cause problems in modules. The Closure Compiler basically takes variables, sees if it is worth renaming it, then gives it the name ‘a’, then ‘b’, and so-on, (it skips a few letters, IIRC), then moves on to ‘aa’, and ‘ab’, etc. The odds that the compiler will encounter the same variables in the same order when compiling an app and one or more modules is close to zero.
I did some work to try to dump the mapping of the renamed variables in the main app and use that when compiling the modules. It was working for a while, then some code was added to the framework that started fooling the Closure Compiler. I spent some time trying to fix the Closure Compiler, but ran out of time. Meanwhile, Josh was adding more control over renaming so I moved on to other things.
IMO, the best strategy to take would be to try to control what gets renamed. All public/exports from the app that are used by the module should not be renamed. That will definitely make the app and modules bigger, but unless the Closure Compiler folks become interested in runtime-loaded modules, it is challenging for the Royale compiler to allow aggressive renaming.
I think what is going on with the exceptions below is that exporting doesn’t really prevent renaming. It only sets up an externally-visible alias to a renamed variable. Especially for static members. So it isn’t sufficient to export public variables, the code within the module must not let the Closure Compiler think that the intra-module references can be renamed, in this case, from SimpleCSSValuesImpl to QI
I don’t know the renaming options we’ve added to the Royale Compiler, so I don’t know if there is an option to control that. I think there is a way to convince the Closure Compiler to not rename SimpleCSSValuesImpl because I’ve seen other class names not get renamed.
HTH,
-Alex
From: Roman Isitua <ro...@gmail.com>>
Reply-To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Date: Friday, December 31, 2021 at 10:42 AM
To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Subject: Re: Compiling Modules (was Re: Load time is very slow)
I have tested on both. The error log is the same.
I don't understand your second question. Kindly clarify ?
I followed strictly the approach used for loading modules here in this example.
This is the only method I know for loading modules. If there is another method please share.
https://royale.apache.org/dividing-an-apache-royale-application-with-modules/<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Froyale.apache.org%2Fdividing-an-apache-royale-application-with-modules%2F&data=04%7C01%7Caharui%40adobe.com%7Ce0c38cc4559641ff0f2108d9d074405d%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637770019992898481%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=c65JOYsEODcatlGZtwlpe7DOQanC%2BdL3zyGSPWgBYS4%3D&reserved=0>
On Fri, 31 Dec 2021, 19:14 Maria Jose Esteve, <mj...@iest.com>> wrote:
@Roman, which branch did you compile the SDK from, ROYALE_INTERFACE_INFO or develop?
Could you pass the Overview.mxml view to the main application? (to rule it out)
Hiedra
De: Roman Isitua <ro...@gmail.com>>
Enviado el: viernes, 31 de diciembre de 2021 17:56
Para: users@royale.apache.org<ma...@royale.apache.org>
Asunto: Re: Compiling Modules (was Re: Load time is very slow)
I have tried tracing where the errors are happening whenever I test the release version
Uncaught TypeError: Ql.valuesImpl.init is not a function
at Hr.Cr.um (Overview.js:846)
at Function.ep.generateMXMLProperties (Overview.js:795)
at Hr.Sp.generateMXMLAttributes (Overview.js:599)
at new Hr (Overview.js:864)
at PN.M.loadHandler (FrontEnd.js:2042)
9Overview.js:173 Uncaught TypeError: this.createElement is not a function
at $B.V (Overview.js:173)
at new $B (FrontEnd.js:2430)
at EP.convert (FrontEnd.js:2430)
at Zy (FrontEnd.js:261)
at HTMLAnchorElement.Uy (FrontEnd.js:121)
at HTMLAnchorElement.Sy.b (FrontEnd.js:117)
The highlighted code in red is declared as follows in the Overview.mxml (maven module)
<j:valuesImpl>
<js:SimpleCSSValuesImpl/>
</j:valuesImpl>
The j:valuesImpl points to the following code in jewel Module.js
/**
* @nocollapse
* @export
* @type {org.apache.royale.core.IValuesImpl}
*/
org.apache.royale.jewel.Module.prototype.valuesImpl;
org.apache.royale.jewel.Module.prototype.set__valuesImpl = function(value) {
org.apache.royale.core.ValuesManager.valuesImpl.init(this);
};
it appears this function is improperly renamed and whenever the app tries to load the module is not able to recognise it as a function.
The same issue of improper function renaming is happening in the second error as well
9Overview.js:173 Uncaught TypeError: this.createElement is not a function
On Thu, Dec 30, 2021 at 10:42 PM Roman Isitua <ro...@gmail.com>> wrote:
I have applied the js compiler option as follows
<additionalCompilerOptions>-source-map=false;-compiler.show-binding-warnings=false;-js-default-initializers=true;-js-dynamic-access-unknown-members=true;
-js-compiler-option=--variable_map_output_file gccvars.txt;-js-compiler-option+=--property_map_output_file gccprops.txt
</additionalCompilerOptions>
I get the same error as before when attempting to launch the jewel module.
Error! Filename not specified.
Same error trace.
Uncaught TypeError: cm.valuesImpl.init is not a function
at Rr.Mr.yl (Overview.js:786)
at Function.iq.generateMXMLProperties (Overview.js:736)
at Rr.hq.generateMXMLAttributes (Overview.js:546)
at new Rr (Overview.js:804)
at LN.J.loadHandler (FrontEnd.js:1967)
FrontEnd.js:1640 Uncaught TypeError: M is not a function
at oM.J.handleMouseOut (FrontEnd.js:1640)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:248)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
FrontEnd.js:1640 Uncaught TypeError: M is not a function
at oM.J.handleMouseOver (FrontEnd.js:1640)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:248)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
FrontEnd.js:1640 Uncaught TypeError: M is not a function
at oM.J.handleMouseOut (FrontEnd.js:1640)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:248)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
FrontEnd.js:1640 Uncaught TypeError: M is not a function
at oM.J.handleMouseOver (FrontEnd.js:1640)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:248)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
FrontEnd.js:1640 Uncaught TypeError: M is not a function
at oM.J.handleMouseOut (FrontEnd.js:1640)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:248)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
FrontEnd.js:1640 Uncaught TypeError: M is not a function
at oM.J.handleMouseOver (FrontEnd.js:1640)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:248)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
FrontEnd.js:1640 Uncaught TypeError: M is not a function
at oM.J.handleMouseOut (FrontEnd.js:1640)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:248)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
3Overview.js:56 Uncaught TypeError: Cannot read properties of undefined (reading 'prototype')
at P (Overview.js:56)
at SG.convert (FrontEnd.js:904)
at ny (FrontEnd.js:248)
at HTMLElement.iy (FrontEnd.js:125)
at HTMLElement.b (FrontEnd.js:121)
On Thu, Dec 30, 2021 at 6:56 PM Harbs <ha...@gmail.com>> wrote:
1. I’d get rid of the agressive minification options. It will likely cause issues. If you get it to work without those options, you can try to add them back in and see if it still works.
2. You seem to be missing the compiler options explained here: https://apache.github.io/royale-docs/features/modules#minification<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapache.github.io%2Froyale-docs%2Ffeatures%2Fmodules%23minification&data=04%7C01%7Caharui%40adobe.com%7Ce0c38cc4559641ff0f2108d9d074405d%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637770019992898481%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=y2M3Q%2F9KMsGdV2gANubdFhMj3uB5rzUgVxJDbF6wYKI%3D&reserved=0>
For a pom, it would look something like this (adjust your paths to match your setup):
Main app:
<additionalCompilerOptions>-source-map=true;-js-compiler-option=--variable_map_output_file gccvars.txt;-js-compiler-option+=--property_map_output_file gccprops.txt</additionalCompilerOptions>
Module:
<additionalCompilerOptions>-source-map=true;-js-compiler-option=--variable_map_input_file ../../../../../MainApp/bin/js-release/gccvars.txt;-js-compiler-option+=--property_map_input_file ../../../../../MainApp/bin/js-release/gccprops.txt</additionalCompilerOptions>
On Dec 30, 2021, at 7:43 PM, Roman Isitua <ro...@gmail.com>> wrote:
I think it will be better for me to share my pom's that way you can see all the compilation options used. The pom for the parent (FmClient2), the MainApp and one module (Overview) have been attached to this email.
On Thu, Dec 30, 2021 at 6:22 PM Harbs <ha...@gmail.com>> wrote:
Roman, can you share your full compiler options?
I decided to remove the below settings completely
-export-public-symbols=false
-prevent-rename-protected-symbols=false
-prevent-rename-public-symbols=false
-prevent-rename-internal-symbols=false
I enabled the below settings
-js-dynamic-access-unknown-members=true;
-js-default-initializers=true
The release version starts up
Hiedra, that’s great!
On Dec 30, 2021, at 7:15 PM, Roman Isitua <ro...@gmail.com>> wrote:
Yes. I am testing with the sdk compiled on branch ROYALE_INTERFACE_INFO
On Thu, Dec 30, 2021 at 6:10 PM Maria Jose Esteve <mj...@iest.com>> wrote:
Roman, are you testing with the SDK compiled from the Harb branches, ROYALE_INTERFACE_INFO, or from develop?
Hiedra
De: Roman Isitua <ro...@gmail.com>>
Enviado el: jueves, 30 de diciembre de 2021 16:52
Para: users@royale.apache.org<ma...@royale.apache.org>
Asunto: Re: Compiling Modules (was Re: Load time is very slow)
I decided to remove the below settings completely
-export-public-symbols=false
-prevent-rename-protected-symbols=false
-prevent-rename-public-symbols=false
-prevent-rename-internal-symbols=false
I enabled the below settings
-js-dynamic-access-unknown-members=true;
-js-default-initializers=true
The release version starts up
<image001.png>
<image002.png>
However, the moment I launch a module. I get the below error
<image003.png>
It appears to be failing when I launch the "Overview" module (by clicking the Overview side menu).
So my current observation is that by retaining only two settings
-js-dynamic-access-unknown-members=true;
-js-default-initializers=true
The release module starts up but the app fails whenever I launch a module.
The smallest size settings in the documentation do not work. The app does not start up.
-export-public-symbols=false
-prevent-rename-protected-symbols=false
-prevent-rename-public-symbols=false
-prevent-rename-internal-symbols=false
The error trace is below
Uncaught TypeError: cm.valuesImpl.init is not a function
at Wr.Rr.pl<https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwr.rr.pl%2F&data=04%7C01%7Caharui%40adobe.com%7Ce0c38cc4559641ff0f2108d9d074405d%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637770019992898481%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=N4Mx5wcKqYMpOWlu5N7IbWeBmPyhbDkM0OAAnOqjZlI%3D&reserved=0> (Overview.js:792)
at Function.mq.generateMXMLProperties (Overview.js:743)
at Wr.lq.generateMXMLAttributes (Overview.js:551)
at new Wr (Overview.js:810)
at QN.J.loadHandler (FrontEnd.js:1978)
3Overview.js:56 Uncaught TypeError: Cannot read properties of undefined (reading 'prototype')
at P (Overview.js:56)
at VG.convert (FrontEnd.js:910)
at ny (FrontEnd.js:250)
at HTMLElement.iy (FrontEnd.js:125)
at HTMLElement.b (FrontEnd.js:121)
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOut (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOver (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOver @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOut (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOut @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOver (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOver @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOut (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOut @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOver (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOver @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOut (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOut @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOver (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOver @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOut (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOut @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
On Thu, Dec 30, 2021 at 4:32 PM Roman Isitua <ro...@gmail.com>> wrote:
I get the same error even when I set the -js-dynamic-access-unknown-members=true;
On Thu, Dec 30, 2021 at 4:24 PM Roman Isitua <ro...@gmail.com>> wrote:
Using the below settings,
-export-public-symbols=false
-prevent-rename-protected-symbols=false
-prevent-rename-public-symbols=false
-prevent-rename-internal-symbols=false
-js-dynamic-access-unknown-members=false;
-js-default-initializers=true
Debug version runs fine. The release version does not start up
<image004.png>
I get the below errors
Uncaught TypeError: Cannot read properties of undefined (reading 'apply')
at KE.hm (FrontEnd.js:1600)
at XE.M.Fb (FrontEnd.js:943)
at XE.M.uh (FrontEnd.js:937)
at FE.M.na<https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Ffe.m.na%2F&data=04%7C01%7Caharui%40adobe.com%7Ce0c38cc4559641ff0f2108d9d074405d%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637770019992898481%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=C0z70EcllmVEEFk21%2FuH%2FhC%2Fz8a8hrB7AuxRyMw%2FXn4%3D&reserved=0> (FrontEnd.js:497)
at FE.M.v (FrontEnd.js:497)
at dR.M.S (FrontEnd.js:213)
at dR.Nz.S (FrontEnd.js:217)
at dR.M.start (FrontEnd.js:1396)
at index.html:45
:8080/favicon.ico:1 Failed to load resource: the server responded with a status of 404 (Not Found)
FrontEnd.js is the start up class for the application. i.e. It implements the Jewel application class.
On Thu, Dec 30, 2021 at 3:19 PM Roman Isitua <ro...@gmail.com>> wrote:
Hi Harb,
Thanks for your response. I have gone through the documentation. I will do my test again starting with the smallest size option and share my findings.
Regards,
On Thu, Dec 30, 2021 at 10:59 AM Harbs <ha...@gmail.com>> wrote:
Sorry for my deal in responding.
Let’s take a step back.
I’m not sure how you are compiling your modules. I just added some content to the module documentation page which explains what compiler options you need while compiling modules. (It still needs some editing.) https://apache.github.io/royale-docs/features/modules#minification<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapache.github.io%2Froyale-docs%2Ffeatures%2Fmodules%23minification&data=04%7C01%7Caharui%40adobe.com%7Ce0c38cc4559641ff0f2108d9d074405d%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637770019992898481%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=y2M3Q%2F9KMsGdV2gANubdFhMj3uB5rzUgVxJDbF6wYKI%3D&reserved=0>
Are you using those options?
On Dec 29, 2021, at 2:19 AM, Maria Jose Esteve <mj...@iest.com>> wrote:
Hi, Let me join you with these tests....
@Harb, I have compiled the SDK from this branch, feature/ROYALE_INTERFACE_INFO, and when running in debug I get this error:
Message on the PURGE CONSOLE is displayed:
Cannot convert org.apache.royale.reflection.beads.ClassAliasBead to IBead
Message in the IDE Window:
Se produjo una excepción: TypeError: Cannot convert [object Object] to IBead
at App.org.apache.royale.core.ElementWrapper.addBead (http://localhost:8080/WNetSuitePlus/org/apache/royale/core/ElementWrapper.js:114:11)
at App.org.apache.royale.core.HTMLElementWrapper.addBead (http://localhost:8080/WNetSuitePlus/org/apache/royale/core/HTMLElementWrapper.js:43:65)
at App.org.apache.royale.jewel.Application.start (http://localhost:8080/WNetSuitePlus/org/apache/royale/jewel/Application.js:246:10)
at App.App_loadXML (http://localhost:8080/WNetSuitePlus/App.js:1681:25)
at org.apache.royale.net.URLLoader.org.apache.royale.events.EventDispatcher.fireListeners (http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:97:23)
at Function.goog.events.EventTarget.dispatchEventInternal_ (http://localhost:8080/WNetSuitePlus/library/closure/goog/events/eventtarget.js:381:26)
at org.apache.royale.net.URLLoader.org.apache.royale.events.EventDispatcher.dispatchEvent (http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:72:37)
at org.apache.royale.net.URLLoader.jsEventHandler (http://localhost:8080/WNetSuitePlus/org/apache/royale/net/URLLoader.js:169:12)
Call stack:
<image003.png>
[INFO] Executing MXMLC in tool group Royale with args: [
-load-config=D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\compile-app-config.xml,
-js-default-initializers=true,
-source-map=true,
-js-dynamic-access-unknown-members=true,
-keep-as3-metadata+=Inject,Dispatcher,EventHandler,Event,PostConstruct,PreDestroy,ViewAdded,ViewRemoved,Bindable,Transient,
-keep-code-with-metadata=Inject,
-show-binding-warnings=false,
-export-public-symbols=false,
-prevent-rename-protected-symbols=false,
-prevent-rename-internal-symbols=false,
-js-output=D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\javascript,
-compiler.targets=JSRoyale,
D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\src\main\royale\App.mxml
The release execution does not change, the error is the same as before (SDK compilation from the develop branch):
Se produjo una excepción: ReferenceError: Error #1065: Variable com.iest.winplusweb.models.MasterConfigSystemModel is not defined.
at yR (http://localhost:8080/WPWebRelease/App.js:3605:1771)
at Mya (http://localhost:8080/WPWebRelease/App.js:3343:365)
at AR.J.usa (http://localhost:8080/WPWebRelease/App.js:434:441)
at GFa.J.fromTypeDefinition (http://localhost:8080/WPWebRelease/App.js:5706:139)
at Function.YT.getTypeDescriptor (http://localhost:8080/WPWebRelease/App.js:4570:820)
at Function.fX.constructBean (http://localhost:8080/WPWebRelease/App.js:2336:472)
at r$.J.initialize (http://localhost:8080/WPWebRelease/App.js:5041:66)
at OW.J.init (http://localhost:8080/WPWebRelease/App.js:950:452)
at OW.J.u (http://localhost:8080/WPWebRelease/App.js:951:454)
at $$.J.addBead (http://localhost:8080/WPWebRelease/App.js:357:549)
The main difference:
project compiled from "SDK-develop" runs fine in js-debug and gives error in js-release and, compiled from "SDK-ROYALE_INTERFACE_INFO" does not launch because of conversion error.
Hiedra
De: Roman Isitua <ro...@gmail.com>>
Enviado el: martes, 28 de diciembre de 2021 15:55
Para: users@royale.apache.org<ma...@royale.apache.org>
Asunto: Re: Load time is very slow
@Harb
I have checked out the feature/ROYALE_INTERFACE_INFO branch and compiled asjs and compiler. I have rebuilt my application with modules in release mode.
I get the following error when I attempt to launch a module
<image001.png>
The module loads fine in debug mode
<image002.png>
Snippets of the log
Overview.js:786 Uncaught TypeError: cm.valuesImpl.init is not a function
at Rr.Mr.yl (Overview.js:786)
at Function.iq.generateMXMLProperties (Overview.js:736)
at Rr.hq.generateMXMLAttributes (Overview.js:546)
at new Rr (Overview.js:804)
at LN.J.loadHandler (FrontEnd.js:1967)
Mr.yl @ Overview.js:786
iq.generateMXMLProperties @ Overview.js:736
hq.generateMXMLAttributes @ Overview.js:546
Rr @ Overview.js:804
J.loadHandler @ FrontEnd.js:1967
load (async)
LN.loadModule @ FrontEnd.js:1965
dN.loadModule @ FrontEnd.js:2406
LD.Un @ FrontEnd.js:1809
ny @ FrontEnd.js:123
ny @ FrontEnd.js:248
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
I have attached the full log to this email.
On Tue, Dec 28, 2021 at 2:51 PM Roman Isitua <ro...@gmail.com>> wrote:
Hi Maria,
Prior to starting this mail discussion "Load time is very slow". I can confirm I have only been compiling in debug mode. My target\javascript\bin\ only had js-debug. It was after I upgraded my royale sdk from 0.9.7 to 0.9.8 that I compiled in release mode.
On Tue, Dec 28, 2021 at 2:24 PM Maria Jose Esteve <mj...@iest.com>> wrote:
Hi, @Roman, I think you are doing a double compile can it be? My times are the same as yours and I always compile in debug and release.
Look at your target folder " target\javascript\bin\" and if you have two folders: js-debug and js-release you are compiling always double.
In my case, the architecture of my project as well as the Maven compilation files (pom.xml) were provided by an external company (we didn't know anything about Maven or Royale at that time) and I understand that this formula was chosen to show us the options we had.
A priori and without doing any test as Harb has done, I think that modularity gives us the advantage of compiling parts of the code once and not compiling them again if they are not modified. So far WITH MY COMPILATION TIMES, sometimes more than 1 minute, this is fundamental. But of course, now we have the problem of minification of the modules and it is really a serious problem because it is impossible for us to deploy in production.
I will try to separate the compiación realese with a profile and if I succeed I will pass it to you @Roman.
@Harb what do you mean by compiling the ROYALE_INTERFACE_INFO branch?
Hiedra
De: Harbs <ha...@gmail.com>>
Enviado el: lunes, 27 de diciembre de 2021 18:32
Para: users@royale.apache.org<ma...@royale.apache.org>
Asunto: Re: Load time is very slow
That doesn’t sound right.
Are you sure you’re compiling debug and not release? That sounds like release build times.
On Dec 27, 2021, at 3:31 PM, Roman Isitua <ro...@gmail.com>> wrote:
Wow ! You are using a workstation with a bleeding edge processor.
I just compiled my app now. It took 44 seconds. (First compilation after ide start up.) Subsequently compilations are usually 19s to 20s.
My application code base is very very small compared to yours. As we continue to add functionality, I expect the compile times to rise.
<MainApp_pom.xml><Overview_pom.xml><fm_client2_pom.xml>
Re: Compiling Modules (was Re: Load time is very slow)
Posted by Alex Harui <ah...@adobe.com>.
I probably won’t have time to really dig into this until the weekend. It is looking like the Closure Compiler gets confused when presented with externs for the same package tree that the module is generating new classes for.
-Alex
From: Roman Isitua <ro...@gmail.com>
Reply-To: "users@royale.apache.org" <us...@royale.apache.org>
Date: Tuesday, January 4, 2022 at 1:57 PM
To: "users@royale.apache.org" <us...@royale.apache.org>
Subject: Re: Compiling Modules (was Re: Load time is very slow)
Okay. I knew I was missing something.
I will test again when the update for load-externs is available.
On Tue, Jan 4, 2022 at 6:02 PM Alex Harui <ah...@adobe.com>> wrote:
Essentially, -externs-report is for the Closure (JS) Compiler. -link-report and -load-externs (one leading ‘-‘) is for the Royale Compiler to tell the Royale Compiler what classes to feed to the Closure Compiler. Both contain the same data (the set of classes used in the main app), just formatted differently and used differently.
The –externs option for the Closure Compiler then tells the Closure Compiler not to look for classes in the set of files it is supposed to minify.
So, you have the right settings for the main app, but for the module, it should be:
-js-compiler-option=--externs extrep.txt; -load-externs linkrep.txt;
However, even that won’t work today, as the Royale Compiler is not handling -load-externs on the JS prep for Closure Compiler. I have some local changes to the compiler that mixes most of it, but am facing issues with how Closure handles package paths. If that can be resolved, then we have a good chance of things working.
-Alex
From: Roman Isitua <ro...@gmail.com>>
Reply-To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Date: Tuesday, January 4, 2022 at 12:39 AM
To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Subject: Re: Compiling Modules (was Re: Load time is very slow)
Thanks for the update.
I attempted the following:
1. In the main application, I use the following setting:
-externs-report=extrep.txt; -link-report=linkrep.txt;
2. In the module I use the following
-js-compiler-option=--externs extrep.txt; -js-compiler-option+=--load-externs linkrep.txt;
The main application compiles successfully, I get a compilation error with the module
"--load-externs" is not a valid option
Sample usage: --compilation_level (-O) VAL --externs VAL --js VAL --js_output_file VAL --warning_level (-W) [QUIET | DEFAULT
| VERBOSE]
Run with --help for all options and details
Internal error: java.lang.NullPointerException com.google.javascript.jscomp.CommandLineRunner.createOptions(CommandLineRunner.java:1809)org.apache.royale.compiler.utils.JSClosureCompilerWrapper$CompilerOptionsParser.getOptions(JSClosureCompilerWrapper.java:529)org.apache.royale.compiler.utils.JSClosureCompilerWrapper.<init>(JSClosureCompilerWrapper.java:77)org.apache.royale.compiler.internal.codegen.mxml.royale.MXMLRoyalePublisher.publish(MXMLRoyalePublisher.java:395)org.apache.royale.compiler.clients.M
I don't think I am using this option correctly.
.....
On Tue, Jan 4, 2022 at 8:44 AM Alex Harui <ah...@adobe.com>> wrote:
I found some time to investigate. The -externs-report option is mostly working correctly, but other compiler changes are needed to try to avoid duplicate code in the module. I might have time to investigate more this coming weekend. It does appear that if we can correctly reference the app’s class from the module that it will work. The Closure Compiler let me compile the module after I externalize and avoid requires on everything in the main app’s externs report and -js link report, but the references in the module have collapsed packages which is either incorrect or aliases need to be created.
However I think this new approach has a better chance of working than trying to match renaming tables.
-Alex
From: Alex Harui <ah...@adobe.com>>
Reply-To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Date: Monday, January 3, 2022 at 2:30 PM
To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Subject: Re: Compiling Modules (was Re: Load time is very slow)
The -externs-report option should be similar to the -link-report option. It takes a filename. The compiler should output the classes used in the JS compile into that file. To use externs, I think you don’t need to prevent renaming in the application as long as public variables are exported. I think you specify -externs-report when compiling the application.
You may also need to output a -link-report from the application as well.
I think you then specify the externs-report file as an -externs for the -js-compiler-options when compiling the module. And maybe also specify the -link-report output as a -load-externs in the same way it was used when compiling Flex modules. The goal for the module is, like Flex, to not have any classes in the module that exist in the main app. Then it doesn’t matter about class renaming within the release-mode JS file.
HTH,
-Alex
From: Roman Isitua <ro...@gmail.com>>
Reply-To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Date: Monday, January 3, 2022 at 12:37 PM
To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Subject: Re: Compiling Modules (was Re: Load time is very slow)
I can confirm that classes are being renamed in both files.
I have attempted your suggestion i.e. removing variable maps and property maps then use
-externs-report;-export-public-symbols=true;-prevent-rename-public-symbols=true;
I get the below error
command line Error: configuration variable 'externs-report' expected 1 argument(s), got 0.
I cannot find any documentation on how to use the -externs-report argument. What does it do ? and what are the acceptable values ?
Regards,
On Sun, Jan 2, 2022 at 9:06 AM Alex Harui <ah...@adobe.com>> wrote:
Hi Roman,
It might be more complicated. The settings are probably doing something since you reported that the error occurred in the app vs the module depending on the settings.
I went back and looked at the original module example in examples/royale/ModuleExample and was surprised there weren’t more compiler settings. I thought we’d found a way to externalize the main app’s code for the module. Because if both the app and module have a copy of SimpleCSSValuesImpl or any other class that both JS files use, there could be issues as to which one gets loaded (maybe both) and what export aliases are pointing to. Sounds like changing settings affected whether the aliases pointed at module code vs app code.
I thought we were using similar settings to what we used for SWF where the module would not contain a copy of SimpleCSSValuesImpl so it would use the one loaded by the main app, but I didn’t see those settings. We might need to make that work because otherwise I think static initializations won’t do the right thing. Or maybe we’ve figured out that it is simpler just to write defensive code that doesn’t get broken. But also, if the module has its own copy of code already loaded by the main app, that’s sort of a waste of bytes. Maybe there was a minification issue with not having the module link in classes already linked into the main app. I see an -externs-report option in the compiler but the example doesn’t seem to use it.
You should be able to scan the JS files and see if a class is in both module and app and if it is getting renamed.
I don’t know if I will have time to investigate further. The currently recommended options for modules involving variable maps and property maps may need to be abandoned in favor of externs and preventing renames.
-Alex
From: Roman Isitua <ro...@gmail.com>>
Reply-To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Date: Saturday, January 1, 2022 at 3:02 AM
To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Subject: Re: Compiling Modules (was Re: Load time is very slow)
Alex, thank you for your detailed analysis of the error log.
I agree with you that the best strategy is to prevent renaming of public/exports used by the module. I have tried different options to prevent renaming
It appears none of them stops this. From my observation, it appears that this default options below
-export-public-symbols=true;-prevent-rename-public-symbols=true;-prevent-rename-public-instance-accessors=true;
Only seem to affect the main application (main module) but have no effect on the other modules even though I ensured they were applied in their respective module pom. I came to this conclusion when I decided to turn set -prevent-rename-public-symbols=false
I noticed that I got the same error but this time around in the main module.
Uncaught TypeError: this.rb[(intermediate value).Kd(...)] is not a function
at HN.iI.send (FrontEnd.js:970)
at nI.EH.Ea (FrontEnd.js:880)
at ON.q6 (FrontEnd.js:1815)
at TN.L2 (FrontEnd.js:2034)
at hF.Xf (FrontEnd.js:2063)
at lF.kb (FrontEnd.js:1233)
at lF.Vf (FrontEnd.js:1224)
at cF.O (FrontEnd.js:659)
at cF.M.w (FrontEnd.js:661)
at gQ.mA.M (FrontEnd.js:241)
FrontEnd.js maps to FrontEnd.as in my application and is the entry point of the application. This confirms that -prevent-rename-public-symbols=false has
an effect on the main module but no effect on other modules even though they were applied in the respective module pom's.
Maybe there are other options I am overlooking.
On Sat, Jan 1, 2022 at 9:31 AM Alex Harui <ah...@adobe.com>> wrote:
In case it helps, the minification (variable renaming) mechanism is essentially guaranteed to cause problems in modules. The Closure Compiler basically takes variables, sees if it is worth renaming it, then gives it the name ‘a’, then ‘b’, and so-on, (it skips a few letters, IIRC), then moves on to ‘aa’, and ‘ab’, etc. The odds that the compiler will encounter the same variables in the same order when compiling an app and one or more modules is close to zero.
I did some work to try to dump the mapping of the renamed variables in the main app and use that when compiling the modules. It was working for a while, then some code was added to the framework that started fooling the Closure Compiler. I spent some time trying to fix the Closure Compiler, but ran out of time. Meanwhile, Josh was adding more control over renaming so I moved on to other things.
IMO, the best strategy to take would be to try to control what gets renamed. All public/exports from the app that are used by the module should not be renamed. That will definitely make the app and modules bigger, but unless the Closure Compiler folks become interested in runtime-loaded modules, it is challenging for the Royale compiler to allow aggressive renaming.
I think what is going on with the exceptions below is that exporting doesn’t really prevent renaming. It only sets up an externally-visible alias to a renamed variable. Especially for static members. So it isn’t sufficient to export public variables, the code within the module must not let the Closure Compiler think that the intra-module references can be renamed, in this case, from SimpleCSSValuesImpl to QI
I don’t know the renaming options we’ve added to the Royale Compiler, so I don’t know if there is an option to control that. I think there is a way to convince the Closure Compiler to not rename SimpleCSSValuesImpl because I’ve seen other class names not get renamed.
HTH,
-Alex
From: Roman Isitua <ro...@gmail.com>>
Reply-To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Date: Friday, December 31, 2021 at 10:42 AM
To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Subject: Re: Compiling Modules (was Re: Load time is very slow)
I have tested on both. The error log is the same.
I don't understand your second question. Kindly clarify ?
I followed strictly the approach used for loading modules here in this example.
This is the only method I know for loading modules. If there is another method please share.
https://royale.apache.org/dividing-an-apache-royale-application-with-modules/<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Froyale.apache.org%2Fdividing-an-apache-royale-application-with-modules%2F&data=04%7C01%7Caharui%40adobe.com%7C9ef16179c43641ea345308d9cfcd29ec%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637769302364592812%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=1mi5vTAa9rLPlHdXNe3jmV6rN8UPeITnBcHokoI47kc%3D&reserved=0>
On Fri, 31 Dec 2021, 19:14 Maria Jose Esteve, <mj...@iest.com>> wrote:
@Roman, which branch did you compile the SDK from, ROYALE_INTERFACE_INFO or develop?
Could you pass the Overview.mxml view to the main application? (to rule it out)
Hiedra
De: Roman Isitua <ro...@gmail.com>>
Enviado el: viernes, 31 de diciembre de 2021 17:56
Para: users@royale.apache.org<ma...@royale.apache.org>
Asunto: Re: Compiling Modules (was Re: Load time is very slow)
I have tried tracing where the errors are happening whenever I test the release version
Uncaught TypeError: Ql.valuesImpl.init is not a function
at Hr.Cr.um (Overview.js:846)
at Function.ep.generateMXMLProperties (Overview.js:795)
at Hr.Sp.generateMXMLAttributes (Overview.js:599)
at new Hr (Overview.js:864)
at PN.M.loadHandler (FrontEnd.js:2042)
9Overview.js:173 Uncaught TypeError: this.createElement is not a function
at $B.V (Overview.js:173)
at new $B (FrontEnd.js:2430)
at EP.convert (FrontEnd.js:2430)
at Zy (FrontEnd.js:261)
at HTMLAnchorElement.Uy (FrontEnd.js:121)
at HTMLAnchorElement.Sy.b (FrontEnd.js:117)
The highlighted code in red is declared as follows in the Overview.mxml (maven module)
<j:valuesImpl>
<js:SimpleCSSValuesImpl/>
</j:valuesImpl>
The j:valuesImpl points to the following code in jewel Module.js
/**
* @nocollapse
* @export
* @type {org.apache.royale.core.IValuesImpl}
*/
org.apache.royale.jewel.Module.prototype.valuesImpl;
org.apache.royale.jewel.Module.prototype.set__valuesImpl = function(value) {
org.apache.royale.core.ValuesManager.valuesImpl.init(this);
};
it appears this function is improperly renamed and whenever the app tries to load the module is not able to recognise it as a function.
The same issue of improper function renaming is happening in the second error as well
9Overview.js:173 Uncaught TypeError: this.createElement is not a function
On Thu, Dec 30, 2021 at 10:42 PM Roman Isitua <ro...@gmail.com>> wrote:
I have applied the js compiler option as follows
<additionalCompilerOptions>-source-map=false;-compiler.show-binding-warnings=false;-js-default-initializers=true;-js-dynamic-access-unknown-members=true;
-js-compiler-option=--variable_map_output_file gccvars.txt;-js-compiler-option+=--property_map_output_file gccprops.txt
</additionalCompilerOptions>
I get the same error as before when attempting to launch the jewel module.
Error! Filename not specified.
Same error trace.
Uncaught TypeError: cm.valuesImpl.init is not a function
at Rr.Mr.yl (Overview.js:786)
at Function.iq.generateMXMLProperties (Overview.js:736)
at Rr.hq.generateMXMLAttributes (Overview.js:546)
at new Rr (Overview.js:804)
at LN.J.loadHandler (FrontEnd.js:1967)
FrontEnd.js:1640 Uncaught TypeError: M is not a function
at oM.J.handleMouseOut (FrontEnd.js:1640)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:248)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
FrontEnd.js:1640 Uncaught TypeError: M is not a function
at oM.J.handleMouseOver (FrontEnd.js:1640)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:248)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
FrontEnd.js:1640 Uncaught TypeError: M is not a function
at oM.J.handleMouseOut (FrontEnd.js:1640)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:248)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
FrontEnd.js:1640 Uncaught TypeError: M is not a function
at oM.J.handleMouseOver (FrontEnd.js:1640)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:248)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
FrontEnd.js:1640 Uncaught TypeError: M is not a function
at oM.J.handleMouseOut (FrontEnd.js:1640)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:248)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
FrontEnd.js:1640 Uncaught TypeError: M is not a function
at oM.J.handleMouseOver (FrontEnd.js:1640)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:248)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
FrontEnd.js:1640 Uncaught TypeError: M is not a function
at oM.J.handleMouseOut (FrontEnd.js:1640)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:248)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
3Overview.js:56 Uncaught TypeError: Cannot read properties of undefined (reading 'prototype')
at P (Overview.js:56)
at SG.convert (FrontEnd.js:904)
at ny (FrontEnd.js:248)
at HTMLElement.iy (FrontEnd.js:125)
at HTMLElement.b (FrontEnd.js:121)
On Thu, Dec 30, 2021 at 6:56 PM Harbs <ha...@gmail.com>> wrote:
1. I’d get rid of the agressive minification options. It will likely cause issues. If you get it to work without those options, you can try to add them back in and see if it still works.
2. You seem to be missing the compiler options explained here: https://apache.github.io/royale-docs/features/modules#minification<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapache.github.io%2Froyale-docs%2Ffeatures%2Fmodules%23minification&data=04%7C01%7Caharui%40adobe.com%7C9ef16179c43641ea345308d9cfcd29ec%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637769302364592812%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=tbeieWfRry4Z14zATzgOp%2F71CAEwhsoCQW6uMer70uQ%3D&reserved=0>
For a pom, it would look something like this (adjust your paths to match your setup):
Main app:
<additionalCompilerOptions>-source-map=true;-js-compiler-option=--variable_map_output_file gccvars.txt;-js-compiler-option+=--property_map_output_file gccprops.txt</additionalCompilerOptions>
Module:
<additionalCompilerOptions>-source-map=true;-js-compiler-option=--variable_map_input_file ../../../../../MainApp/bin/js-release/gccvars.txt;-js-compiler-option+=--property_map_input_file ../../../../../MainApp/bin/js-release/gccprops.txt</additionalCompilerOptions>
On Dec 30, 2021, at 7:43 PM, Roman Isitua <ro...@gmail.com>> wrote:
I think it will be better for me to share my pom's that way you can see all the compilation options used. The pom for the parent (FmClient2), the MainApp and one module (Overview) have been attached to this email.
On Thu, Dec 30, 2021 at 6:22 PM Harbs <ha...@gmail.com>> wrote:
Roman, can you share your full compiler options?
I decided to remove the below settings completely
-export-public-symbols=false
-prevent-rename-protected-symbols=false
-prevent-rename-public-symbols=false
-prevent-rename-internal-symbols=false
I enabled the below settings
-js-dynamic-access-unknown-members=true;
-js-default-initializers=true
The release version starts up
Hiedra, that’s great!
On Dec 30, 2021, at 7:15 PM, Roman Isitua <ro...@gmail.com>> wrote:
Yes. I am testing with the sdk compiled on branch ROYALE_INTERFACE_INFO
On Thu, Dec 30, 2021 at 6:10 PM Maria Jose Esteve <mj...@iest.com>> wrote:
Roman, are you testing with the SDK compiled from the Harb branches, ROYALE_INTERFACE_INFO, or from develop?
Hiedra
De: Roman Isitua <ro...@gmail.com>>
Enviado el: jueves, 30 de diciembre de 2021 16:52
Para: users@royale.apache.org<ma...@royale.apache.org>
Asunto: Re: Compiling Modules (was Re: Load time is very slow)
I decided to remove the below settings completely
-export-public-symbols=false
-prevent-rename-protected-symbols=false
-prevent-rename-public-symbols=false
-prevent-rename-internal-symbols=false
I enabled the below settings
-js-dynamic-access-unknown-members=true;
-js-default-initializers=true
The release version starts up
<image001.png>
<image002.png>
However, the moment I launch a module. I get the below error
<image003.png>
It appears to be failing when I launch the "Overview" module (by clicking the Overview side menu).
So my current observation is that by retaining only two settings
-js-dynamic-access-unknown-members=true;
-js-default-initializers=true
The release module starts up but the app fails whenever I launch a module.
The smallest size settings in the documentation do not work. The app does not start up.
-export-public-symbols=false
-prevent-rename-protected-symbols=false
-prevent-rename-public-symbols=false
-prevent-rename-internal-symbols=false
The error trace is below
Uncaught TypeError: cm.valuesImpl.init is not a function
at Wr.Rr.pl<https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwr.rr.pl%2F&data=04%7C01%7Caharui%40adobe.com%7C9ef16179c43641ea345308d9cfcd29ec%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637769302364592812%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=9ANe2delECHEfAK48LJeaiZcU3Qs2albIbcuzVX7WK8%3D&reserved=0> (Overview.js:792)
at Function.mq.generateMXMLProperties (Overview.js:743)
at Wr.lq.generateMXMLAttributes (Overview.js:551)
at new Wr (Overview.js:810)
at QN.J.loadHandler (FrontEnd.js:1978)
3Overview.js:56 Uncaught TypeError: Cannot read properties of undefined (reading 'prototype')
at P (Overview.js:56)
at VG.convert (FrontEnd.js:910)
at ny (FrontEnd.js:250)
at HTMLElement.iy (FrontEnd.js:125)
at HTMLElement.b (FrontEnd.js:121)
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOut (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOver (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOver @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOut (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOut @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOver (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOver @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOut (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOut @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOver (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOver @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOut (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOut @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOver (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOver @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOut (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOut @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
On Thu, Dec 30, 2021 at 4:32 PM Roman Isitua <ro...@gmail.com>> wrote:
I get the same error even when I set the -js-dynamic-access-unknown-members=true;
On Thu, Dec 30, 2021 at 4:24 PM Roman Isitua <ro...@gmail.com>> wrote:
Using the below settings,
-export-public-symbols=false
-prevent-rename-protected-symbols=false
-prevent-rename-public-symbols=false
-prevent-rename-internal-symbols=false
-js-dynamic-access-unknown-members=false;
-js-default-initializers=true
Debug version runs fine. The release version does not start up
<image004.png>
I get the below errors
Uncaught TypeError: Cannot read properties of undefined (reading 'apply')
at KE.hm (FrontEnd.js:1600)
at XE.M.Fb (FrontEnd.js:943)
at XE.M.uh (FrontEnd.js:937)
at FE.M.na<https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Ffe.m.na%2F&data=04%7C01%7Caharui%40adobe.com%7C9ef16179c43641ea345308d9cfcd29ec%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637769302364592812%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=1sfkCoK4TIWcNreS%2Fw7U6WSOmnVWT40Mp%2FyYBpGWS7A%3D&reserved=0> (FrontEnd.js:497)
at FE.M.v (FrontEnd.js:497)
at dR.M.S (FrontEnd.js:213)
at dR.Nz.S (FrontEnd.js:217)
at dR.M.start (FrontEnd.js:1396)
at index.html:45
:8080/favicon.ico:1 Failed to load resource: the server responded with a status of 404 (Not Found)
FrontEnd.js is the start up class for the application. i.e. It implements the Jewel application class.
On Thu, Dec 30, 2021 at 3:19 PM Roman Isitua <ro...@gmail.com>> wrote:
Hi Harb,
Thanks for your response. I have gone through the documentation. I will do my test again starting with the smallest size option and share my findings.
Regards,
On Thu, Dec 30, 2021 at 10:59 AM Harbs <ha...@gmail.com>> wrote:
Sorry for my deal in responding.
Let’s take a step back.
I’m not sure how you are compiling your modules. I just added some content to the module documentation page which explains what compiler options you need while compiling modules. (It still needs some editing.) https://apache.github.io/royale-docs/features/modules#minification<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapache.github.io%2Froyale-docs%2Ffeatures%2Fmodules%23minification&data=04%7C01%7Caharui%40adobe.com%7C9ef16179c43641ea345308d9cfcd29ec%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637769302364592812%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=tbeieWfRry4Z14zATzgOp%2F71CAEwhsoCQW6uMer70uQ%3D&reserved=0>
Are you using those options?
On Dec 29, 2021, at 2:19 AM, Maria Jose Esteve <mj...@iest.com>> wrote:
Hi, Let me join you with these tests....
@Harb, I have compiled the SDK from this branch, feature/ROYALE_INTERFACE_INFO, and when running in debug I get this error:
Message on the PURGE CONSOLE is displayed:
Cannot convert org.apache.royale.reflection.beads.ClassAliasBead to IBead
Message in the IDE Window:
Se produjo una excepción: TypeError: Cannot convert [object Object] to IBead
at App.org.apache.royale.core.ElementWrapper.addBead (http://localhost:8080/WNetSuitePlus/org/apache/royale/core/ElementWrapper.js:114:11)
at App.org.apache.royale.core.HTMLElementWrapper.addBead (http://localhost:8080/WNetSuitePlus/org/apache/royale/core/HTMLElementWrapper.js:43:65)
at App.org.apache.royale.jewel.Application.start (http://localhost:8080/WNetSuitePlus/org/apache/royale/jewel/Application.js:246:10)
at App.App_loadXML (http://localhost:8080/WNetSuitePlus/App.js:1681:25)
at org.apache.royale.net.URLLoader.org.apache.royale.events.EventDispatcher.fireListeners (http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:97:23)
at Function.goog.events.EventTarget.dispatchEventInternal_ (http://localhost:8080/WNetSuitePlus/library/closure/goog/events/eventtarget.js:381:26)
at org.apache.royale.net.URLLoader.org.apache.royale.events.EventDispatcher.dispatchEvent (http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:72:37)
at org.apache.royale.net.URLLoader.jsEventHandler (http://localhost:8080/WNetSuitePlus/org/apache/royale/net/URLLoader.js:169:12)
Call stack:
<image003.png>
[INFO] Executing MXMLC in tool group Royale with args: [
-load-config=D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\compile-app-config.xml,
-js-default-initializers=true,
-source-map=true,
-js-dynamic-access-unknown-members=true,
-keep-as3-metadata+=Inject,Dispatcher,EventHandler,Event,PostConstruct,PreDestroy,ViewAdded,ViewRemoved,Bindable,Transient,
-keep-code-with-metadata=Inject,
-show-binding-warnings=false,
-export-public-symbols=false,
-prevent-rename-protected-symbols=false,
-prevent-rename-internal-symbols=false,
-js-output=D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\javascript,
-compiler.targets=JSRoyale,
D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\src\main\royale\App.mxml
The release execution does not change, the error is the same as before (SDK compilation from the develop branch):
Se produjo una excepción: ReferenceError: Error #1065: Variable com.iest.winplusweb.models.MasterConfigSystemModel is not defined.
at yR (http://localhost:8080/WPWebRelease/App.js:3605:1771)
at Mya (http://localhost:8080/WPWebRelease/App.js:3343:365)
at AR.J.usa (http://localhost:8080/WPWebRelease/App.js:434:441)
at GFa.J.fromTypeDefinition (http://localhost:8080/WPWebRelease/App.js:5706:139)
at Function.YT.getTypeDescriptor (http://localhost:8080/WPWebRelease/App.js:4570:820)
at Function.fX.constructBean (http://localhost:8080/WPWebRelease/App.js:2336:472)
at r$.J.initialize (http://localhost:8080/WPWebRelease/App.js:5041:66)
at OW.J.init (http://localhost:8080/WPWebRelease/App.js:950:452)
at OW.J.u (http://localhost:8080/WPWebRelease/App.js:951:454)
at $$.J.addBead (http://localhost:8080/WPWebRelease/App.js:357:549)
The main difference:
project compiled from "SDK-develop" runs fine in js-debug and gives error in js-release and, compiled from "SDK-ROYALE_INTERFACE_INFO" does not launch because of conversion error.
Hiedra
De: Roman Isitua <ro...@gmail.com>>
Enviado el: martes, 28 de diciembre de 2021 15:55
Para: users@royale.apache.org<ma...@royale.apache.org>
Asunto: Re: Load time is very slow
@Harb
I have checked out the feature/ROYALE_INTERFACE_INFO branch and compiled asjs and compiler. I have rebuilt my application with modules in release mode.
I get the following error when I attempt to launch a module
<image001.png>
The module loads fine in debug mode
<image002.png>
Snippets of the log
Overview.js:786 Uncaught TypeError: cm.valuesImpl.init is not a function
at Rr.Mr.yl (Overview.js:786)
at Function.iq.generateMXMLProperties (Overview.js:736)
at Rr.hq.generateMXMLAttributes (Overview.js:546)
at new Rr (Overview.js:804)
at LN.J.loadHandler (FrontEnd.js:1967)
Mr.yl @ Overview.js:786
iq.generateMXMLProperties @ Overview.js:736
hq.generateMXMLAttributes @ Overview.js:546
Rr @ Overview.js:804
J.loadHandler @ FrontEnd.js:1967
load (async)
LN.loadModule @ FrontEnd.js:1965
dN.loadModule @ FrontEnd.js:2406
LD.Un @ FrontEnd.js:1809
ny @ FrontEnd.js:123
ny @ FrontEnd.js:248
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
I have attached the full log to this email.
On Tue, Dec 28, 2021 at 2:51 PM Roman Isitua <ro...@gmail.com>> wrote:
Hi Maria,
Prior to starting this mail discussion "Load time is very slow". I can confirm I have only been compiling in debug mode. My target\javascript\bin\ only had js-debug. It was after I upgraded my royale sdk from 0.9.7 to 0.9.8 that I compiled in release mode.
On Tue, Dec 28, 2021 at 2:24 PM Maria Jose Esteve <mj...@iest.com>> wrote:
Hi, @Roman, I think you are doing a double compile can it be? My times are the same as yours and I always compile in debug and release.
Look at your target folder " target\javascript\bin\" and if you have two folders: js-debug and js-release you are compiling always double.
In my case, the architecture of my project as well as the Maven compilation files (pom.xml) were provided by an external company (we didn't know anything about Maven or Royale at that time) and I understand that this formula was chosen to show us the options we had.
A priori and without doing any test as Harb has done, I think that modularity gives us the advantage of compiling parts of the code once and not compiling them again if they are not modified. So far WITH MY COMPILATION TIMES, sometimes more than 1 minute, this is fundamental. But of course, now we have the problem of minification of the modules and it is really a serious problem because it is impossible for us to deploy in production.
I will try to separate the compiación realese with a profile and if I succeed I will pass it to you @Roman.
@Harb what do you mean by compiling the ROYALE_INTERFACE_INFO branch?
Hiedra
De: Harbs <ha...@gmail.com>>
Enviado el: lunes, 27 de diciembre de 2021 18:32
Para: users@royale.apache.org<ma...@royale.apache.org>
Asunto: Re: Load time is very slow
That doesn’t sound right.
Are you sure you’re compiling debug and not release? That sounds like release build times.
On Dec 27, 2021, at 3:31 PM, Roman Isitua <ro...@gmail.com>> wrote:
Wow ! You are using a workstation with a bleeding edge processor.
I just compiled my app now. It took 44 seconds. (First compilation after ide start up.) Subsequently compilations are usually 19s to 20s.
My application code base is very very small compared to yours. As we continue to add functionality, I expect the compile times to rise.
<MainApp_pom.xml><Overview_pom.xml><fm_client2_pom.xml>
Re: Compiling Modules (was Re: Load time is very slow)
Posted by Roman Isitua <ro...@gmail.com>.
Okay. I knew I was missing something.
I will test again when the update for load-externs is available.
On Tue, Jan 4, 2022 at 6:02 PM Alex Harui <ah...@adobe.com> wrote:
> Essentially, -externs-report is for the Closure (JS) Compiler.
> -link-report and -load-externs (one leading ‘-‘) is for the Royale Compiler
> to tell the Royale Compiler what classes to feed to the Closure Compiler.
> Both contain the same data (the set of classes used in the main app), just
> formatted differently and used differently.
>
>
>
> The –externs option for the Closure Compiler then tells the Closure
> Compiler not to look for classes in the set of files it is supposed to
> minify.
>
>
>
> So, you have the right settings for the main app, but for the module, it
> should be:
>
> *-js-compiler-option=--externs extrep.txt; -load-externs linkrep.txt;*
>
>
>
> However, even that won’t work today, as the Royale Compiler is not
> handling -load-externs on the JS prep for Closure Compiler. I have some
> local changes to the compiler that mixes most of it, but am facing issues
> with how Closure handles package paths. If that can be resolved, then we
> have a good chance of things working.
>
>
>
> -Alex
>
>
>
> *From: *Roman Isitua <ro...@gmail.com>
> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Date: *Tuesday, January 4, 2022 at 12:39 AM
> *To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Subject: *Re: Compiling Modules (was Re: Load time is very slow)
>
>
>
> Thanks for the update.
>
>
>
> I attempted the following:
>
>
>
> 1. In the main application, I use the following setting:
>
> *-externs-report=extrep.txt; -link-report=linkrep.txt;*
>
>
>
> 2. In the module I use the following
>
>
>
> *-js-compiler-option=--externs extrep.txt;
> -js-compiler-option+=--load-externs linkrep.txt;*
>
>
>
> The main application compiles successfully, I get a compilation error with
> the module
>
>
>
> "--load-externs" is not a valid option
> Sample usage: --compilation_level (-O) VAL --externs VAL --js VAL
> --js_output_file VAL --warning_level (-W) [QUIET | DEFAULT
> | VERBOSE]
> Run with --help for all options and details
> Internal error: java.lang.NullPointerException
> com.google.javascript.jscomp.CommandLineRunner.createOptions(CommandLineRunner.java:1809)org.apache.royale.compiler.utils.JSClosureCompilerWrapper$CompilerOptionsParser.getOptions(JSClosureCompilerWrapper.java:529)org.apache.royale.compiler.utils.JSClosureCompilerWrapper.<init>(JSClosureCompilerWrapper.java:77)org.apache.royale.compiler.internal.codegen.mxml.royale.MXMLRoyalePublisher.publish(MXMLRoyalePublisher.java:395)org.apache.royale.compiler.clients.M
>
>
>
>
>
>
>
> I don't think I am using this option correctly.
>
>
>
>
>
>
>
> .....
>
>
>
> On Tue, Jan 4, 2022 at 8:44 AM Alex Harui <ah...@adobe.com> wrote:
>
> I found some time to investigate. The -externs-report option is mostly
> working correctly, but other compiler changes are needed to try to avoid
> duplicate code in the module. I might have time to investigate more this
> coming weekend. It does appear that if we can correctly reference the
> app’s class from the module that it will work. The Closure Compiler let me
> compile the module after I externalize and avoid requires on everything in
> the main app’s externs report and -js link report, but the references in
> the module have collapsed packages which is either incorrect or aliases
> need to be created.
>
>
>
> However I think this new approach has a better chance of working than
> trying to match renaming tables.
>
>
>
> -Alex
>
>
>
> *From: *Alex Harui <ah...@adobe.com>
> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Date: *Monday, January 3, 2022 at 2:30 PM
> *To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Subject: *Re: Compiling Modules (was Re: Load time is very slow)
>
>
>
> The -externs-report option should be similar to the -link-report option.
> It takes a filename. The compiler should output the classes used in the JS
> compile into that file. To use externs, I think you don’t need to prevent
> renaming in the application as long as public variables are exported. I
> think you specify -externs-report when compiling the application.
>
>
>
> You may also need to output a -link-report from the application as well.
>
>
>
> I think you then specify the externs-report file as an -externs for the
> -js-compiler-options when compiling the module. And maybe also specify the
> -link-report output as a -load-externs in the same way it was used when
> compiling Flex modules. The goal for the module is, like Flex, to not have
> any classes in the module that exist in the main app. Then it doesn’t
> matter about class renaming within the release-mode JS file.
>
>
>
> HTH,
>
> -Alex
>
>
>
> *From: *Roman Isitua <ro...@gmail.com>
> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Date: *Monday, January 3, 2022 at 12:37 PM
> *To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Subject: *Re: Compiling Modules (was Re: Load time is very slow)
>
>
>
>
>
> I can confirm that classes are being renamed in both files.
>
>
>
> I have attempted your suggestion i.e. removing variable maps and property
> maps then use
>
> -externs-report;-export-public-symbols=true;-prevent-rename-public-symbols=true;
>
>
>
>
> I get the below error
>
>
>
> command line Error: configuration variable 'externs-report' expected 1
> argument(s), got 0.
>
>
>
> I cannot find any documentation on how to use the -externs-report
> argument. What does it do ? and what are the acceptable values ?
>
>
>
> Regards,
>
>
>
>
>
> On Sun, Jan 2, 2022 at 9:06 AM Alex Harui <ah...@adobe.com> wrote:
>
> Hi Roman,
>
>
>
> It might be more complicated. The settings are probably doing something
> since you reported that the error occurred in the app vs the module
> depending on the settings.
>
>
>
> I went back and looked at the original module example in
> examples/royale/ModuleExample and was surprised there weren’t more compiler
> settings. I thought we’d found a way to externalize the main app’s code
> for the module. Because if both the app and module have a copy of
> SimpleCSSValuesImpl or any other class that both JS files use, there could
> be issues as to which one gets loaded (maybe both) and what export aliases
> are pointing to. Sounds like changing settings affected whether the
> aliases pointed at module code vs app code.
>
>
>
> I thought we were using similar settings to what we used for SWF where the
> module would not contain a copy of SimpleCSSValuesImpl so it would use the
> one loaded by the main app, but I didn’t see those settings. We might need
> to make that work because otherwise I think static initializations won’t do
> the right thing. Or maybe we’ve figured out that it is simpler just to
> write defensive code that doesn’t get broken. But also, if the module has
> its own copy of code already loaded by the main app, that’s sort of a waste
> of bytes. Maybe there was a minification issue with not having the module
> link in classes already linked into the main app. I see an -externs-report
> option in the compiler but the example doesn’t seem to use it.
>
>
>
> You should be able to scan the JS files and see if a class is in both
> module and app and if it is getting renamed.
>
>
>
> I don’t know if I will have time to investigate further. The currently
> recommended options for modules involving variable maps and property maps
> may need to be abandoned in favor of externs and preventing renames.
>
>
>
> -Alex
>
>
>
>
>
> *From: *Roman Isitua <ro...@gmail.com>
> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Date: *Saturday, January 1, 2022 at 3:02 AM
> *To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Subject: *Re: Compiling Modules (was Re: Load time is very slow)
>
>
>
> Alex, thank you for your detailed analysis of the error log.
>
>
>
> I agree with you that the best strategy is to prevent renaming of
> public/exports used by the module. I have tried different options to
> prevent renaming
>
> It appears none of them stops this. From my observation, it appears that
> this default options below
>
>
>
>
> -export-public-symbols=true;-prevent-rename-public-symbols=true;-prevent-rename-public-instance-accessors=true;
>
>
>
> Only seem to affect the main application (main module) but have no effect
> on the other modules even though I ensured they were applied in
> their respective module pom. I came to this conclusion when I decided to
> turn set -prevent-rename-public-symbols=false
>
>
>
> I noticed that I got the same error but this time around in the main
> module.
>
>
>
> Uncaught TypeError: this.rb[(intermediate value).Kd(...)] is not a function
> at HN.iI.send (FrontEnd.js:970)
> at nI.EH.Ea (FrontEnd.js:880)
> at ON.q6 (FrontEnd.js:1815)
> at TN.L2 (FrontEnd.js:2034)
> at hF.Xf (FrontEnd.js:2063)
> at lF.kb (FrontEnd.js:1233)
> at lF.Vf (FrontEnd.js:1224)
> at cF.O (FrontEnd.js:659)
> at cF.M.w (FrontEnd.js:661)
> at gQ.mA.M (FrontEnd.js:241)
>
>
>
> FrontEnd.js maps to FrontEnd.as in my application and is the entry point
> of the application. This confirms that -prevent-rename-public-symbols=false
> has
>
> an effect on the main module but no effect on other modules even though
> they were applied in the respective module pom's.
>
>
>
> Maybe there are other options I am overlooking.
>
>
>
> On Sat, Jan 1, 2022 at 9:31 AM Alex Harui <ah...@adobe.com> wrote:
>
> In case it helps, the minification (variable renaming) mechanism is
> essentially guaranteed to cause problems in modules. The Closure Compiler
> basically takes variables, sees if it is worth renaming it, then gives it
> the name ‘a’, then ‘b’, and so-on, (it skips a few letters, IIRC), then
> moves on to ‘aa’, and ‘ab’, etc. The odds that the compiler will encounter
> the same variables in the same order when compiling an app and one or more
> modules is close to zero.
>
>
>
> I did some work to try to dump the mapping of the renamed variables in the
> main app and use that when compiling the modules. It was working for a
> while, then some code was added to the framework that started fooling the
> Closure Compiler. I spent some time trying to fix the Closure Compiler,
> but ran out of time. Meanwhile, Josh was adding more control over renaming
> so I moved on to other things.
>
>
>
> IMO, the best strategy to take would be to try to control what gets
> renamed. All public/exports from the app that are used by the module
> should not be renamed. That will definitely make the app and modules
> bigger, but unless the Closure Compiler folks become interested in
> runtime-loaded modules, it is challenging for the Royale compiler to allow
> aggressive renaming.
>
>
>
> I think what is going on with the exceptions below is that exporting
> doesn’t really prevent renaming. It only sets up an externally-visible
> alias to a renamed variable. Especially for static members. So it isn’t
> sufficient to export public variables, the code within the module must not
> let the Closure Compiler think that the intra-module references can be
> renamed, in this case, from SimpleCSSValuesImpl to QI
>
>
>
> I don’t know the renaming options we’ve added to the Royale Compiler, so I
> don’t know if there is an option to control that. I think there is a way
> to convince the Closure Compiler to not rename SimpleCSSValuesImpl because
> I’ve seen other class names not get renamed.
>
>
>
> HTH,
>
> -Alex
>
>
>
> *From: *Roman Isitua <ro...@gmail.com>
> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Date: *Friday, December 31, 2021 at 10:42 AM
> *To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Subject: *Re: Compiling Modules (was Re: Load time is very slow)
>
>
>
> I have tested on both. The error log is the same.
>
>
>
> I don't understand your second question. Kindly clarify ?
>
>
>
>
>
> I followed strictly the approach used for loading modules here in this
> example.
>
> This is the only method I know for loading modules. If there is another
> method please share.
>
>
>
>
>
>
> https://royale.apache.org/dividing-an-apache-royale-application-with-modules/
> <https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Froyale.apache.org%2Fdividing-an-apache-royale-application-with-modules%2F&data=04%7C01%7Caharui%40adobe.com%7Ce6e97a72825c47f3cb7408d9cf5dc8e8%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637768823995426307%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=%2FPFnXurq9b33O%2FKKK97kgWf7BIyw36bCqDifUwta%2Bto%3D&reserved=0>
>
>
>
> On Fri, 31 Dec 2021, 19:14 Maria Jose Esteve, <mj...@iest.com> wrote:
>
> @Roman, which branch did you compile the SDK from, ROYALE_INTERFACE_INFO
> or develop?
>
> Could you pass the Overview.mxml view to the main application? (to rule
> it out)
>
>
>
> Hiedra
>
>
>
> *De:* Roman Isitua <ro...@gmail.com>
> *Enviado el:* viernes, 31 de diciembre de 2021 17:56
> *Para:* users@royale.apache.org
> *Asunto:* Re: Compiling Modules (was Re: Load time is very slow)
>
>
>
> I have tried tracing where the errors are happening whenever I test the
> release version
>
> Uncaught TypeError: Ql.valuesImpl.init is not a function
> at Hr.Cr.um (Overview.js:846)
> at Function.ep.generateMXMLProperties (Overview.js:795)
> at Hr.Sp.generateMXMLAttributes (Overview.js:599)
> at new Hr (Overview.js:864)
> at PN.M.loadHandler (FrontEnd.js:2042)
> 9Overview.js:173 Uncaught TypeError: this.createElement is not a function
> at $B.V (Overview.js:173)
> at new $B (FrontEnd.js:2430)
> at EP.convert (FrontEnd.js:2430)
> at Zy (FrontEnd.js:261)
> at HTMLAnchorElement.Uy (FrontEnd.js:121)
> at HTMLAnchorElement.Sy.b (FrontEnd.js:117)
>
>
>
>
>
> The highlighted code in red is declared as follows in the Overview.mxml
> (maven module)
>
>
>
> <j:valuesImpl>
>
> <js:SimpleCSSValuesImpl/>
>
> </j:valuesImpl>
>
>
>
> The j:valuesImpl points to the following code in jewel Module.js
>
>
>
> /**
> * @nocollapse
> * @export
> * @type {org.apache.royale.core.IValuesImpl}
> */
> org.apache.royale.jewel.Module.prototype.valuesImpl;
>
>
> org.apache.royale.jewel.Module.prototype.set__valuesImpl = function(value)
> {
> org.apache.royale.core.ValuesManager.valuesImpl.init(this);
> };
>
>
>
>
>
> it appears this function is improperly renamed and whenever the app tries
> to load the module is not able to recognise it as a function.
>
>
>
> The same issue of improper function renaming is happening in the second
> error as well
>
>
>
> 9Overview.js:173 Uncaught TypeError: this.createElement is not a function
>
>
>
>
>
> On Thu, Dec 30, 2021 at 10:42 PM Roman Isitua <ro...@gmail.com>
> wrote:
>
>
>
> I have applied the js compiler option as follows
>
>
>
>
> <additionalCompilerOptions>-source-map=false;-compiler.show-binding-warnings=false;-js-default-initializers=true;-js-dynamic-access-unknown-members=true;
> -js-compiler-option=--variable_map_output_file
> gccvars.txt;-js-compiler-option+=--property_map_output_file gccprops.txt
> </additionalCompilerOptions>
>
>
>
>
>
> I get the same error as before when attempting to launch the jewel module.
>
>
>
> *Error! Filename not specified.*
>
>
>
>
>
> Same error trace.
>
>
>
> Uncaught TypeError: cm.valuesImpl.init is not a function
> at Rr.Mr.yl (Overview.js:786)
> at Function.iq.generateMXMLProperties (Overview.js:736)
> at Rr.hq.generateMXMLAttributes (Overview.js:546)
> at new Rr (Overview.js:804)
> at LN.J.loadHandler (FrontEnd.js:1967)
> FrontEnd.js:1640 Uncaught TypeError: M is not a function
> at oM.J.handleMouseOut (FrontEnd.js:1640)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:248)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> FrontEnd.js:1640 Uncaught TypeError: M is not a function
> at oM.J.handleMouseOver (FrontEnd.js:1640)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:248)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> FrontEnd.js:1640 Uncaught TypeError: M is not a function
> at oM.J.handleMouseOut (FrontEnd.js:1640)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:248)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> FrontEnd.js:1640 Uncaught TypeError: M is not a function
> at oM.J.handleMouseOver (FrontEnd.js:1640)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:248)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> FrontEnd.js:1640 Uncaught TypeError: M is not a function
> at oM.J.handleMouseOut (FrontEnd.js:1640)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:248)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> FrontEnd.js:1640 Uncaught TypeError: M is not a function
> at oM.J.handleMouseOver (FrontEnd.js:1640)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:248)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> FrontEnd.js:1640 Uncaught TypeError: M is not a function
> at oM.J.handleMouseOut (FrontEnd.js:1640)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:248)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> 3Overview.js:56 Uncaught TypeError: Cannot read properties of undefined
> (reading 'prototype')
> at P (Overview.js:56)
> at SG.convert (FrontEnd.js:904)
> at ny (FrontEnd.js:248)
> at HTMLElement.iy (FrontEnd.js:125)
> at HTMLElement.b (FrontEnd.js:121)
>
>
>
> On Thu, Dec 30, 2021 at 6:56 PM Harbs <ha...@gmail.com> wrote:
>
> 1. I’d get rid of the agressive minification options. It will likely cause
> issues. If you get it to work without those options, you can try to add
> them back in and see if it still works.
>
> 2. You seem to be missing the compiler options explained here:
> https://apache.github.io/royale-docs/features/modules#minification
> <https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapache.github.io%2Froyale-docs%2Ffeatures%2Fmodules%23minification&data=04%7C01%7Caharui%40adobe.com%7Ce6e97a72825c47f3cb7408d9cf5dc8e8%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637768823995426307%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=mJ8hkJKoDX34n8LC3dpENGqf8KObR%2Bn1Gpm1LtBcFeU%3D&reserved=0>
>
>
>
> For a pom, it would look something like this (adjust your paths to match
> your setup):
>
>
>
> Main app:
>
> <additionalCompilerOptions>-source-map=true;-js-compiler-option=--variable_map_output_file
> gccvars.txt;-js-compiler-option+=--property_map_output_file
> gccprops.txt</additionalCompilerOptions>
>
>
>
> Module:
>
> <additionalCompilerOptions>-source-map=true;-js-compiler-option=--variable_map_input_file
> ../../../../../MainApp/bin/js-release/gccvars.txt;-js-compiler-option+=--property_map_input_file
> ../../../../../MainApp/bin/js-release/gccprops.txt</additionalCompilerOptions>
>
>
>
> On Dec 30, 2021, at 7:43 PM, Roman Isitua <ro...@gmail.com> wrote:
>
>
>
> I think it will be better for me to share my pom's that way you can see
> all the compilation options used. The pom for the parent (FmClient2), the
> MainApp and one module (Overview) have been attached to this email.
>
>
>
>
>
> On Thu, Dec 30, 2021 at 6:22 PM Harbs <ha...@gmail.com> wrote:
>
> Roman, can you share your full compiler options?
>
>
>
> I decided to remove the below settings completely
> -export-public-symbols=false
> -prevent-rename-protected-symbols=false
> -prevent-rename-public-symbols=false
> -prevent-rename-internal-symbols=false
>
>
> I enabled the below settings
>
> -js-dynamic-access-unknown-members=true;
> -js-default-initializers=true
>
>
> The release version starts up
>
>
>
> Hiedra, that’s great!
>
>
>
> On Dec 30, 2021, at 7:15 PM, Roman Isitua <ro...@gmail.com> wrote:
>
>
>
>
>
> Yes. I am testing with the sdk compiled on branch ROYALE_INTERFACE_INFO
>
>
>
> On Thu, Dec 30, 2021 at 6:10 PM Maria Jose Esteve <mj...@iest.com>
> wrote:
>
> Roman, are you testing with the SDK compiled from the Harb branches,
> ROYALE_INTERFACE_INFO, or from develop?
>
>
>
> Hiedra
>
>
>
> *De:* Roman Isitua <ro...@gmail.com>
> *Enviado el:* jueves, 30 de diciembre de 2021 16:52
> *Para:* users@royale.apache.org
> *Asunto:* Re: Compiling Modules (was Re: Load time is very slow)
>
>
>
> I decided to remove the below settings completely
> -export-public-symbols=false
> -prevent-rename-protected-symbols=false
> -prevent-rename-public-symbols=false
> -prevent-rename-internal-symbols=false
>
>
> I enabled the below settings
>
> -js-dynamic-access-unknown-members=true;
> -js-default-initializers=true
>
>
> The release version starts up
>
>
>
>
>
>
>
> <image001.png>
>
>
>
>
>
> <image002.png>
>
>
>
> However, the moment I launch a module. I get the below error
>
>
>
> <image003.png>
>
>
>
>
>
> It appears to be failing when I launch the "*Overview*" module
> (by clicking the Overview side menu).
>
>
>
> So my current observation is that by retaining only two settings
>
>
>
> -js-dynamic-access-unknown-members=true;
> -js-default-initializers=true
>
>
>
> The release module starts up but the app fails whenever I launch a module.
>
>
>
> The smallest size settings in the documentation do not work. The app does
> not start up.
>
>
>
> -export-public-symbols=false
> -prevent-rename-protected-symbols=false
> -prevent-rename-public-symbols=false
> -prevent-rename-internal-symbols=false
>
>
>
>
>
>
>
> The error trace is below
>
>
>
>
>
> Uncaught TypeError: cm.valuesImpl.init is not a function
> at Wr.Rr.pl
> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwr.rr.pl%2F&data=04%7C01%7Caharui%40adobe.com%7Ce6e97a72825c47f3cb7408d9cf5dc8e8%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637768823995426307%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=LiGI53vuAFViSnH7BzWC8CjfC%2ByEivVwhCNHGkXecK0%3D&reserved=0>
> (Overview.js:792)
> at Function.mq.generateMXMLProperties (Overview.js:743)
> at Wr.lq.generateMXMLAttributes (Overview.js:551)
> at new Wr (Overview.js:810)
> at QN.J.loadHandler (FrontEnd.js:1978)
> 3Overview.js:56 Uncaught TypeError: Cannot read properties of undefined
> (reading 'prototype')
> at P (Overview.js:56)
> at VG.convert (FrontEnd.js:910)
> at ny (FrontEnd.js:250)
> at HTMLElement.iy (FrontEnd.js:125)
> at HTMLElement.b (FrontEnd.js:121)
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOut (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOver (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOver @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOut (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOut @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOver (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOver @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOut (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOut @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOver (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOver @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOut (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOut @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOver (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOver @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOut (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOut @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
>
>
>
> On Thu, Dec 30, 2021 at 4:32 PM Roman Isitua <ro...@gmail.com>
> wrote:
>
> I get the same error even when I set
> the -js-dynamic-access-unknown-members=true;
>
>
>
> On Thu, Dec 30, 2021 at 4:24 PM Roman Isitua <ro...@gmail.com>
> wrote:
>
>
>
> Using the below settings,
>
> -export-public-symbols=false
> -prevent-rename-protected-symbols=false
> -prevent-rename-public-symbols=false
> -prevent-rename-internal-symbols=false
> -js-dynamic-access-unknown-members=false;
>
> -js-default-initializers=true
>
>
> Debug version runs fine. The release version does not start up
>
> <image004.png>
>
>
> I get the below errors
>
> Uncaught TypeError: Cannot read properties of undefined (reading 'apply')
> at KE.hm (FrontEnd.js:1600)
> at XE.M.Fb (FrontEnd.js:943)
> at XE.M.uh (FrontEnd.js:937)
> at FE.M.na
> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Ffe.m.na%2F&data=04%7C01%7Caharui%40adobe.com%7Ce6e97a72825c47f3cb7408d9cf5dc8e8%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637768823995426307%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=tcMMByIOq69n4rop77jZJxdxDsEStDOp%2FcSfu%2BCqpKc%3D&reserved=0>
> (FrontEnd.js:497)
> at FE.M.v (FrontEnd.js:497)
> at dR.M.S (FrontEnd.js:213)
> at dR.Nz.S (FrontEnd.js:217)
> at dR.M.start (FrontEnd.js:1396)
> at index.html:45
> :8080/favicon.ico:1 Failed to load resource: the server responded with a
> status of 404 (Not Found)
>
>
>
>
>
> FrontEnd.js is the start up class for the application. i.e. It implements
> the Jewel application class.
>
>
>
>
>
>
>
> On Thu, Dec 30, 2021 at 3:19 PM Roman Isitua <ro...@gmail.com>
> wrote:
>
> Hi Harb,
>
>
>
> Thanks for your response. I have gone through the documentation. I will do
> my test again starting with the smallest size option and share my findings.
>
>
>
> Regards,
>
>
>
> On Thu, Dec 30, 2021 at 10:59 AM Harbs <ha...@gmail.com> wrote:
>
> Sorry for my deal in responding.
>
>
>
> Let’s take a step back.
>
>
>
> I’m not sure how you are compiling your modules. I just added some content
> to the module documentation page which explains what compiler options you
> need while compiling modules. (It still needs some editing.)
> https://apache.github.io/royale-docs/features/modules#minification
> <https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapache.github.io%2Froyale-docs%2Ffeatures%2Fmodules%23minification&data=04%7C01%7Caharui%40adobe.com%7Ce6e97a72825c47f3cb7408d9cf5dc8e8%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637768823995426307%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=mJ8hkJKoDX34n8LC3dpENGqf8KObR%2Bn1Gpm1LtBcFeU%3D&reserved=0>
>
>
>
> Are you using those options?
>
>
>
> On Dec 29, 2021, at 2:19 AM, Maria Jose Esteve <mj...@iest.com> wrote:
>
>
>
> Hi, Let me join you with these tests....
>
>
>
> @Harb, I have compiled the SDK from this branch, feature/ROYALE_INTERFACE_INFO,
> and when running in debug I get this error:
>
>
>
> Message on the PURGE CONSOLE is displayed:
>
>
>
> Cannot convert org.apache.royale.reflection.beads.ClassAliasBead to IBead
>
>
>
> Message in the IDE Window:
>
>
>
> Se produjo una excepción: TypeError: Cannot convert [object Object] to
> IBead
>
> at App.org.apache.royale.core.ElementWrapper.addBead (
> http://localhost:8080/WNetSuitePlus/org/apache/royale/core/ElementWrapper.js:114:11
> )
>
> at App.org.apache.royale.core.HTMLElementWrapper.addBead (
> http://localhost:8080/WNetSuitePlus/org/apache/royale/core/HTMLElementWrapper.js:43:65
> )
>
> at App.org.apache.royale.jewel.Application.start (
> http://localhost:8080/WNetSuitePlus/org/apache/royale/jewel/Application.js:246:10
> )
>
> at App.App_loadXML (http://localhost:8080/WNetSuitePlus/App.js:1681:25
> )
>
> at
> org.apache.royale.net.URLLoader.org.apache.royale.events.EventDispatcher.fireListeners
> (
> http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:97:23
> )
>
> at Function.goog.events.EventTarget.dispatchEventInternal_ (
> http://localhost:8080/WNetSuitePlus/library/closure/goog/events/eventtarget.js:381:26
> )
>
> at
> org.apache.royale.net.URLLoader.org.apache.royale.events.EventDispatcher.dispatchEvent
> (
> http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:72:37
> )
>
> at org.apache.royale.net.URLLoader.jsEventHandler (
> http://localhost:8080/WNetSuitePlus/org/apache/royale/net/URLLoader.js:169:12
> )
>
>
>
> Call stack:
>
>
>
> <image003.png>
>
>
>
> [INFO] Executing MXMLC in tool group Royale with args: [
>
>
> -load-config=D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\compile-app-config.xml,
>
> -js-default-initializers=true,
>
> -source-map=true,
>
> -js-dynamic-access-unknown-members=true,
>
>
> -keep-as3-metadata+=Inject,Dispatcher,EventHandler,Event,PostConstruct,PreDestroy,ViewAdded,ViewRemoved,Bindable,Transient,
>
> -keep-code-with-metadata=Inject,
>
> -show-binding-warnings=false,
>
> -export-public-symbols=false,
>
> -prevent-rename-protected-symbols=false,
>
> -prevent-rename-internal-symbols=false,
>
>
> -js-output=D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\javascript,
>
> -compiler.targets=JSRoyale,
>
>
> D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\src\main\royale\App.mxml
>
>
>
>
>
> The release execution does not change, the error is the same as before
> (SDK compilation from the develop branch):
>
>
>
> Se produjo una excepción: ReferenceError: Error #1065: Variable
> com.iest.winplusweb.models.MasterConfigSystemModel is not defined.
>
> at yR (http://localhost:8080/WPWebRelease/App.js:3605:1771)
>
> at Mya (http://localhost:8080/WPWebRelease/App.js:3343:365)
>
> at AR.J.usa (http://localhost:8080/WPWebRelease/App.js:434:441)
>
> at GFa.J.fromTypeDefinition (
> http://localhost:8080/WPWebRelease/App.js:5706:139)
>
> at Function.YT.getTypeDescriptor (
> http://localhost:8080/WPWebRelease/App.js:4570:820)
>
> at Function.fX.constructBean (
> http://localhost:8080/WPWebRelease/App.js:2336:472)
>
> at r$.J.initialize (http://localhost:8080/WPWebRelease/App.js:5041:66)
>
> at OW.J.init (http://localhost:8080/WPWebRelease/App.js:950:452)
>
> at OW.J.u (http://localhost:8080/WPWebRelease/App.js:951:454)
>
> at $$.J.addBead (http://localhost:8080/WPWebRelease/App.js:357:549)
>
>
>
> The main difference:
>
> project compiled from "SDK-develop" runs fine in js-debug and gives error
> in js-release and, compiled from "SDK-ROYALE_INTERFACE_INFO" does not
> launch because of conversion error.
>
>
>
> Hiedra
>
>
>
> *De:* Roman Isitua <ro...@gmail.com>
> *Enviado el:* martes, 28 de diciembre de 2021 15:55
> *Para:* users@royale.apache.org
> *Asunto:* Re: Load time is very slow
>
>
>
> @Harb
>
>
>
> I have checked out the feature/ROYALE_INTERFACE_INFO branch and compiled
> asjs and compiler. I have rebuilt my application with modules in release
> mode.
>
>
>
> I get the following error when I attempt to launch a module
>
>
>
>
>
> <image001.png>
>
>
>
>
>
> The module loads fine in debug mode
>
>
>
> <image002.png>
>
>
>
>
>
> Snippets of the log
>
>
>
> Overview.js:786 Uncaught TypeError: cm.valuesImpl.init is not a function
> at Rr.Mr.yl (Overview.js:786)
> at Function.iq.generateMXMLProperties (Overview.js:736)
> at Rr.hq.generateMXMLAttributes (Overview.js:546)
> at new Rr (Overview.js:804)
> at LN.J.loadHandler (FrontEnd.js:1967)
> Mr.yl @ Overview.js:786
> iq.generateMXMLProperties @ Overview.js:736
> hq.generateMXMLAttributes @ Overview.js:546
> Rr @ Overview.js:804
> J.loadHandler @ FrontEnd.js:1967
> load (async)
> LN.loadModule @ FrontEnd.js:1965
> dN.loadModule @ FrontEnd.js:2406
> LD.Un @ FrontEnd.js:1809
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:248
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
>
>
>
>
>
> I have attached the full log to this email.
>
>
>
>
>
>
>
>
>
> On Tue, Dec 28, 2021 at 2:51 PM Roman Isitua <ro...@gmail.com>
> wrote:
>
> Hi Maria,
>
>
>
> Prior to starting this mail discussion "Load time is very slow". I can
> confirm I have only been compiling in debug mode. My target\javascript\bin\
> only had js-debug. It was after I upgraded my royale sdk from 0.9.7 to
> 0.9.8 that I compiled in release mode.
>
>
>
>
>
>
>
> On Tue, Dec 28, 2021 at 2:24 PM Maria Jose Esteve <mj...@iest.com>
> wrote:
>
> Hi, @Roman, I think you are doing a double compile can it be? My times are
> the same as yours and I always compile in debug and release.
>
>
>
> Look at your target folder " target\javascript\bin\" and if you have two
> folders: js-debug and js-release you are compiling always double.
>
>
>
> In my case, the architecture of my project as well as the Maven
> compilation files (pom.xml) were provided by an external company (we didn't
> know anything about Maven or Royale at that time) and I understand that
> this formula was chosen to show us the options we had.
>
>
>
> A priori and without doing any test as Harb has done, I think that
> modularity gives us the advantage of compiling parts of the code once and
> not compiling them again if they are not modified. So far WITH MY
> COMPILATION TIMES, sometimes more than 1 minute, this is fundamental. But
> of course, now we have the problem of minification of the modules and it is
> really a serious problem because it is impossible for us to deploy in
> production.
>
>
>
> I will try to separate the compiación realese with a profile and if I
> succeed I will pass it to you @Roman.
>
>
>
> @Harb what do you mean by compiling the ROYALE_INTERFACE_INFO branch?
>
>
>
> Hiedra
>
>
>
> *De:* Harbs <ha...@gmail.com>
> *Enviado el:* lunes, 27 de diciembre de 2021 18:32
> *Para:* users@royale.apache.org
> *Asunto:* Re: Load time is very slow
>
>
>
> That doesn’t sound right.
>
>
>
> Are you sure you’re compiling debug and not release? That sounds like
> release build times.
>
>
>
> On Dec 27, 2021, at 3:31 PM, Roman Isitua <ro...@gmail.com> wrote:
>
>
>
> Wow ! You are using a workstation with a bleeding edge processor.
>
>
>
> I just compiled my app now. It took 44 seconds. (First compilation after
> ide start up.) Subsequently compilations are usually 19s to 20s.
>
>
>
> My application code base is very very small compared to yours. As we
> continue to add functionality, I expect the compile times to rise.
>
>
>
>
>
>
>
>
>
> <MainApp_pom.xml><Overview_pom.xml><fm_client2_pom.xml>
>
>
>
>
Re: Compiling Modules (was Re: Load time is very slow)
Posted by Alex Harui <ah...@adobe.com>.
Essentially, -externs-report is for the Closure (JS) Compiler. -link-report and -load-externs (one leading ‘-‘) is for the Royale Compiler to tell the Royale Compiler what classes to feed to the Closure Compiler. Both contain the same data (the set of classes used in the main app), just formatted differently and used differently.
The –externs option for the Closure Compiler then tells the Closure Compiler not to look for classes in the set of files it is supposed to minify.
So, you have the right settings for the main app, but for the module, it should be:
-js-compiler-option=--externs extrep.txt; -load-externs linkrep.txt;
However, even that won’t work today, as the Royale Compiler is not handling -load-externs on the JS prep for Closure Compiler. I have some local changes to the compiler that mixes most of it, but am facing issues with how Closure handles package paths. If that can be resolved, then we have a good chance of things working.
-Alex
From: Roman Isitua <ro...@gmail.com>
Reply-To: "users@royale.apache.org" <us...@royale.apache.org>
Date: Tuesday, January 4, 2022 at 12:39 AM
To: "users@royale.apache.org" <us...@royale.apache.org>
Subject: Re: Compiling Modules (was Re: Load time is very slow)
Thanks for the update.
I attempted the following:
1. In the main application, I use the following setting:
-externs-report=extrep.txt; -link-report=linkrep.txt;
2. In the module I use the following
-js-compiler-option=--externs extrep.txt; -js-compiler-option+=--load-externs linkrep.txt;
The main application compiles successfully, I get a compilation error with the module
"--load-externs" is not a valid option
Sample usage: --compilation_level (-O) VAL --externs VAL --js VAL --js_output_file VAL --warning_level (-W) [QUIET | DEFAULT
| VERBOSE]
Run with --help for all options and details
Internal error: java.lang.NullPointerException com.google.javascript.jscomp.CommandLineRunner.createOptions(CommandLineRunner.java:1809)org.apache.royale.compiler.utils.JSClosureCompilerWrapper$CompilerOptionsParser.getOptions(JSClosureCompilerWrapper.java:529)org.apache.royale.compiler.utils.JSClosureCompilerWrapper.<init>(JSClosureCompilerWrapper.java:77)org.apache.royale.compiler.internal.codegen.mxml.royale.MXMLRoyalePublisher.publish(MXMLRoyalePublisher.java:395)org.apache.royale.compiler.clients.M
I don't think I am using this option correctly.
.....
On Tue, Jan 4, 2022 at 8:44 AM Alex Harui <ah...@adobe.com>> wrote:
I found some time to investigate. The -externs-report option is mostly working correctly, but other compiler changes are needed to try to avoid duplicate code in the module. I might have time to investigate more this coming weekend. It does appear that if we can correctly reference the app’s class from the module that it will work. The Closure Compiler let me compile the module after I externalize and avoid requires on everything in the main app’s externs report and -js link report, but the references in the module have collapsed packages which is either incorrect or aliases need to be created.
However I think this new approach has a better chance of working than trying to match renaming tables.
-Alex
From: Alex Harui <ah...@adobe.com>>
Reply-To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Date: Monday, January 3, 2022 at 2:30 PM
To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Subject: Re: Compiling Modules (was Re: Load time is very slow)
The -externs-report option should be similar to the -link-report option. It takes a filename. The compiler should output the classes used in the JS compile into that file. To use externs, I think you don’t need to prevent renaming in the application as long as public variables are exported. I think you specify -externs-report when compiling the application.
You may also need to output a -link-report from the application as well.
I think you then specify the externs-report file as an -externs for the -js-compiler-options when compiling the module. And maybe also specify the -link-report output as a -load-externs in the same way it was used when compiling Flex modules. The goal for the module is, like Flex, to not have any classes in the module that exist in the main app. Then it doesn’t matter about class renaming within the release-mode JS file.
HTH,
-Alex
From: Roman Isitua <ro...@gmail.com>>
Reply-To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Date: Monday, January 3, 2022 at 12:37 PM
To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Subject: Re: Compiling Modules (was Re: Load time is very slow)
I can confirm that classes are being renamed in both files.
I have attempted your suggestion i.e. removing variable maps and property maps then use
-externs-report;-export-public-symbols=true;-prevent-rename-public-symbols=true;
I get the below error
command line Error: configuration variable 'externs-report' expected 1 argument(s), got 0.
I cannot find any documentation on how to use the -externs-report argument. What does it do ? and what are the acceptable values ?
Regards,
On Sun, Jan 2, 2022 at 9:06 AM Alex Harui <ah...@adobe.com>> wrote:
Hi Roman,
It might be more complicated. The settings are probably doing something since you reported that the error occurred in the app vs the module depending on the settings.
I went back and looked at the original module example in examples/royale/ModuleExample and was surprised there weren’t more compiler settings. I thought we’d found a way to externalize the main app’s code for the module. Because if both the app and module have a copy of SimpleCSSValuesImpl or any other class that both JS files use, there could be issues as to which one gets loaded (maybe both) and what export aliases are pointing to. Sounds like changing settings affected whether the aliases pointed at module code vs app code.
I thought we were using similar settings to what we used for SWF where the module would not contain a copy of SimpleCSSValuesImpl so it would use the one loaded by the main app, but I didn’t see those settings. We might need to make that work because otherwise I think static initializations won’t do the right thing. Or maybe we’ve figured out that it is simpler just to write defensive code that doesn’t get broken. But also, if the module has its own copy of code already loaded by the main app, that’s sort of a waste of bytes. Maybe there was a minification issue with not having the module link in classes already linked into the main app. I see an -externs-report option in the compiler but the example doesn’t seem to use it.
You should be able to scan the JS files and see if a class is in both module and app and if it is getting renamed.
I don’t know if I will have time to investigate further. The currently recommended options for modules involving variable maps and property maps may need to be abandoned in favor of externs and preventing renames.
-Alex
From: Roman Isitua <ro...@gmail.com>>
Reply-To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Date: Saturday, January 1, 2022 at 3:02 AM
To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Subject: Re: Compiling Modules (was Re: Load time is very slow)
Alex, thank you for your detailed analysis of the error log.
I agree with you that the best strategy is to prevent renaming of public/exports used by the module. I have tried different options to prevent renaming
It appears none of them stops this. From my observation, it appears that this default options below
-export-public-symbols=true;-prevent-rename-public-symbols=true;-prevent-rename-public-instance-accessors=true;
Only seem to affect the main application (main module) but have no effect on the other modules even though I ensured they were applied in their respective module pom. I came to this conclusion when I decided to turn set -prevent-rename-public-symbols=false
I noticed that I got the same error but this time around in the main module.
Uncaught TypeError: this.rb[(intermediate value).Kd(...)] is not a function
at HN.iI.send (FrontEnd.js:970)
at nI.EH.Ea (FrontEnd.js:880)
at ON.q6 (FrontEnd.js:1815)
at TN.L2 (FrontEnd.js:2034)
at hF.Xf (FrontEnd.js:2063)
at lF.kb (FrontEnd.js:1233)
at lF.Vf (FrontEnd.js:1224)
at cF.O (FrontEnd.js:659)
at cF.M.w (FrontEnd.js:661)
at gQ.mA.M (FrontEnd.js:241)
FrontEnd.js maps to FrontEnd.as in my application and is the entry point of the application. This confirms that -prevent-rename-public-symbols=false has
an effect on the main module but no effect on other modules even though they were applied in the respective module pom's.
Maybe there are other options I am overlooking.
On Sat, Jan 1, 2022 at 9:31 AM Alex Harui <ah...@adobe.com>> wrote:
In case it helps, the minification (variable renaming) mechanism is essentially guaranteed to cause problems in modules. The Closure Compiler basically takes variables, sees if it is worth renaming it, then gives it the name ‘a’, then ‘b’, and so-on, (it skips a few letters, IIRC), then moves on to ‘aa’, and ‘ab’, etc. The odds that the compiler will encounter the same variables in the same order when compiling an app and one or more modules is close to zero.
I did some work to try to dump the mapping of the renamed variables in the main app and use that when compiling the modules. It was working for a while, then some code was added to the framework that started fooling the Closure Compiler. I spent some time trying to fix the Closure Compiler, but ran out of time. Meanwhile, Josh was adding more control over renaming so I moved on to other things.
IMO, the best strategy to take would be to try to control what gets renamed. All public/exports from the app that are used by the module should not be renamed. That will definitely make the app and modules bigger, but unless the Closure Compiler folks become interested in runtime-loaded modules, it is challenging for the Royale compiler to allow aggressive renaming.
I think what is going on with the exceptions below is that exporting doesn’t really prevent renaming. It only sets up an externally-visible alias to a renamed variable. Especially for static members. So it isn’t sufficient to export public variables, the code within the module must not let the Closure Compiler think that the intra-module references can be renamed, in this case, from SimpleCSSValuesImpl to QI
I don’t know the renaming options we’ve added to the Royale Compiler, so I don’t know if there is an option to control that. I think there is a way to convince the Closure Compiler to not rename SimpleCSSValuesImpl because I’ve seen other class names not get renamed.
HTH,
-Alex
From: Roman Isitua <ro...@gmail.com>>
Reply-To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Date: Friday, December 31, 2021 at 10:42 AM
To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Subject: Re: Compiling Modules (was Re: Load time is very slow)
I have tested on both. The error log is the same.
I don't understand your second question. Kindly clarify ?
I followed strictly the approach used for loading modules here in this example.
This is the only method I know for loading modules. If there is another method please share.
https://royale.apache.org/dividing-an-apache-royale-application-with-modules/<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Froyale.apache.org%2Fdividing-an-apache-royale-application-with-modules%2F&data=04%7C01%7Caharui%40adobe.com%7Ce6e97a72825c47f3cb7408d9cf5dc8e8%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637768823995426307%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=%2FPFnXurq9b33O%2FKKK97kgWf7BIyw36bCqDifUwta%2Bto%3D&reserved=0>
On Fri, 31 Dec 2021, 19:14 Maria Jose Esteve, <mj...@iest.com>> wrote:
@Roman, which branch did you compile the SDK from, ROYALE_INTERFACE_INFO or develop?
Could you pass the Overview.mxml view to the main application? (to rule it out)
Hiedra
De: Roman Isitua <ro...@gmail.com>>
Enviado el: viernes, 31 de diciembre de 2021 17:56
Para: users@royale.apache.org<ma...@royale.apache.org>
Asunto: Re: Compiling Modules (was Re: Load time is very slow)
I have tried tracing where the errors are happening whenever I test the release version
Uncaught TypeError: Ql.valuesImpl.init is not a function
at Hr.Cr.um (Overview.js:846)
at Function.ep.generateMXMLProperties (Overview.js:795)
at Hr.Sp.generateMXMLAttributes (Overview.js:599)
at new Hr (Overview.js:864)
at PN.M.loadHandler (FrontEnd.js:2042)
9Overview.js:173 Uncaught TypeError: this.createElement is not a function
at $B.V (Overview.js:173)
at new $B (FrontEnd.js:2430)
at EP.convert (FrontEnd.js:2430)
at Zy (FrontEnd.js:261)
at HTMLAnchorElement.Uy (FrontEnd.js:121)
at HTMLAnchorElement.Sy.b (FrontEnd.js:117)
The highlighted code in red is declared as follows in the Overview.mxml (maven module)
<j:valuesImpl>
<js:SimpleCSSValuesImpl/>
</j:valuesImpl>
The j:valuesImpl points to the following code in jewel Module.js
/**
* @nocollapse
* @export
* @type {org.apache.royale.core.IValuesImpl}
*/
org.apache.royale.jewel.Module.prototype.valuesImpl;
org.apache.royale.jewel.Module.prototype.set__valuesImpl = function(value) {
org.apache.royale.core.ValuesManager.valuesImpl.init(this);
};
it appears this function is improperly renamed and whenever the app tries to load the module is not able to recognise it as a function.
The same issue of improper function renaming is happening in the second error as well
9Overview.js:173 Uncaught TypeError: this.createElement is not a function
On Thu, Dec 30, 2021 at 10:42 PM Roman Isitua <ro...@gmail.com>> wrote:
I have applied the js compiler option as follows
<additionalCompilerOptions>-source-map=false;-compiler.show-binding-warnings=false;-js-default-initializers=true;-js-dynamic-access-unknown-members=true;
-js-compiler-option=--variable_map_output_file gccvars.txt;-js-compiler-option+=--property_map_output_file gccprops.txt
</additionalCompilerOptions>
I get the same error as before when attempting to launch the jewel module.
Error! Filename not specified.
Same error trace.
Uncaught TypeError: cm.valuesImpl.init is not a function
at Rr.Mr.yl (Overview.js:786)
at Function.iq.generateMXMLProperties (Overview.js:736)
at Rr.hq.generateMXMLAttributes (Overview.js:546)
at new Rr (Overview.js:804)
at LN.J.loadHandler (FrontEnd.js:1967)
FrontEnd.js:1640 Uncaught TypeError: M is not a function
at oM.J.handleMouseOut (FrontEnd.js:1640)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:248)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
FrontEnd.js:1640 Uncaught TypeError: M is not a function
at oM.J.handleMouseOver (FrontEnd.js:1640)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:248)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
FrontEnd.js:1640 Uncaught TypeError: M is not a function
at oM.J.handleMouseOut (FrontEnd.js:1640)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:248)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
FrontEnd.js:1640 Uncaught TypeError: M is not a function
at oM.J.handleMouseOver (FrontEnd.js:1640)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:248)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
FrontEnd.js:1640 Uncaught TypeError: M is not a function
at oM.J.handleMouseOut (FrontEnd.js:1640)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:248)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
FrontEnd.js:1640 Uncaught TypeError: M is not a function
at oM.J.handleMouseOver (FrontEnd.js:1640)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:248)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
FrontEnd.js:1640 Uncaught TypeError: M is not a function
at oM.J.handleMouseOut (FrontEnd.js:1640)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:248)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
3Overview.js:56 Uncaught TypeError: Cannot read properties of undefined (reading 'prototype')
at P (Overview.js:56)
at SG.convert (FrontEnd.js:904)
at ny (FrontEnd.js:248)
at HTMLElement.iy (FrontEnd.js:125)
at HTMLElement.b (FrontEnd.js:121)
On Thu, Dec 30, 2021 at 6:56 PM Harbs <ha...@gmail.com>> wrote:
1. I’d get rid of the agressive minification options. It will likely cause issues. If you get it to work without those options, you can try to add them back in and see if it still works.
2. You seem to be missing the compiler options explained here: https://apache.github.io/royale-docs/features/modules#minification<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapache.github.io%2Froyale-docs%2Ffeatures%2Fmodules%23minification&data=04%7C01%7Caharui%40adobe.com%7Ce6e97a72825c47f3cb7408d9cf5dc8e8%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637768823995426307%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=mJ8hkJKoDX34n8LC3dpENGqf8KObR%2Bn1Gpm1LtBcFeU%3D&reserved=0>
For a pom, it would look something like this (adjust your paths to match your setup):
Main app:
<additionalCompilerOptions>-source-map=true;-js-compiler-option=--variable_map_output_file gccvars.txt;-js-compiler-option+=--property_map_output_file gccprops.txt</additionalCompilerOptions>
Module:
<additionalCompilerOptions>-source-map=true;-js-compiler-option=--variable_map_input_file ../../../../../MainApp/bin/js-release/gccvars.txt;-js-compiler-option+=--property_map_input_file ../../../../../MainApp/bin/js-release/gccprops.txt</additionalCompilerOptions>
On Dec 30, 2021, at 7:43 PM, Roman Isitua <ro...@gmail.com>> wrote:
I think it will be better for me to share my pom's that way you can see all the compilation options used. The pom for the parent (FmClient2), the MainApp and one module (Overview) have been attached to this email.
On Thu, Dec 30, 2021 at 6:22 PM Harbs <ha...@gmail.com>> wrote:
Roman, can you share your full compiler options?
I decided to remove the below settings completely
-export-public-symbols=false
-prevent-rename-protected-symbols=false
-prevent-rename-public-symbols=false
-prevent-rename-internal-symbols=false
I enabled the below settings
-js-dynamic-access-unknown-members=true;
-js-default-initializers=true
The release version starts up
Hiedra, that’s great!
On Dec 30, 2021, at 7:15 PM, Roman Isitua <ro...@gmail.com>> wrote:
Yes. I am testing with the sdk compiled on branch ROYALE_INTERFACE_INFO
On Thu, Dec 30, 2021 at 6:10 PM Maria Jose Esteve <mj...@iest.com>> wrote:
Roman, are you testing with the SDK compiled from the Harb branches, ROYALE_INTERFACE_INFO, or from develop?
Hiedra
De: Roman Isitua <ro...@gmail.com>>
Enviado el: jueves, 30 de diciembre de 2021 16:52
Para: users@royale.apache.org<ma...@royale.apache.org>
Asunto: Re: Compiling Modules (was Re: Load time is very slow)
I decided to remove the below settings completely
-export-public-symbols=false
-prevent-rename-protected-symbols=false
-prevent-rename-public-symbols=false
-prevent-rename-internal-symbols=false
I enabled the below settings
-js-dynamic-access-unknown-members=true;
-js-default-initializers=true
The release version starts up
<image001.png>
<image002.png>
However, the moment I launch a module. I get the below error
<image003.png>
It appears to be failing when I launch the "Overview" module (by clicking the Overview side menu).
So my current observation is that by retaining only two settings
-js-dynamic-access-unknown-members=true;
-js-default-initializers=true
The release module starts up but the app fails whenever I launch a module.
The smallest size settings in the documentation do not work. The app does not start up.
-export-public-symbols=false
-prevent-rename-protected-symbols=false
-prevent-rename-public-symbols=false
-prevent-rename-internal-symbols=false
The error trace is below
Uncaught TypeError: cm.valuesImpl.init is not a function
at Wr.Rr.pl<https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwr.rr.pl%2F&data=04%7C01%7Caharui%40adobe.com%7Ce6e97a72825c47f3cb7408d9cf5dc8e8%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637768823995426307%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=LiGI53vuAFViSnH7BzWC8CjfC%2ByEivVwhCNHGkXecK0%3D&reserved=0> (Overview.js:792)
at Function.mq.generateMXMLProperties (Overview.js:743)
at Wr.lq.generateMXMLAttributes (Overview.js:551)
at new Wr (Overview.js:810)
at QN.J.loadHandler (FrontEnd.js:1978)
3Overview.js:56 Uncaught TypeError: Cannot read properties of undefined (reading 'prototype')
at P (Overview.js:56)
at VG.convert (FrontEnd.js:910)
at ny (FrontEnd.js:250)
at HTMLElement.iy (FrontEnd.js:125)
at HTMLElement.b (FrontEnd.js:121)
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOut (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOver (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOver @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOut (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOut @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOver (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOver @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOut (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOut @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOver (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOver @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOut (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOut @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOver (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOver @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOut (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOut @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
On Thu, Dec 30, 2021 at 4:32 PM Roman Isitua <ro...@gmail.com>> wrote:
I get the same error even when I set the -js-dynamic-access-unknown-members=true;
On Thu, Dec 30, 2021 at 4:24 PM Roman Isitua <ro...@gmail.com>> wrote:
Using the below settings,
-export-public-symbols=false
-prevent-rename-protected-symbols=false
-prevent-rename-public-symbols=false
-prevent-rename-internal-symbols=false
-js-dynamic-access-unknown-members=false;
-js-default-initializers=true
Debug version runs fine. The release version does not start up
<image004.png>
I get the below errors
Uncaught TypeError: Cannot read properties of undefined (reading 'apply')
at KE.hm (FrontEnd.js:1600)
at XE.M.Fb (FrontEnd.js:943)
at XE.M.uh (FrontEnd.js:937)
at FE.M.na<https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Ffe.m.na%2F&data=04%7C01%7Caharui%40adobe.com%7Ce6e97a72825c47f3cb7408d9cf5dc8e8%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637768823995426307%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=tcMMByIOq69n4rop77jZJxdxDsEStDOp%2FcSfu%2BCqpKc%3D&reserved=0> (FrontEnd.js:497)
at FE.M.v (FrontEnd.js:497)
at dR.M.S (FrontEnd.js:213)
at dR.Nz.S (FrontEnd.js:217)
at dR.M.start (FrontEnd.js:1396)
at index.html:45
:8080/favicon.ico:1 Failed to load resource: the server responded with a status of 404 (Not Found)
FrontEnd.js is the start up class for the application. i.e. It implements the Jewel application class.
On Thu, Dec 30, 2021 at 3:19 PM Roman Isitua <ro...@gmail.com>> wrote:
Hi Harb,
Thanks for your response. I have gone through the documentation. I will do my test again starting with the smallest size option and share my findings.
Regards,
On Thu, Dec 30, 2021 at 10:59 AM Harbs <ha...@gmail.com>> wrote:
Sorry for my deal in responding.
Let’s take a step back.
I’m not sure how you are compiling your modules. I just added some content to the module documentation page which explains what compiler options you need while compiling modules. (It still needs some editing.) https://apache.github.io/royale-docs/features/modules#minification<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapache.github.io%2Froyale-docs%2Ffeatures%2Fmodules%23minification&data=04%7C01%7Caharui%40adobe.com%7Ce6e97a72825c47f3cb7408d9cf5dc8e8%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637768823995426307%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=mJ8hkJKoDX34n8LC3dpENGqf8KObR%2Bn1Gpm1LtBcFeU%3D&reserved=0>
Are you using those options?
On Dec 29, 2021, at 2:19 AM, Maria Jose Esteve <mj...@iest.com>> wrote:
Hi, Let me join you with these tests....
@Harb, I have compiled the SDK from this branch, feature/ROYALE_INTERFACE_INFO, and when running in debug I get this error:
Message on the PURGE CONSOLE is displayed:
Cannot convert org.apache.royale.reflection.beads.ClassAliasBead to IBead
Message in the IDE Window:
Se produjo una excepción: TypeError: Cannot convert [object Object] to IBead
at App.org.apache.royale.core.ElementWrapper.addBead (http://localhost:8080/WNetSuitePlus/org/apache/royale/core/ElementWrapper.js:114:11)
at App.org.apache.royale.core.HTMLElementWrapper.addBead (http://localhost:8080/WNetSuitePlus/org/apache/royale/core/HTMLElementWrapper.js:43:65)
at App.org.apache.royale.jewel.Application.start (http://localhost:8080/WNetSuitePlus/org/apache/royale/jewel/Application.js:246:10)
at App.App_loadXML (http://localhost:8080/WNetSuitePlus/App.js:1681:25)
at org.apache.royale.net.URLLoader.org.apache.royale.events.EventDispatcher.fireListeners (http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:97:23)
at Function.goog.events.EventTarget.dispatchEventInternal_ (http://localhost:8080/WNetSuitePlus/library/closure/goog/events/eventtarget.js:381:26)
at org.apache.royale.net.URLLoader.org.apache.royale.events.EventDispatcher.dispatchEvent (http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:72:37)
at org.apache.royale.net.URLLoader.jsEventHandler (http://localhost:8080/WNetSuitePlus/org/apache/royale/net/URLLoader.js:169:12)
Call stack:
<image003.png>
[INFO] Executing MXMLC in tool group Royale with args: [
-load-config=D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\compile-app-config.xml,
-js-default-initializers=true,
-source-map=true,
-js-dynamic-access-unknown-members=true,
-keep-as3-metadata+=Inject,Dispatcher,EventHandler,Event,PostConstruct,PreDestroy,ViewAdded,ViewRemoved,Bindable,Transient,
-keep-code-with-metadata=Inject,
-show-binding-warnings=false,
-export-public-symbols=false,
-prevent-rename-protected-symbols=false,
-prevent-rename-internal-symbols=false,
-js-output=D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\javascript,
-compiler.targets=JSRoyale,
D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\src\main\royale\App.mxml
The release execution does not change, the error is the same as before (SDK compilation from the develop branch):
Se produjo una excepción: ReferenceError: Error #1065: Variable com.iest.winplusweb.models.MasterConfigSystemModel is not defined.
at yR (http://localhost:8080/WPWebRelease/App.js:3605:1771)
at Mya (http://localhost:8080/WPWebRelease/App.js:3343:365)
at AR.J.usa (http://localhost:8080/WPWebRelease/App.js:434:441)
at GFa.J.fromTypeDefinition (http://localhost:8080/WPWebRelease/App.js:5706:139)
at Function.YT.getTypeDescriptor (http://localhost:8080/WPWebRelease/App.js:4570:820)
at Function.fX.constructBean (http://localhost:8080/WPWebRelease/App.js:2336:472)
at r$.J.initialize (http://localhost:8080/WPWebRelease/App.js:5041:66)
at OW.J.init (http://localhost:8080/WPWebRelease/App.js:950:452)
at OW.J.u (http://localhost:8080/WPWebRelease/App.js:951:454)
at $$.J.addBead (http://localhost:8080/WPWebRelease/App.js:357:549)
The main difference:
project compiled from "SDK-develop" runs fine in js-debug and gives error in js-release and, compiled from "SDK-ROYALE_INTERFACE_INFO" does not launch because of conversion error.
Hiedra
De: Roman Isitua <ro...@gmail.com>>
Enviado el: martes, 28 de diciembre de 2021 15:55
Para: users@royale.apache.org<ma...@royale.apache.org>
Asunto: Re: Load time is very slow
@Harb
I have checked out the feature/ROYALE_INTERFACE_INFO branch and compiled asjs and compiler. I have rebuilt my application with modules in release mode.
I get the following error when I attempt to launch a module
<image001.png>
The module loads fine in debug mode
<image002.png>
Snippets of the log
Overview.js:786 Uncaught TypeError: cm.valuesImpl.init is not a function
at Rr.Mr.yl (Overview.js:786)
at Function.iq.generateMXMLProperties (Overview.js:736)
at Rr.hq.generateMXMLAttributes (Overview.js:546)
at new Rr (Overview.js:804)
at LN.J.loadHandler (FrontEnd.js:1967)
Mr.yl @ Overview.js:786
iq.generateMXMLProperties @ Overview.js:736
hq.generateMXMLAttributes @ Overview.js:546
Rr @ Overview.js:804
J.loadHandler @ FrontEnd.js:1967
load (async)
LN.loadModule @ FrontEnd.js:1965
dN.loadModule @ FrontEnd.js:2406
LD.Un @ FrontEnd.js:1809
ny @ FrontEnd.js:123
ny @ FrontEnd.js:248
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
I have attached the full log to this email.
On Tue, Dec 28, 2021 at 2:51 PM Roman Isitua <ro...@gmail.com>> wrote:
Hi Maria,
Prior to starting this mail discussion "Load time is very slow". I can confirm I have only been compiling in debug mode. My target\javascript\bin\ only had js-debug. It was after I upgraded my royale sdk from 0.9.7 to 0.9.8 that I compiled in release mode.
On Tue, Dec 28, 2021 at 2:24 PM Maria Jose Esteve <mj...@iest.com>> wrote:
Hi, @Roman, I think you are doing a double compile can it be? My times are the same as yours and I always compile in debug and release.
Look at your target folder " target\javascript\bin\" and if you have two folders: js-debug and js-release you are compiling always double.
In my case, the architecture of my project as well as the Maven compilation files (pom.xml) were provided by an external company (we didn't know anything about Maven or Royale at that time) and I understand that this formula was chosen to show us the options we had.
A priori and without doing any test as Harb has done, I think that modularity gives us the advantage of compiling parts of the code once and not compiling them again if they are not modified. So far WITH MY COMPILATION TIMES, sometimes more than 1 minute, this is fundamental. But of course, now we have the problem of minification of the modules and it is really a serious problem because it is impossible for us to deploy in production.
I will try to separate the compiación realese with a profile and if I succeed I will pass it to you @Roman.
@Harb what do you mean by compiling the ROYALE_INTERFACE_INFO branch?
Hiedra
De: Harbs <ha...@gmail.com>>
Enviado el: lunes, 27 de diciembre de 2021 18:32
Para: users@royale.apache.org<ma...@royale.apache.org>
Asunto: Re: Load time is very slow
That doesn’t sound right.
Are you sure you’re compiling debug and not release? That sounds like release build times.
On Dec 27, 2021, at 3:31 PM, Roman Isitua <ro...@gmail.com>> wrote:
Wow ! You are using a workstation with a bleeding edge processor.
I just compiled my app now. It took 44 seconds. (First compilation after ide start up.) Subsequently compilations are usually 19s to 20s.
My application code base is very very small compared to yours. As we continue to add functionality, I expect the compile times to rise.
<MainApp_pom.xml><Overview_pom.xml><fm_client2_pom.xml>
Re: Compiling Modules (was Re: Load time is very slow)
Posted by Roman Isitua <ro...@gmail.com>.
Thanks for the update.
I attempted the following:
1. In the main application, I use the following setting:
*-externs-report=extrep.txt; -link-report=linkrep.txt;*
2. In the module I use the following
*-js-compiler-option=--externs extrep.txt;
-js-compiler-option+=--load-externs linkrep.txt;*
The main application compiles successfully, I get a compilation error with
the module
"--load-externs" is not a valid option
Sample usage: --compilation_level (-O) VAL --externs VAL --js VAL
--js_output_file VAL --warning_level (-W) [QUIET | DEFAULT
| VERBOSE]
Run with --help for all options and details
Internal error: java.lang.NullPointerException
com.google.javascript.jscomp.CommandLineRunner.createOptions(CommandLineRunner.java:1809)org.apache.royale.compiler.utils.JSClosureCompilerWrapper$CompilerOptionsParser.getOptions(JSClosureCompilerWrapper.java:529)org.apache.royale.compiler.utils.JSClosureCompilerWrapper.<init>(JSClosureCompilerWrapper.java:77)org.apache.royale.compiler.internal.codegen.mxml.royale.MXMLRoyalePublisher.publish(MXMLRoyalePublisher.java:395)org.apache.royale.compiler.clients.M
I don't think I am using this option correctly.
.....
On Tue, Jan 4, 2022 at 8:44 AM Alex Harui <ah...@adobe.com> wrote:
> I found some time to investigate. The -externs-report option is mostly
> working correctly, but other compiler changes are needed to try to avoid
> duplicate code in the module. I might have time to investigate more this
> coming weekend. It does appear that if we can correctly reference the
> app’s class from the module that it will work. The Closure Compiler let me
> compile the module after I externalize and avoid requires on everything in
> the main app’s externs report and -js link report, but the references in
> the module have collapsed packages which is either incorrect or aliases
> need to be created.
>
>
>
> However I think this new approach has a better chance of working than
> trying to match renaming tables.
>
>
>
> -Alex
>
>
>
> *From: *Alex Harui <ah...@adobe.com>
> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Date: *Monday, January 3, 2022 at 2:30 PM
> *To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Subject: *Re: Compiling Modules (was Re: Load time is very slow)
>
>
>
> The -externs-report option should be similar to the -link-report option.
> It takes a filename. The compiler should output the classes used in the JS
> compile into that file. To use externs, I think you don’t need to prevent
> renaming in the application as long as public variables are exported. I
> think you specify -externs-report when compiling the application.
>
>
>
> You may also need to output a -link-report from the application as well.
>
>
>
> I think you then specify the externs-report file as an -externs for the
> -js-compiler-options when compiling the module. And maybe also specify the
> -link-report output as a -load-externs in the same way it was used when
> compiling Flex modules. The goal for the module is, like Flex, to not have
> any classes in the module that exist in the main app. Then it doesn’t
> matter about class renaming within the release-mode JS file.
>
>
>
> HTH,
>
> -Alex
>
>
>
> *From: *Roman Isitua <ro...@gmail.com>
> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Date: *Monday, January 3, 2022 at 12:37 PM
> *To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Subject: *Re: Compiling Modules (was Re: Load time is very slow)
>
>
>
>
>
> I can confirm that classes are being renamed in both files.
>
>
>
> I have attempted your suggestion i.e. removing variable maps and property
> maps then use
>
> -externs-report;-export-public-symbols=true;-prevent-rename-public-symbols=true;
>
>
>
>
> I get the below error
>
>
>
> command line Error: configuration variable 'externs-report' expected 1
> argument(s), got 0.
>
>
>
> I cannot find any documentation on how to use the -externs-report
> argument. What does it do ? and what are the acceptable values ?
>
>
>
> Regards,
>
>
>
>
>
> On Sun, Jan 2, 2022 at 9:06 AM Alex Harui <ah...@adobe.com> wrote:
>
> Hi Roman,
>
>
>
> It might be more complicated. The settings are probably doing something
> since you reported that the error occurred in the app vs the module
> depending on the settings.
>
>
>
> I went back and looked at the original module example in
> examples/royale/ModuleExample and was surprised there weren’t more compiler
> settings. I thought we’d found a way to externalize the main app’s code
> for the module. Because if both the app and module have a copy of
> SimpleCSSValuesImpl or any other class that both JS files use, there could
> be issues as to which one gets loaded (maybe both) and what export aliases
> are pointing to. Sounds like changing settings affected whether the
> aliases pointed at module code vs app code.
>
>
>
> I thought we were using similar settings to what we used for SWF where the
> module would not contain a copy of SimpleCSSValuesImpl so it would use the
> one loaded by the main app, but I didn’t see those settings. We might need
> to make that work because otherwise I think static initializations won’t do
> the right thing. Or maybe we’ve figured out that it is simpler just to
> write defensive code that doesn’t get broken. But also, if the module has
> its own copy of code already loaded by the main app, that’s sort of a waste
> of bytes. Maybe there was a minification issue with not having the module
> link in classes already linked into the main app. I see an -externs-report
> option in the compiler but the example doesn’t seem to use it.
>
>
>
> You should be able to scan the JS files and see if a class is in both
> module and app and if it is getting renamed.
>
>
>
> I don’t know if I will have time to investigate further. The currently
> recommended options for modules involving variable maps and property maps
> may need to be abandoned in favor of externs and preventing renames.
>
>
>
> -Alex
>
>
>
>
>
> *From: *Roman Isitua <ro...@gmail.com>
> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Date: *Saturday, January 1, 2022 at 3:02 AM
> *To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Subject: *Re: Compiling Modules (was Re: Load time is very slow)
>
>
>
> Alex, thank you for your detailed analysis of the error log.
>
>
>
> I agree with you that the best strategy is to prevent renaming of
> public/exports used by the module. I have tried different options to
> prevent renaming
>
> It appears none of them stops this. From my observation, it appears that
> this default options below
>
>
>
>
> -export-public-symbols=true;-prevent-rename-public-symbols=true;-prevent-rename-public-instance-accessors=true;
>
>
>
> Only seem to affect the main application (main module) but have no effect
> on the other modules even though I ensured they were applied in
> their respective module pom. I came to this conclusion when I decided to
> turn set -prevent-rename-public-symbols=false
>
>
>
> I noticed that I got the same error but this time around in the main
> module.
>
>
>
> Uncaught TypeError: this.rb[(intermediate value).Kd(...)] is not a function
> at HN.iI.send (FrontEnd.js:970)
> at nI.EH.Ea (FrontEnd.js:880)
> at ON.q6 (FrontEnd.js:1815)
> at TN.L2 (FrontEnd.js:2034)
> at hF.Xf (FrontEnd.js:2063)
> at lF.kb (FrontEnd.js:1233)
> at lF.Vf (FrontEnd.js:1224)
> at cF.O (FrontEnd.js:659)
> at cF.M.w (FrontEnd.js:661)
> at gQ.mA.M (FrontEnd.js:241)
>
>
>
> FrontEnd.js maps to FrontEnd.as in my application and is the entry point
> of the application. This confirms that -prevent-rename-public-symbols=false
> has
>
> an effect on the main module but no effect on other modules even though
> they were applied in the respective module pom's.
>
>
>
> Maybe there are other options I am overlooking.
>
>
>
> On Sat, Jan 1, 2022 at 9:31 AM Alex Harui <ah...@adobe.com> wrote:
>
> In case it helps, the minification (variable renaming) mechanism is
> essentially guaranteed to cause problems in modules. The Closure Compiler
> basically takes variables, sees if it is worth renaming it, then gives it
> the name ‘a’, then ‘b’, and so-on, (it skips a few letters, IIRC), then
> moves on to ‘aa’, and ‘ab’, etc. The odds that the compiler will encounter
> the same variables in the same order when compiling an app and one or more
> modules is close to zero.
>
>
>
> I did some work to try to dump the mapping of the renamed variables in the
> main app and use that when compiling the modules. It was working for a
> while, then some code was added to the framework that started fooling the
> Closure Compiler. I spent some time trying to fix the Closure Compiler,
> but ran out of time. Meanwhile, Josh was adding more control over renaming
> so I moved on to other things.
>
>
>
> IMO, the best strategy to take would be to try to control what gets
> renamed. All public/exports from the app that are used by the module
> should not be renamed. That will definitely make the app and modules
> bigger, but unless the Closure Compiler folks become interested in
> runtime-loaded modules, it is challenging for the Royale compiler to allow
> aggressive renaming.
>
>
>
> I think what is going on with the exceptions below is that exporting
> doesn’t really prevent renaming. It only sets up an externally-visible
> alias to a renamed variable. Especially for static members. So it isn’t
> sufficient to export public variables, the code within the module must not
> let the Closure Compiler think that the intra-module references can be
> renamed, in this case, from SimpleCSSValuesImpl to QI
>
>
>
> I don’t know the renaming options we’ve added to the Royale Compiler, so I
> don’t know if there is an option to control that. I think there is a way
> to convince the Closure Compiler to not rename SimpleCSSValuesImpl because
> I’ve seen other class names not get renamed.
>
>
>
> HTH,
>
> -Alex
>
>
>
> *From: *Roman Isitua <ro...@gmail.com>
> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Date: *Friday, December 31, 2021 at 10:42 AM
> *To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Subject: *Re: Compiling Modules (was Re: Load time is very slow)
>
>
>
> I have tested on both. The error log is the same.
>
>
>
> I don't understand your second question. Kindly clarify ?
>
>
>
>
>
> I followed strictly the approach used for loading modules here in this
> example.
>
> This is the only method I know for loading modules. If there is another
> method please share.
>
>
>
>
>
>
> https://royale.apache.org/dividing-an-apache-royale-application-with-modules/
> <https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Froyale.apache.org%2Fdividing-an-apache-royale-application-with-modules%2F&data=04%7C01%7Caharui%40adobe.com%7Cdd6290cd9b114da9fecb08d9cf08a533%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637768458309339818%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=yrs92M8NLUL7D5puEOx%2BrlF9fR2ahTjGZotf%2BqfN6O0%3D&reserved=0>
>
>
>
> On Fri, 31 Dec 2021, 19:14 Maria Jose Esteve, <mj...@iest.com> wrote:
>
> @Roman, which branch did you compile the SDK from, ROYALE_INTERFACE_INFO
> or develop?
>
> Could you pass the Overview.mxml view to the main application? (to rule
> it out)
>
>
>
> Hiedra
>
>
>
> *De:* Roman Isitua <ro...@gmail.com>
> *Enviado el:* viernes, 31 de diciembre de 2021 17:56
> *Para:* users@royale.apache.org
> *Asunto:* Re: Compiling Modules (was Re: Load time is very slow)
>
>
>
> I have tried tracing where the errors are happening whenever I test the
> release version
>
> Uncaught TypeError: Ql.valuesImpl.init is not a function
> at Hr.Cr.um (Overview.js:846)
> at Function.ep.generateMXMLProperties (Overview.js:795)
> at Hr.Sp.generateMXMLAttributes (Overview.js:599)
> at new Hr (Overview.js:864)
> at PN.M.loadHandler (FrontEnd.js:2042)
> 9Overview.js:173 Uncaught TypeError: this.createElement is not a function
> at $B.V (Overview.js:173)
> at new $B (FrontEnd.js:2430)
> at EP.convert (FrontEnd.js:2430)
> at Zy (FrontEnd.js:261)
> at HTMLAnchorElement.Uy (FrontEnd.js:121)
> at HTMLAnchorElement.Sy.b (FrontEnd.js:117)
>
>
>
>
>
> The highlighted code in red is declared as follows in the Overview.mxml
> (maven module)
>
>
>
> <j:valuesImpl>
>
> <js:SimpleCSSValuesImpl/>
>
> </j:valuesImpl>
>
>
>
> The j:valuesImpl points to the following code in jewel Module.js
>
>
>
> /**
> * @nocollapse
> * @export
> * @type {org.apache.royale.core.IValuesImpl}
> */
> org.apache.royale.jewel.Module.prototype.valuesImpl;
>
>
> org.apache.royale.jewel.Module.prototype.set__valuesImpl = function(value)
> {
> org.apache.royale.core.ValuesManager.valuesImpl.init(this);
> };
>
>
>
>
>
> it appears this function is improperly renamed and whenever the app tries
> to load the module is not able to recognise it as a function.
>
>
>
> The same issue of improper function renaming is happening in the second
> error as well
>
>
>
> 9Overview.js:173 Uncaught TypeError: this.createElement is not a function
>
>
>
>
>
> On Thu, Dec 30, 2021 at 10:42 PM Roman Isitua <ro...@gmail.com>
> wrote:
>
>
>
> I have applied the js compiler option as follows
>
>
>
>
> <additionalCompilerOptions>-source-map=false;-compiler.show-binding-warnings=false;-js-default-initializers=true;-js-dynamic-access-unknown-members=true;
> -js-compiler-option=--variable_map_output_file
> gccvars.txt;-js-compiler-option+=--property_map_output_file gccprops.txt
> </additionalCompilerOptions>
>
>
>
>
>
> I get the same error as before when attempting to launch the jewel module.
>
>
>
> *Error! Filename not specified.*
>
>
>
>
>
> Same error trace.
>
>
>
> Uncaught TypeError: cm.valuesImpl.init is not a function
> at Rr.Mr.yl (Overview.js:786)
> at Function.iq.generateMXMLProperties (Overview.js:736)
> at Rr.hq.generateMXMLAttributes (Overview.js:546)
> at new Rr (Overview.js:804)
> at LN.J.loadHandler (FrontEnd.js:1967)
> FrontEnd.js:1640 Uncaught TypeError: M is not a function
> at oM.J.handleMouseOut (FrontEnd.js:1640)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:248)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> FrontEnd.js:1640 Uncaught TypeError: M is not a function
> at oM.J.handleMouseOver (FrontEnd.js:1640)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:248)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> FrontEnd.js:1640 Uncaught TypeError: M is not a function
> at oM.J.handleMouseOut (FrontEnd.js:1640)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:248)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> FrontEnd.js:1640 Uncaught TypeError: M is not a function
> at oM.J.handleMouseOver (FrontEnd.js:1640)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:248)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> FrontEnd.js:1640 Uncaught TypeError: M is not a function
> at oM.J.handleMouseOut (FrontEnd.js:1640)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:248)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> FrontEnd.js:1640 Uncaught TypeError: M is not a function
> at oM.J.handleMouseOver (FrontEnd.js:1640)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:248)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> FrontEnd.js:1640 Uncaught TypeError: M is not a function
> at oM.J.handleMouseOut (FrontEnd.js:1640)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:248)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> 3Overview.js:56 Uncaught TypeError: Cannot read properties of undefined
> (reading 'prototype')
> at P (Overview.js:56)
> at SG.convert (FrontEnd.js:904)
> at ny (FrontEnd.js:248)
> at HTMLElement.iy (FrontEnd.js:125)
> at HTMLElement.b (FrontEnd.js:121)
>
>
>
> On Thu, Dec 30, 2021 at 6:56 PM Harbs <ha...@gmail.com> wrote:
>
> 1. I’d get rid of the agressive minification options. It will likely cause
> issues. If you get it to work without those options, you can try to add
> them back in and see if it still works.
>
> 2. You seem to be missing the compiler options explained here:
> https://apache.github.io/royale-docs/features/modules#minification
> <https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapache.github.io%2Froyale-docs%2Ffeatures%2Fmodules%23minification&data=04%7C01%7Caharui%40adobe.com%7Cdd6290cd9b114da9fecb08d9cf08a533%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637768458309339818%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=zi%2BolXHpiXpiAb7nVvV9VmZK%2B%2FfhBtXJTcyg%2Bb7dApA%3D&reserved=0>
>
>
>
> For a pom, it would look something like this (adjust your paths to match
> your setup):
>
>
>
> Main app:
>
> <additionalCompilerOptions>-source-map=true;-js-compiler-option=--variable_map_output_file
> gccvars.txt;-js-compiler-option+=--property_map_output_file
> gccprops.txt</additionalCompilerOptions>
>
>
>
> Module:
>
> <additionalCompilerOptions>-source-map=true;-js-compiler-option=--variable_map_input_file
> ../../../../../MainApp/bin/js-release/gccvars.txt;-js-compiler-option+=--property_map_input_file
> ../../../../../MainApp/bin/js-release/gccprops.txt</additionalCompilerOptions>
>
>
>
> On Dec 30, 2021, at 7:43 PM, Roman Isitua <ro...@gmail.com> wrote:
>
>
>
> I think it will be better for me to share my pom's that way you can see
> all the compilation options used. The pom for the parent (FmClient2), the
> MainApp and one module (Overview) have been attached to this email.
>
>
>
>
>
> On Thu, Dec 30, 2021 at 6:22 PM Harbs <ha...@gmail.com> wrote:
>
> Roman, can you share your full compiler options?
>
>
>
> I decided to remove the below settings completely
> -export-public-symbols=false
> -prevent-rename-protected-symbols=false
> -prevent-rename-public-symbols=false
> -prevent-rename-internal-symbols=false
>
>
> I enabled the below settings
>
> -js-dynamic-access-unknown-members=true;
> -js-default-initializers=true
>
>
> The release version starts up
>
>
>
> Hiedra, that’s great!
>
>
>
> On Dec 30, 2021, at 7:15 PM, Roman Isitua <ro...@gmail.com> wrote:
>
>
>
>
>
> Yes. I am testing with the sdk compiled on branch ROYALE_INTERFACE_INFO
>
>
>
> On Thu, Dec 30, 2021 at 6:10 PM Maria Jose Esteve <mj...@iest.com>
> wrote:
>
> Roman, are you testing with the SDK compiled from the Harb branches,
> ROYALE_INTERFACE_INFO, or from develop?
>
>
>
> Hiedra
>
>
>
> *De:* Roman Isitua <ro...@gmail.com>
> *Enviado el:* jueves, 30 de diciembre de 2021 16:52
> *Para:* users@royale.apache.org
> *Asunto:* Re: Compiling Modules (was Re: Load time is very slow)
>
>
>
> I decided to remove the below settings completely
> -export-public-symbols=false
> -prevent-rename-protected-symbols=false
> -prevent-rename-public-symbols=false
> -prevent-rename-internal-symbols=false
>
>
> I enabled the below settings
>
> -js-dynamic-access-unknown-members=true;
> -js-default-initializers=true
>
>
> The release version starts up
>
>
>
>
>
>
>
> <image001.png>
>
>
>
>
>
> <image002.png>
>
>
>
> However, the moment I launch a module. I get the below error
>
>
>
> <image003.png>
>
>
>
>
>
> It appears to be failing when I launch the "*Overview*" module
> (by clicking the Overview side menu).
>
>
>
> So my current observation is that by retaining only two settings
>
>
>
> -js-dynamic-access-unknown-members=true;
> -js-default-initializers=true
>
>
>
> The release module starts up but the app fails whenever I launch a module.
>
>
>
> The smallest size settings in the documentation do not work. The app does
> not start up.
>
>
>
> -export-public-symbols=false
> -prevent-rename-protected-symbols=false
> -prevent-rename-public-symbols=false
> -prevent-rename-internal-symbols=false
>
>
>
>
>
>
>
> The error trace is below
>
>
>
>
>
> Uncaught TypeError: cm.valuesImpl.init is not a function
> at Wr.Rr.pl
> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwr.rr.pl%2F&data=04%7C01%7Caharui%40adobe.com%7Cdd6290cd9b114da9fecb08d9cf08a533%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637768458309339818%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=nUd%2FKIFQUcqEa%2FILosAXEeWi5u7bN64ok%2BKxExE63DM%3D&reserved=0>
> (Overview.js:792)
> at Function.mq.generateMXMLProperties (Overview.js:743)
> at Wr.lq.generateMXMLAttributes (Overview.js:551)
> at new Wr (Overview.js:810)
> at QN.J.loadHandler (FrontEnd.js:1978)
> 3Overview.js:56 Uncaught TypeError: Cannot read properties of undefined
> (reading 'prototype')
> at P (Overview.js:56)
> at VG.convert (FrontEnd.js:910)
> at ny (FrontEnd.js:250)
> at HTMLElement.iy (FrontEnd.js:125)
> at HTMLElement.b (FrontEnd.js:121)
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOut (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOver (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOver @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOut (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOut @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOver (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOver @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOut (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOut @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOver (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOver @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOut (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOut @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOver (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOver @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOut (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOut @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
>
>
>
> On Thu, Dec 30, 2021 at 4:32 PM Roman Isitua <ro...@gmail.com>
> wrote:
>
> I get the same error even when I set
> the -js-dynamic-access-unknown-members=true;
>
>
>
> On Thu, Dec 30, 2021 at 4:24 PM Roman Isitua <ro...@gmail.com>
> wrote:
>
>
>
> Using the below settings,
>
> -export-public-symbols=false
> -prevent-rename-protected-symbols=false
> -prevent-rename-public-symbols=false
> -prevent-rename-internal-symbols=false
> -js-dynamic-access-unknown-members=false;
>
> -js-default-initializers=true
>
>
> Debug version runs fine. The release version does not start up
>
> <image004.png>
>
>
> I get the below errors
>
> Uncaught TypeError: Cannot read properties of undefined (reading 'apply')
> at KE.hm (FrontEnd.js:1600)
> at XE.M.Fb (FrontEnd.js:943)
> at XE.M.uh (FrontEnd.js:937)
> at FE.M.na
> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Ffe.m.na%2F&data=04%7C01%7Caharui%40adobe.com%7Cdd6290cd9b114da9fecb08d9cf08a533%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637768458309339818%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=m89bpZetyvevLLdY7lVbYJ4HEtfei5M3tsjrdkxy4xo%3D&reserved=0>
> (FrontEnd.js:497)
> at FE.M.v (FrontEnd.js:497)
> at dR.M.S (FrontEnd.js:213)
> at dR.Nz.S (FrontEnd.js:217)
> at dR.M.start (FrontEnd.js:1396)
> at index.html:45
> :8080/favicon.ico:1 Failed to load resource: the server responded with a
> status of 404 (Not Found)
>
>
>
>
>
> FrontEnd.js is the start up class for the application. i.e. It implements
> the Jewel application class.
>
>
>
>
>
>
>
> On Thu, Dec 30, 2021 at 3:19 PM Roman Isitua <ro...@gmail.com>
> wrote:
>
> Hi Harb,
>
>
>
> Thanks for your response. I have gone through the documentation. I will do
> my test again starting with the smallest size option and share my findings.
>
>
>
> Regards,
>
>
>
> On Thu, Dec 30, 2021 at 10:59 AM Harbs <ha...@gmail.com> wrote:
>
> Sorry for my deal in responding.
>
>
>
> Let’s take a step back.
>
>
>
> I’m not sure how you are compiling your modules. I just added some content
> to the module documentation page which explains what compiler options you
> need while compiling modules. (It still needs some editing.)
> https://apache.github.io/royale-docs/features/modules#minification
> <https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapache.github.io%2Froyale-docs%2Ffeatures%2Fmodules%23minification&data=04%7C01%7Caharui%40adobe.com%7Cdd6290cd9b114da9fecb08d9cf08a533%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637768458309339818%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=zi%2BolXHpiXpiAb7nVvV9VmZK%2B%2FfhBtXJTcyg%2Bb7dApA%3D&reserved=0>
>
>
>
> Are you using those options?
>
>
>
> On Dec 29, 2021, at 2:19 AM, Maria Jose Esteve <mj...@iest.com> wrote:
>
>
>
> Hi, Let me join you with these tests....
>
>
>
> @Harb, I have compiled the SDK from this branch, feature/ROYALE_INTERFACE_INFO,
> and when running in debug I get this error:
>
>
>
> Message on the PURGE CONSOLE is displayed:
>
>
>
> Cannot convert org.apache.royale.reflection.beads.ClassAliasBead to IBead
>
>
>
> Message in the IDE Window:
>
>
>
> Se produjo una excepción: TypeError: Cannot convert [object Object] to
> IBead
>
> at App.org.apache.royale.core.ElementWrapper.addBead (
> http://localhost:8080/WNetSuitePlus/org/apache/royale/core/ElementWrapper.js:114:11
> )
>
> at App.org.apache.royale.core.HTMLElementWrapper.addBead (
> http://localhost:8080/WNetSuitePlus/org/apache/royale/core/HTMLElementWrapper.js:43:65
> )
>
> at App.org.apache.royale.jewel.Application.start (
> http://localhost:8080/WNetSuitePlus/org/apache/royale/jewel/Application.js:246:10
> )
>
> at App.App_loadXML (http://localhost:8080/WNetSuitePlus/App.js:1681:25
> )
>
> at
> org.apache.royale.net.URLLoader.org.apache.royale.events.EventDispatcher.fireListeners
> (
> http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:97:23
> )
>
> at Function.goog.events.EventTarget.dispatchEventInternal_ (
> http://localhost:8080/WNetSuitePlus/library/closure/goog/events/eventtarget.js:381:26
> )
>
> at
> org.apache.royale.net.URLLoader.org.apache.royale.events.EventDispatcher.dispatchEvent
> (
> http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:72:37
> )
>
> at org.apache.royale.net.URLLoader.jsEventHandler (
> http://localhost:8080/WNetSuitePlus/org/apache/royale/net/URLLoader.js:169:12
> )
>
>
>
> Call stack:
>
>
>
> <image003.png>
>
>
>
> [INFO] Executing MXMLC in tool group Royale with args: [
>
>
> -load-config=D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\compile-app-config.xml,
>
> -js-default-initializers=true,
>
> -source-map=true,
>
> -js-dynamic-access-unknown-members=true,
>
>
> -keep-as3-metadata+=Inject,Dispatcher,EventHandler,Event,PostConstruct,PreDestroy,ViewAdded,ViewRemoved,Bindable,Transient,
>
> -keep-code-with-metadata=Inject,
>
> -show-binding-warnings=false,
>
> -export-public-symbols=false,
>
> -prevent-rename-protected-symbols=false,
>
> -prevent-rename-internal-symbols=false,
>
>
> -js-output=D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\javascript,
>
> -compiler.targets=JSRoyale,
>
>
> D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\src\main\royale\App.mxml
>
>
>
>
>
> The release execution does not change, the error is the same as before
> (SDK compilation from the develop branch):
>
>
>
> Se produjo una excepción: ReferenceError: Error #1065: Variable
> com.iest.winplusweb.models.MasterConfigSystemModel is not defined.
>
> at yR (http://localhost:8080/WPWebRelease/App.js:3605:1771)
>
> at Mya (http://localhost:8080/WPWebRelease/App.js:3343:365)
>
> at AR.J.usa (http://localhost:8080/WPWebRelease/App.js:434:441)
>
> at GFa.J.fromTypeDefinition (
> http://localhost:8080/WPWebRelease/App.js:5706:139)
>
> at Function.YT.getTypeDescriptor (
> http://localhost:8080/WPWebRelease/App.js:4570:820)
>
> at Function.fX.constructBean (
> http://localhost:8080/WPWebRelease/App.js:2336:472)
>
> at r$.J.initialize (http://localhost:8080/WPWebRelease/App.js:5041:66)
>
> at OW.J.init (http://localhost:8080/WPWebRelease/App.js:950:452)
>
> at OW.J.u (http://localhost:8080/WPWebRelease/App.js:951:454)
>
> at $$.J.addBead (http://localhost:8080/WPWebRelease/App.js:357:549)
>
>
>
> The main difference:
>
> project compiled from "SDK-develop" runs fine in js-debug and gives error
> in js-release and, compiled from "SDK-ROYALE_INTERFACE_INFO" does not
> launch because of conversion error.
>
>
>
> Hiedra
>
>
>
> *De:* Roman Isitua <ro...@gmail.com>
> *Enviado el:* martes, 28 de diciembre de 2021 15:55
> *Para:* users@royale.apache.org
> *Asunto:* Re: Load time is very slow
>
>
>
> @Harb
>
>
>
> I have checked out the feature/ROYALE_INTERFACE_INFO branch and compiled
> asjs and compiler. I have rebuilt my application with modules in release
> mode.
>
>
>
> I get the following error when I attempt to launch a module
>
>
>
>
>
> <image001.png>
>
>
>
>
>
> The module loads fine in debug mode
>
>
>
> <image002.png>
>
>
>
>
>
> Snippets of the log
>
>
>
> Overview.js:786 Uncaught TypeError: cm.valuesImpl.init is not a function
> at Rr.Mr.yl (Overview.js:786)
> at Function.iq.generateMXMLProperties (Overview.js:736)
> at Rr.hq.generateMXMLAttributes (Overview.js:546)
> at new Rr (Overview.js:804)
> at LN.J.loadHandler (FrontEnd.js:1967)
> Mr.yl @ Overview.js:786
> iq.generateMXMLProperties @ Overview.js:736
> hq.generateMXMLAttributes @ Overview.js:546
> Rr @ Overview.js:804
> J.loadHandler @ FrontEnd.js:1967
> load (async)
> LN.loadModule @ FrontEnd.js:1965
> dN.loadModule @ FrontEnd.js:2406
> LD.Un @ FrontEnd.js:1809
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:248
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
>
>
>
>
>
> I have attached the full log to this email.
>
>
>
>
>
>
>
>
>
> On Tue, Dec 28, 2021 at 2:51 PM Roman Isitua <ro...@gmail.com>
> wrote:
>
> Hi Maria,
>
>
>
> Prior to starting this mail discussion "Load time is very slow". I can
> confirm I have only been compiling in debug mode. My target\javascript\bin\
> only had js-debug. It was after I upgraded my royale sdk from 0.9.7 to
> 0.9.8 that I compiled in release mode.
>
>
>
>
>
>
>
> On Tue, Dec 28, 2021 at 2:24 PM Maria Jose Esteve <mj...@iest.com>
> wrote:
>
> Hi, @Roman, I think you are doing a double compile can it be? My times are
> the same as yours and I always compile in debug and release.
>
>
>
> Look at your target folder " target\javascript\bin\" and if you have two
> folders: js-debug and js-release you are compiling always double.
>
>
>
> In my case, the architecture of my project as well as the Maven
> compilation files (pom.xml) were provided by an external company (we didn't
> know anything about Maven or Royale at that time) and I understand that
> this formula was chosen to show us the options we had.
>
>
>
> A priori and without doing any test as Harb has done, I think that
> modularity gives us the advantage of compiling parts of the code once and
> not compiling them again if they are not modified. So far WITH MY
> COMPILATION TIMES, sometimes more than 1 minute, this is fundamental. But
> of course, now we have the problem of minification of the modules and it is
> really a serious problem because it is impossible for us to deploy in
> production.
>
>
>
> I will try to separate the compiación realese with a profile and if I
> succeed I will pass it to you @Roman.
>
>
>
> @Harb what do you mean by compiling the ROYALE_INTERFACE_INFO branch?
>
>
>
> Hiedra
>
>
>
> *De:* Harbs <ha...@gmail.com>
> *Enviado el:* lunes, 27 de diciembre de 2021 18:32
> *Para:* users@royale.apache.org
> *Asunto:* Re: Load time is very slow
>
>
>
> That doesn’t sound right.
>
>
>
> Are you sure you’re compiling debug and not release? That sounds like
> release build times.
>
>
>
> On Dec 27, 2021, at 3:31 PM, Roman Isitua <ro...@gmail.com> wrote:
>
>
>
> Wow ! You are using a workstation with a bleeding edge processor.
>
>
>
> I just compiled my app now. It took 44 seconds. (First compilation after
> ide start up.) Subsequently compilations are usually 19s to 20s.
>
>
>
> My application code base is very very small compared to yours. As we
> continue to add functionality, I expect the compile times to rise.
>
>
>
>
>
>
>
>
>
> <MainApp_pom.xml><Overview_pom.xml><fm_client2_pom.xml>
>
>
>
>
Re: Compiling Modules (was Re: Load time is very slow)
Posted by Alex Harui <ah...@adobe.com>.
I found some time to investigate. The -externs-report option is mostly working correctly, but other compiler changes are needed to try to avoid duplicate code in the module. I might have time to investigate more this coming weekend. It does appear that if we can correctly reference the app’s class from the module that it will work. The Closure Compiler let me compile the module after I externalize and avoid requires on everything in the main app’s externs report and -js link report, but the references in the module have collapsed packages which is either incorrect or aliases need to be created.
However I think this new approach has a better chance of working than trying to match renaming tables.
-Alex
From: Alex Harui <ah...@adobe.com>
Reply-To: "users@royale.apache.org" <us...@royale.apache.org>
Date: Monday, January 3, 2022 at 2:30 PM
To: "users@royale.apache.org" <us...@royale.apache.org>
Subject: Re: Compiling Modules (was Re: Load time is very slow)
The -externs-report option should be similar to the -link-report option. It takes a filename. The compiler should output the classes used in the JS compile into that file. To use externs, I think you don’t need to prevent renaming in the application as long as public variables are exported. I think you specify -externs-report when compiling the application.
You may also need to output a -link-report from the application as well.
I think you then specify the externs-report file as an -externs for the -js-compiler-options when compiling the module. And maybe also specify the -link-report output as a -load-externs in the same way it was used when compiling Flex modules. The goal for the module is, like Flex, to not have any classes in the module that exist in the main app. Then it doesn’t matter about class renaming within the release-mode JS file.
HTH,
-Alex
From: Roman Isitua <ro...@gmail.com>
Reply-To: "users@royale.apache.org" <us...@royale.apache.org>
Date: Monday, January 3, 2022 at 12:37 PM
To: "users@royale.apache.org" <us...@royale.apache.org>
Subject: Re: Compiling Modules (was Re: Load time is very slow)
I can confirm that classes are being renamed in both files.
I have attempted your suggestion i.e. removing variable maps and property maps then use
-externs-report;-export-public-symbols=true;-prevent-rename-public-symbols=true;
I get the below error
command line Error: configuration variable 'externs-report' expected 1 argument(s), got 0.
I cannot find any documentation on how to use the -externs-report argument. What does it do ? and what are the acceptable values ?
Regards,
On Sun, Jan 2, 2022 at 9:06 AM Alex Harui <ah...@adobe.com>> wrote:
Hi Roman,
It might be more complicated. The settings are probably doing something since you reported that the error occurred in the app vs the module depending on the settings.
I went back and looked at the original module example in examples/royale/ModuleExample and was surprised there weren’t more compiler settings. I thought we’d found a way to externalize the main app’s code for the module. Because if both the app and module have a copy of SimpleCSSValuesImpl or any other class that both JS files use, there could be issues as to which one gets loaded (maybe both) and what export aliases are pointing to. Sounds like changing settings affected whether the aliases pointed at module code vs app code.
I thought we were using similar settings to what we used for SWF where the module would not contain a copy of SimpleCSSValuesImpl so it would use the one loaded by the main app, but I didn’t see those settings. We might need to make that work because otherwise I think static initializations won’t do the right thing. Or maybe we’ve figured out that it is simpler just to write defensive code that doesn’t get broken. But also, if the module has its own copy of code already loaded by the main app, that’s sort of a waste of bytes. Maybe there was a minification issue with not having the module link in classes already linked into the main app. I see an -externs-report option in the compiler but the example doesn’t seem to use it.
You should be able to scan the JS files and see if a class is in both module and app and if it is getting renamed.
I don’t know if I will have time to investigate further. The currently recommended options for modules involving variable maps and property maps may need to be abandoned in favor of externs and preventing renames.
-Alex
From: Roman Isitua <ro...@gmail.com>>
Reply-To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Date: Saturday, January 1, 2022 at 3:02 AM
To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Subject: Re: Compiling Modules (was Re: Load time is very slow)
Alex, thank you for your detailed analysis of the error log.
I agree with you that the best strategy is to prevent renaming of public/exports used by the module. I have tried different options to prevent renaming
It appears none of them stops this. From my observation, it appears that this default options below
-export-public-symbols=true;-prevent-rename-public-symbols=true;-prevent-rename-public-instance-accessors=true;
Only seem to affect the main application (main module) but have no effect on the other modules even though I ensured they were applied in their respective module pom. I came to this conclusion when I decided to turn set -prevent-rename-public-symbols=false
I noticed that I got the same error but this time around in the main module.
Uncaught TypeError: this.rb[(intermediate value).Kd(...)] is not a function
at HN.iI.send (FrontEnd.js:970)
at nI.EH.Ea (FrontEnd.js:880)
at ON.q6 (FrontEnd.js:1815)
at TN.L2 (FrontEnd.js:2034)
at hF.Xf (FrontEnd.js:2063)
at lF.kb (FrontEnd.js:1233)
at lF.Vf (FrontEnd.js:1224)
at cF.O (FrontEnd.js:659)
at cF.M.w (FrontEnd.js:661)
at gQ.mA.M (FrontEnd.js:241)
FrontEnd.js maps to FrontEnd.as in my application and is the entry point of the application. This confirms that -prevent-rename-public-symbols=false has
an effect on the main module but no effect on other modules even though they were applied in the respective module pom's.
Maybe there are other options I am overlooking.
On Sat, Jan 1, 2022 at 9:31 AM Alex Harui <ah...@adobe.com>> wrote:
In case it helps, the minification (variable renaming) mechanism is essentially guaranteed to cause problems in modules. The Closure Compiler basically takes variables, sees if it is worth renaming it, then gives it the name ‘a’, then ‘b’, and so-on, (it skips a few letters, IIRC), then moves on to ‘aa’, and ‘ab’, etc. The odds that the compiler will encounter the same variables in the same order when compiling an app and one or more modules is close to zero.
I did some work to try to dump the mapping of the renamed variables in the main app and use that when compiling the modules. It was working for a while, then some code was added to the framework that started fooling the Closure Compiler. I spent some time trying to fix the Closure Compiler, but ran out of time. Meanwhile, Josh was adding more control over renaming so I moved on to other things.
IMO, the best strategy to take would be to try to control what gets renamed. All public/exports from the app that are used by the module should not be renamed. That will definitely make the app and modules bigger, but unless the Closure Compiler folks become interested in runtime-loaded modules, it is challenging for the Royale compiler to allow aggressive renaming.
I think what is going on with the exceptions below is that exporting doesn’t really prevent renaming. It only sets up an externally-visible alias to a renamed variable. Especially for static members. So it isn’t sufficient to export public variables, the code within the module must not let the Closure Compiler think that the intra-module references can be renamed, in this case, from SimpleCSSValuesImpl to QI
I don’t know the renaming options we’ve added to the Royale Compiler, so I don’t know if there is an option to control that. I think there is a way to convince the Closure Compiler to not rename SimpleCSSValuesImpl because I’ve seen other class names not get renamed.
HTH,
-Alex
From: Roman Isitua <ro...@gmail.com>>
Reply-To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Date: Friday, December 31, 2021 at 10:42 AM
To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Subject: Re: Compiling Modules (was Re: Load time is very slow)
I have tested on both. The error log is the same.
I don't understand your second question. Kindly clarify ?
I followed strictly the approach used for loading modules here in this example.
This is the only method I know for loading modules. If there is another method please share.
https://royale.apache.org/dividing-an-apache-royale-application-with-modules/<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Froyale.apache.org%2Fdividing-an-apache-royale-application-with-modules%2F&data=04%7C01%7Caharui%40adobe.com%7Cdd6290cd9b114da9fecb08d9cf08a533%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637768458309339818%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=yrs92M8NLUL7D5puEOx%2BrlF9fR2ahTjGZotf%2BqfN6O0%3D&reserved=0>
On Fri, 31 Dec 2021, 19:14 Maria Jose Esteve, <mj...@iest.com>> wrote:
@Roman, which branch did you compile the SDK from, ROYALE_INTERFACE_INFO or develop?
Could you pass the Overview.mxml view to the main application? (to rule it out)
Hiedra
De: Roman Isitua <ro...@gmail.com>>
Enviado el: viernes, 31 de diciembre de 2021 17:56
Para: users@royale.apache.org<ma...@royale.apache.org>
Asunto: Re: Compiling Modules (was Re: Load time is very slow)
I have tried tracing where the errors are happening whenever I test the release version
Uncaught TypeError: Ql.valuesImpl.init is not a function
at Hr.Cr.um (Overview.js:846)
at Function.ep.generateMXMLProperties (Overview.js:795)
at Hr.Sp.generateMXMLAttributes (Overview.js:599)
at new Hr (Overview.js:864)
at PN.M.loadHandler (FrontEnd.js:2042)
9Overview.js:173 Uncaught TypeError: this.createElement is not a function
at $B.V (Overview.js:173)
at new $B (FrontEnd.js:2430)
at EP.convert (FrontEnd.js:2430)
at Zy (FrontEnd.js:261)
at HTMLAnchorElement.Uy (FrontEnd.js:121)
at HTMLAnchorElement.Sy.b (FrontEnd.js:117)
The highlighted code in red is declared as follows in the Overview.mxml (maven module)
<j:valuesImpl>
<js:SimpleCSSValuesImpl/>
</j:valuesImpl>
The j:valuesImpl points to the following code in jewel Module.js
/**
* @nocollapse
* @export
* @type {org.apache.royale.core.IValuesImpl}
*/
org.apache.royale.jewel.Module.prototype.valuesImpl;
org.apache.royale.jewel.Module.prototype.set__valuesImpl = function(value) {
org.apache.royale.core.ValuesManager.valuesImpl.init(this);
};
it appears this function is improperly renamed and whenever the app tries to load the module is not able to recognise it as a function.
The same issue of improper function renaming is happening in the second error as well
9Overview.js:173 Uncaught TypeError: this.createElement is not a function
On Thu, Dec 30, 2021 at 10:42 PM Roman Isitua <ro...@gmail.com>> wrote:
I have applied the js compiler option as follows
<additionalCompilerOptions>-source-map=false;-compiler.show-binding-warnings=false;-js-default-initializers=true;-js-dynamic-access-unknown-members=true;
-js-compiler-option=--variable_map_output_file gccvars.txt;-js-compiler-option+=--property_map_output_file gccprops.txt
</additionalCompilerOptions>
I get the same error as before when attempting to launch the jewel module.
Error! Filename not specified.
Same error trace.
Uncaught TypeError: cm.valuesImpl.init is not a function
at Rr.Mr.yl (Overview.js:786)
at Function.iq.generateMXMLProperties (Overview.js:736)
at Rr.hq.generateMXMLAttributes (Overview.js:546)
at new Rr (Overview.js:804)
at LN.J.loadHandler (FrontEnd.js:1967)
FrontEnd.js:1640 Uncaught TypeError: M is not a function
at oM.J.handleMouseOut (FrontEnd.js:1640)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:248)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
FrontEnd.js:1640 Uncaught TypeError: M is not a function
at oM.J.handleMouseOver (FrontEnd.js:1640)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:248)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
FrontEnd.js:1640 Uncaught TypeError: M is not a function
at oM.J.handleMouseOut (FrontEnd.js:1640)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:248)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
FrontEnd.js:1640 Uncaught TypeError: M is not a function
at oM.J.handleMouseOver (FrontEnd.js:1640)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:248)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
FrontEnd.js:1640 Uncaught TypeError: M is not a function
at oM.J.handleMouseOut (FrontEnd.js:1640)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:248)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
FrontEnd.js:1640 Uncaught TypeError: M is not a function
at oM.J.handleMouseOver (FrontEnd.js:1640)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:248)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
FrontEnd.js:1640 Uncaught TypeError: M is not a function
at oM.J.handleMouseOut (FrontEnd.js:1640)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:248)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
3Overview.js:56 Uncaught TypeError: Cannot read properties of undefined (reading 'prototype')
at P (Overview.js:56)
at SG.convert (FrontEnd.js:904)
at ny (FrontEnd.js:248)
at HTMLElement.iy (FrontEnd.js:125)
at HTMLElement.b (FrontEnd.js:121)
On Thu, Dec 30, 2021 at 6:56 PM Harbs <ha...@gmail.com>> wrote:
1. I’d get rid of the agressive minification options. It will likely cause issues. If you get it to work without those options, you can try to add them back in and see if it still works.
2. You seem to be missing the compiler options explained here: https://apache.github.io/royale-docs/features/modules#minification<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapache.github.io%2Froyale-docs%2Ffeatures%2Fmodules%23minification&data=04%7C01%7Caharui%40adobe.com%7Cdd6290cd9b114da9fecb08d9cf08a533%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637768458309339818%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=zi%2BolXHpiXpiAb7nVvV9VmZK%2B%2FfhBtXJTcyg%2Bb7dApA%3D&reserved=0>
For a pom, it would look something like this (adjust your paths to match your setup):
Main app:
<additionalCompilerOptions>-source-map=true;-js-compiler-option=--variable_map_output_file gccvars.txt;-js-compiler-option+=--property_map_output_file gccprops.txt</additionalCompilerOptions>
Module:
<additionalCompilerOptions>-source-map=true;-js-compiler-option=--variable_map_input_file ../../../../../MainApp/bin/js-release/gccvars.txt;-js-compiler-option+=--property_map_input_file ../../../../../MainApp/bin/js-release/gccprops.txt</additionalCompilerOptions>
On Dec 30, 2021, at 7:43 PM, Roman Isitua <ro...@gmail.com>> wrote:
I think it will be better for me to share my pom's that way you can see all the compilation options used. The pom for the parent (FmClient2), the MainApp and one module (Overview) have been attached to this email.
On Thu, Dec 30, 2021 at 6:22 PM Harbs <ha...@gmail.com>> wrote:
Roman, can you share your full compiler options?
I decided to remove the below settings completely
-export-public-symbols=false
-prevent-rename-protected-symbols=false
-prevent-rename-public-symbols=false
-prevent-rename-internal-symbols=false
I enabled the below settings
-js-dynamic-access-unknown-members=true;
-js-default-initializers=true
The release version starts up
Hiedra, that’s great!
On Dec 30, 2021, at 7:15 PM, Roman Isitua <ro...@gmail.com>> wrote:
Yes. I am testing with the sdk compiled on branch ROYALE_INTERFACE_INFO
On Thu, Dec 30, 2021 at 6:10 PM Maria Jose Esteve <mj...@iest.com>> wrote:
Roman, are you testing with the SDK compiled from the Harb branches, ROYALE_INTERFACE_INFO, or from develop?
Hiedra
De: Roman Isitua <ro...@gmail.com>>
Enviado el: jueves, 30 de diciembre de 2021 16:52
Para: users@royale.apache.org<ma...@royale.apache.org>
Asunto: Re: Compiling Modules (was Re: Load time is very slow)
I decided to remove the below settings completely
-export-public-symbols=false
-prevent-rename-protected-symbols=false
-prevent-rename-public-symbols=false
-prevent-rename-internal-symbols=false
I enabled the below settings
-js-dynamic-access-unknown-members=true;
-js-default-initializers=true
The release version starts up
<image001.png>
<image002.png>
However, the moment I launch a module. I get the below error
<image003.png>
It appears to be failing when I launch the "Overview" module (by clicking the Overview side menu).
So my current observation is that by retaining only two settings
-js-dynamic-access-unknown-members=true;
-js-default-initializers=true
The release module starts up but the app fails whenever I launch a module.
The smallest size settings in the documentation do not work. The app does not start up.
-export-public-symbols=false
-prevent-rename-protected-symbols=false
-prevent-rename-public-symbols=false
-prevent-rename-internal-symbols=false
The error trace is below
Uncaught TypeError: cm.valuesImpl.init is not a function
at Wr.Rr.pl<https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwr.rr.pl%2F&data=04%7C01%7Caharui%40adobe.com%7Cdd6290cd9b114da9fecb08d9cf08a533%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637768458309339818%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=nUd%2FKIFQUcqEa%2FILosAXEeWi5u7bN64ok%2BKxExE63DM%3D&reserved=0> (Overview.js:792)
at Function.mq.generateMXMLProperties (Overview.js:743)
at Wr.lq.generateMXMLAttributes (Overview.js:551)
at new Wr (Overview.js:810)
at QN.J.loadHandler (FrontEnd.js:1978)
3Overview.js:56 Uncaught TypeError: Cannot read properties of undefined (reading 'prototype')
at P (Overview.js:56)
at VG.convert (FrontEnd.js:910)
at ny (FrontEnd.js:250)
at HTMLElement.iy (FrontEnd.js:125)
at HTMLElement.b (FrontEnd.js:121)
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOut (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOver (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOver @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOut (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOut @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOver (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOver @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOut (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOut @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOver (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOver @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOut (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOut @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOver (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOver @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOut (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOut @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
On Thu, Dec 30, 2021 at 4:32 PM Roman Isitua <ro...@gmail.com>> wrote:
I get the same error even when I set the -js-dynamic-access-unknown-members=true;
On Thu, Dec 30, 2021 at 4:24 PM Roman Isitua <ro...@gmail.com>> wrote:
Using the below settings,
-export-public-symbols=false
-prevent-rename-protected-symbols=false
-prevent-rename-public-symbols=false
-prevent-rename-internal-symbols=false
-js-dynamic-access-unknown-members=false;
-js-default-initializers=true
Debug version runs fine. The release version does not start up
<image004.png>
I get the below errors
Uncaught TypeError: Cannot read properties of undefined (reading 'apply')
at KE.hm (FrontEnd.js:1600)
at XE.M.Fb (FrontEnd.js:943)
at XE.M.uh (FrontEnd.js:937)
at FE.M.na<https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Ffe.m.na%2F&data=04%7C01%7Caharui%40adobe.com%7Cdd6290cd9b114da9fecb08d9cf08a533%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637768458309339818%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=m89bpZetyvevLLdY7lVbYJ4HEtfei5M3tsjrdkxy4xo%3D&reserved=0> (FrontEnd.js:497)
at FE.M.v (FrontEnd.js:497)
at dR.M.S (FrontEnd.js:213)
at dR.Nz.S (FrontEnd.js:217)
at dR.M.start (FrontEnd.js:1396)
at index.html:45
:8080/favicon.ico:1 Failed to load resource: the server responded with a status of 404 (Not Found)
FrontEnd.js is the start up class for the application. i.e. It implements the Jewel application class.
On Thu, Dec 30, 2021 at 3:19 PM Roman Isitua <ro...@gmail.com>> wrote:
Hi Harb,
Thanks for your response. I have gone through the documentation. I will do my test again starting with the smallest size option and share my findings.
Regards,
On Thu, Dec 30, 2021 at 10:59 AM Harbs <ha...@gmail.com>> wrote:
Sorry for my deal in responding.
Let’s take a step back.
I’m not sure how you are compiling your modules. I just added some content to the module documentation page which explains what compiler options you need while compiling modules. (It still needs some editing.) https://apache.github.io/royale-docs/features/modules#minification<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapache.github.io%2Froyale-docs%2Ffeatures%2Fmodules%23minification&data=04%7C01%7Caharui%40adobe.com%7Cdd6290cd9b114da9fecb08d9cf08a533%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637768458309339818%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=zi%2BolXHpiXpiAb7nVvV9VmZK%2B%2FfhBtXJTcyg%2Bb7dApA%3D&reserved=0>
Are you using those options?
On Dec 29, 2021, at 2:19 AM, Maria Jose Esteve <mj...@iest.com>> wrote:
Hi, Let me join you with these tests....
@Harb, I have compiled the SDK from this branch, feature/ROYALE_INTERFACE_INFO, and when running in debug I get this error:
Message on the PURGE CONSOLE is displayed:
Cannot convert org.apache.royale.reflection.beads.ClassAliasBead to IBead
Message in the IDE Window:
Se produjo una excepción: TypeError: Cannot convert [object Object] to IBead
at App.org.apache.royale.core.ElementWrapper.addBead (http://localhost:8080/WNetSuitePlus/org/apache/royale/core/ElementWrapper.js:114:11)
at App.org.apache.royale.core.HTMLElementWrapper.addBead (http://localhost:8080/WNetSuitePlus/org/apache/royale/core/HTMLElementWrapper.js:43:65)
at App.org.apache.royale.jewel.Application.start (http://localhost:8080/WNetSuitePlus/org/apache/royale/jewel/Application.js:246:10)
at App.App_loadXML (http://localhost:8080/WNetSuitePlus/App.js:1681:25)
at org.apache.royale.net.URLLoader.org.apache.royale.events.EventDispatcher.fireListeners (http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:97:23)
at Function.goog.events.EventTarget.dispatchEventInternal_ (http://localhost:8080/WNetSuitePlus/library/closure/goog/events/eventtarget.js:381:26)
at org.apache.royale.net.URLLoader.org.apache.royale.events.EventDispatcher.dispatchEvent (http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:72:37)
at org.apache.royale.net.URLLoader.jsEventHandler (http://localhost:8080/WNetSuitePlus/org/apache/royale/net/URLLoader.js:169:12)
Call stack:
<image003.png>
[INFO] Executing MXMLC in tool group Royale with args: [
-load-config=D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\compile-app-config.xml,
-js-default-initializers=true,
-source-map=true,
-js-dynamic-access-unknown-members=true,
-keep-as3-metadata+=Inject,Dispatcher,EventHandler,Event,PostConstruct,PreDestroy,ViewAdded,ViewRemoved,Bindable,Transient,
-keep-code-with-metadata=Inject,
-show-binding-warnings=false,
-export-public-symbols=false,
-prevent-rename-protected-symbols=false,
-prevent-rename-internal-symbols=false,
-js-output=D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\javascript,
-compiler.targets=JSRoyale,
D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\src\main\royale\App.mxml
The release execution does not change, the error is the same as before (SDK compilation from the develop branch):
Se produjo una excepción: ReferenceError: Error #1065: Variable com.iest.winplusweb.models.MasterConfigSystemModel is not defined.
at yR (http://localhost:8080/WPWebRelease/App.js:3605:1771)
at Mya (http://localhost:8080/WPWebRelease/App.js:3343:365)
at AR.J.usa (http://localhost:8080/WPWebRelease/App.js:434:441)
at GFa.J.fromTypeDefinition (http://localhost:8080/WPWebRelease/App.js:5706:139)
at Function.YT.getTypeDescriptor (http://localhost:8080/WPWebRelease/App.js:4570:820)
at Function.fX.constructBean (http://localhost:8080/WPWebRelease/App.js:2336:472)
at r$.J.initialize (http://localhost:8080/WPWebRelease/App.js:5041:66)
at OW.J.init (http://localhost:8080/WPWebRelease/App.js:950:452)
at OW.J.u (http://localhost:8080/WPWebRelease/App.js:951:454)
at $$.J.addBead (http://localhost:8080/WPWebRelease/App.js:357:549)
The main difference:
project compiled from "SDK-develop" runs fine in js-debug and gives error in js-release and, compiled from "SDK-ROYALE_INTERFACE_INFO" does not launch because of conversion error.
Hiedra
De: Roman Isitua <ro...@gmail.com>>
Enviado el: martes, 28 de diciembre de 2021 15:55
Para: users@royale.apache.org<ma...@royale.apache.org>
Asunto: Re: Load time is very slow
@Harb
I have checked out the feature/ROYALE_INTERFACE_INFO branch and compiled asjs and compiler. I have rebuilt my application with modules in release mode.
I get the following error when I attempt to launch a module
<image001.png>
The module loads fine in debug mode
<image002.png>
Snippets of the log
Overview.js:786 Uncaught TypeError: cm.valuesImpl.init is not a function
at Rr.Mr.yl (Overview.js:786)
at Function.iq.generateMXMLProperties (Overview.js:736)
at Rr.hq.generateMXMLAttributes (Overview.js:546)
at new Rr (Overview.js:804)
at LN.J.loadHandler (FrontEnd.js:1967)
Mr.yl @ Overview.js:786
iq.generateMXMLProperties @ Overview.js:736
hq.generateMXMLAttributes @ Overview.js:546
Rr @ Overview.js:804
J.loadHandler @ FrontEnd.js:1967
load (async)
LN.loadModule @ FrontEnd.js:1965
dN.loadModule @ FrontEnd.js:2406
LD.Un @ FrontEnd.js:1809
ny @ FrontEnd.js:123
ny @ FrontEnd.js:248
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
I have attached the full log to this email.
On Tue, Dec 28, 2021 at 2:51 PM Roman Isitua <ro...@gmail.com>> wrote:
Hi Maria,
Prior to starting this mail discussion "Load time is very slow". I can confirm I have only been compiling in debug mode. My target\javascript\bin\ only had js-debug. It was after I upgraded my royale sdk from 0.9.7 to 0.9.8 that I compiled in release mode.
On Tue, Dec 28, 2021 at 2:24 PM Maria Jose Esteve <mj...@iest.com>> wrote:
Hi, @Roman, I think you are doing a double compile can it be? My times are the same as yours and I always compile in debug and release.
Look at your target folder " target\javascript\bin\" and if you have two folders: js-debug and js-release you are compiling always double.
In my case, the architecture of my project as well as the Maven compilation files (pom.xml) were provided by an external company (we didn't know anything about Maven or Royale at that time) and I understand that this formula was chosen to show us the options we had.
A priori and without doing any test as Harb has done, I think that modularity gives us the advantage of compiling parts of the code once and not compiling them again if they are not modified. So far WITH MY COMPILATION TIMES, sometimes more than 1 minute, this is fundamental. But of course, now we have the problem of minification of the modules and it is really a serious problem because it is impossible for us to deploy in production.
I will try to separate the compiación realese with a profile and if I succeed I will pass it to you @Roman.
@Harb what do you mean by compiling the ROYALE_INTERFACE_INFO branch?
Hiedra
De: Harbs <ha...@gmail.com>>
Enviado el: lunes, 27 de diciembre de 2021 18:32
Para: users@royale.apache.org<ma...@royale.apache.org>
Asunto: Re: Load time is very slow
That doesn’t sound right.
Are you sure you’re compiling debug and not release? That sounds like release build times.
On Dec 27, 2021, at 3:31 PM, Roman Isitua <ro...@gmail.com>> wrote:
Wow ! You are using a workstation with a bleeding edge processor.
I just compiled my app now. It took 44 seconds. (First compilation after ide start up.) Subsequently compilations are usually 19s to 20s.
My application code base is very very small compared to yours. As we continue to add functionality, I expect the compile times to rise.
<MainApp_pom.xml><Overview_pom.xml><fm_client2_pom.xml>
Re: Compiling Modules (was Re: Load time is very slow)
Posted by Alex Harui <ah...@adobe.com>.
The -externs-report option should be similar to the -link-report option. It takes a filename. The compiler should output the classes used in the JS compile into that file. To use externs, I think you don’t need to prevent renaming in the application as long as public variables are exported. I think you specify -externs-report when compiling the application.
You may also need to output a -link-report from the application as well.
I think you then specify the externs-report file as an -externs for the -js-compiler-options when compiling the module. And maybe also specify the -link-report output as a -load-externs in the same way it was used when compiling Flex modules. The goal for the module is, like Flex, to not have any classes in the module that exist in the main app. Then it doesn’t matter about class renaming within the release-mode JS file.
HTH,
-Alex
From: Roman Isitua <ro...@gmail.com>
Reply-To: "users@royale.apache.org" <us...@royale.apache.org>
Date: Monday, January 3, 2022 at 12:37 PM
To: "users@royale.apache.org" <us...@royale.apache.org>
Subject: Re: Compiling Modules (was Re: Load time is very slow)
I can confirm that classes are being renamed in both files.
I have attempted your suggestion i.e. removing variable maps and property maps then use
-externs-report;-export-public-symbols=true;-prevent-rename-public-symbols=true;
I get the below error
command line Error: configuration variable 'externs-report' expected 1 argument(s), got 0.
I cannot find any documentation on how to use the -externs-report argument. What does it do ? and what are the acceptable values ?
Regards,
On Sun, Jan 2, 2022 at 9:06 AM Alex Harui <ah...@adobe.com>> wrote:
Hi Roman,
It might be more complicated. The settings are probably doing something since you reported that the error occurred in the app vs the module depending on the settings.
I went back and looked at the original module example in examples/royale/ModuleExample and was surprised there weren’t more compiler settings. I thought we’d found a way to externalize the main app’s code for the module. Because if both the app and module have a copy of SimpleCSSValuesImpl or any other class that both JS files use, there could be issues as to which one gets loaded (maybe both) and what export aliases are pointing to. Sounds like changing settings affected whether the aliases pointed at module code vs app code.
I thought we were using similar settings to what we used for SWF where the module would not contain a copy of SimpleCSSValuesImpl so it would use the one loaded by the main app, but I didn’t see those settings. We might need to make that work because otherwise I think static initializations won’t do the right thing. Or maybe we’ve figured out that it is simpler just to write defensive code that doesn’t get broken. But also, if the module has its own copy of code already loaded by the main app, that’s sort of a waste of bytes. Maybe there was a minification issue with not having the module link in classes already linked into the main app. I see an -externs-report option in the compiler but the example doesn’t seem to use it.
You should be able to scan the JS files and see if a class is in both module and app and if it is getting renamed.
I don’t know if I will have time to investigate further. The currently recommended options for modules involving variable maps and property maps may need to be abandoned in favor of externs and preventing renames.
-Alex
From: Roman Isitua <ro...@gmail.com>>
Reply-To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Date: Saturday, January 1, 2022 at 3:02 AM
To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Subject: Re: Compiling Modules (was Re: Load time is very slow)
Alex, thank you for your detailed analysis of the error log.
I agree with you that the best strategy is to prevent renaming of public/exports used by the module. I have tried different options to prevent renaming
It appears none of them stops this. From my observation, it appears that this default options below
-export-public-symbols=true;-prevent-rename-public-symbols=true;-prevent-rename-public-instance-accessors=true;
Only seem to affect the main application (main module) but have no effect on the other modules even though I ensured they were applied in their respective module pom. I came to this conclusion when I decided to turn set -prevent-rename-public-symbols=false
I noticed that I got the same error but this time around in the main module.
Uncaught TypeError: this.rb[(intermediate value).Kd(...)] is not a function
at HN.iI.send (FrontEnd.js:970)
at nI.EH.Ea (FrontEnd.js:880)
at ON.q6 (FrontEnd.js:1815)
at TN.L2 (FrontEnd.js:2034)
at hF.Xf (FrontEnd.js:2063)
at lF.kb (FrontEnd.js:1233)
at lF.Vf (FrontEnd.js:1224)
at cF.O (FrontEnd.js:659)
at cF.M.w (FrontEnd.js:661)
at gQ.mA.M (FrontEnd.js:241)
FrontEnd.js maps to FrontEnd.as in my application and is the entry point of the application. This confirms that -prevent-rename-public-symbols=false has
an effect on the main module but no effect on other modules even though they were applied in the respective module pom's.
Maybe there are other options I am overlooking.
On Sat, Jan 1, 2022 at 9:31 AM Alex Harui <ah...@adobe.com>> wrote:
In case it helps, the minification (variable renaming) mechanism is essentially guaranteed to cause problems in modules. The Closure Compiler basically takes variables, sees if it is worth renaming it, then gives it the name ‘a’, then ‘b’, and so-on, (it skips a few letters, IIRC), then moves on to ‘aa’, and ‘ab’, etc. The odds that the compiler will encounter the same variables in the same order when compiling an app and one or more modules is close to zero.
I did some work to try to dump the mapping of the renamed variables in the main app and use that when compiling the modules. It was working for a while, then some code was added to the framework that started fooling the Closure Compiler. I spent some time trying to fix the Closure Compiler, but ran out of time. Meanwhile, Josh was adding more control over renaming so I moved on to other things.
IMO, the best strategy to take would be to try to control what gets renamed. All public/exports from the app that are used by the module should not be renamed. That will definitely make the app and modules bigger, but unless the Closure Compiler folks become interested in runtime-loaded modules, it is challenging for the Royale compiler to allow aggressive renaming.
I think what is going on with the exceptions below is that exporting doesn’t really prevent renaming. It only sets up an externally-visible alias to a renamed variable. Especially for static members. So it isn’t sufficient to export public variables, the code within the module must not let the Closure Compiler think that the intra-module references can be renamed, in this case, from SimpleCSSValuesImpl to QI
I don’t know the renaming options we’ve added to the Royale Compiler, so I don’t know if there is an option to control that. I think there is a way to convince the Closure Compiler to not rename SimpleCSSValuesImpl because I’ve seen other class names not get renamed.
HTH,
-Alex
From: Roman Isitua <ro...@gmail.com>>
Reply-To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Date: Friday, December 31, 2021 at 10:42 AM
To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Subject: Re: Compiling Modules (was Re: Load time is very slow)
I have tested on both. The error log is the same.
I don't understand your second question. Kindly clarify ?
I followed strictly the approach used for loading modules here in this example.
This is the only method I know for loading modules. If there is another method please share.
https://royale.apache.org/dividing-an-apache-royale-application-with-modules/<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Froyale.apache.org%2Fdividing-an-apache-royale-application-with-modules%2F&data=04%7C01%7Caharui%40adobe.com%7C80e01d235d69484f1d5b08d9cef8dc4a%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637768390529991330%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=YjlZww%2Bxrz9oj%2Fn7f3lwTmO7tzl8ylN45rbuUz2qA8U%3D&reserved=0>
On Fri, 31 Dec 2021, 19:14 Maria Jose Esteve, <mj...@iest.com>> wrote:
@Roman, which branch did you compile the SDK from, ROYALE_INTERFACE_INFO or develop?
Could you pass the Overview.mxml view to the main application? (to rule it out)
Hiedra
De: Roman Isitua <ro...@gmail.com>>
Enviado el: viernes, 31 de diciembre de 2021 17:56
Para: users@royale.apache.org<ma...@royale.apache.org>
Asunto: Re: Compiling Modules (was Re: Load time is very slow)
I have tried tracing where the errors are happening whenever I test the release version
Uncaught TypeError: Ql.valuesImpl.init is not a function
at Hr.Cr.um (Overview.js:846)
at Function.ep.generateMXMLProperties (Overview.js:795)
at Hr.Sp.generateMXMLAttributes (Overview.js:599)
at new Hr (Overview.js:864)
at PN.M.loadHandler (FrontEnd.js:2042)
9Overview.js:173 Uncaught TypeError: this.createElement is not a function
at $B.V (Overview.js:173)
at new $B (FrontEnd.js:2430)
at EP.convert (FrontEnd.js:2430)
at Zy (FrontEnd.js:261)
at HTMLAnchorElement.Uy (FrontEnd.js:121)
at HTMLAnchorElement.Sy.b (FrontEnd.js:117)
The highlighted code in red is declared as follows in the Overview.mxml (maven module)
<j:valuesImpl>
<js:SimpleCSSValuesImpl/>
</j:valuesImpl>
The j:valuesImpl points to the following code in jewel Module.js
/**
* @nocollapse
* @export
* @type {org.apache.royale.core.IValuesImpl}
*/
org.apache.royale.jewel.Module.prototype.valuesImpl;
org.apache.royale.jewel.Module.prototype.set__valuesImpl = function(value) {
org.apache.royale.core.ValuesManager.valuesImpl.init(this);
};
it appears this function is improperly renamed and whenever the app tries to load the module is not able to recognise it as a function.
The same issue of improper function renaming is happening in the second error as well
9Overview.js:173 Uncaught TypeError: this.createElement is not a function
On Thu, Dec 30, 2021 at 10:42 PM Roman Isitua <ro...@gmail.com>> wrote:
I have applied the js compiler option as follows
<additionalCompilerOptions>-source-map=false;-compiler.show-binding-warnings=false;-js-default-initializers=true;-js-dynamic-access-unknown-members=true;
-js-compiler-option=--variable_map_output_file gccvars.txt;-js-compiler-option+=--property_map_output_file gccprops.txt
</additionalCompilerOptions>
I get the same error as before when attempting to launch the jewel module.
Error! Filename not specified.
Same error trace.
Uncaught TypeError: cm.valuesImpl.init is not a function
at Rr.Mr.yl (Overview.js:786)
at Function.iq.generateMXMLProperties (Overview.js:736)
at Rr.hq.generateMXMLAttributes (Overview.js:546)
at new Rr (Overview.js:804)
at LN.J.loadHandler (FrontEnd.js:1967)
FrontEnd.js:1640 Uncaught TypeError: M is not a function
at oM.J.handleMouseOut (FrontEnd.js:1640)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:248)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
FrontEnd.js:1640 Uncaught TypeError: M is not a function
at oM.J.handleMouseOver (FrontEnd.js:1640)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:248)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
FrontEnd.js:1640 Uncaught TypeError: M is not a function
at oM.J.handleMouseOut (FrontEnd.js:1640)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:248)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
FrontEnd.js:1640 Uncaught TypeError: M is not a function
at oM.J.handleMouseOver (FrontEnd.js:1640)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:248)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
FrontEnd.js:1640 Uncaught TypeError: M is not a function
at oM.J.handleMouseOut (FrontEnd.js:1640)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:248)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
FrontEnd.js:1640 Uncaught TypeError: M is not a function
at oM.J.handleMouseOver (FrontEnd.js:1640)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:248)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
FrontEnd.js:1640 Uncaught TypeError: M is not a function
at oM.J.handleMouseOut (FrontEnd.js:1640)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:248)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
3Overview.js:56 Uncaught TypeError: Cannot read properties of undefined (reading 'prototype')
at P (Overview.js:56)
at SG.convert (FrontEnd.js:904)
at ny (FrontEnd.js:248)
at HTMLElement.iy (FrontEnd.js:125)
at HTMLElement.b (FrontEnd.js:121)
On Thu, Dec 30, 2021 at 6:56 PM Harbs <ha...@gmail.com>> wrote:
1. I’d get rid of the agressive minification options. It will likely cause issues. If you get it to work without those options, you can try to add them back in and see if it still works.
2. You seem to be missing the compiler options explained here: https://apache.github.io/royale-docs/features/modules#minification<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapache.github.io%2Froyale-docs%2Ffeatures%2Fmodules%23minification&data=04%7C01%7Caharui%40adobe.com%7C80e01d235d69484f1d5b08d9cef8dc4a%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637768390529991330%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=Rh6LYZnUWqkTA%2BvIjrNtdmPvK6g6s5koLXqe8MXHOQE%3D&reserved=0>
For a pom, it would look something like this (adjust your paths to match your setup):
Main app:
<additionalCompilerOptions>-source-map=true;-js-compiler-option=--variable_map_output_file gccvars.txt;-js-compiler-option+=--property_map_output_file gccprops.txt</additionalCompilerOptions>
Module:
<additionalCompilerOptions>-source-map=true;-js-compiler-option=--variable_map_input_file ../../../../../MainApp/bin/js-release/gccvars.txt;-js-compiler-option+=--property_map_input_file ../../../../../MainApp/bin/js-release/gccprops.txt</additionalCompilerOptions>
On Dec 30, 2021, at 7:43 PM, Roman Isitua <ro...@gmail.com>> wrote:
I think it will be better for me to share my pom's that way you can see all the compilation options used. The pom for the parent (FmClient2), the MainApp and one module (Overview) have been attached to this email.
On Thu, Dec 30, 2021 at 6:22 PM Harbs <ha...@gmail.com>> wrote:
Roman, can you share your full compiler options?
I decided to remove the below settings completely
-export-public-symbols=false
-prevent-rename-protected-symbols=false
-prevent-rename-public-symbols=false
-prevent-rename-internal-symbols=false
I enabled the below settings
-js-dynamic-access-unknown-members=true;
-js-default-initializers=true
The release version starts up
Hiedra, that’s great!
On Dec 30, 2021, at 7:15 PM, Roman Isitua <ro...@gmail.com>> wrote:
Yes. I am testing with the sdk compiled on branch ROYALE_INTERFACE_INFO
On Thu, Dec 30, 2021 at 6:10 PM Maria Jose Esteve <mj...@iest.com>> wrote:
Roman, are you testing with the SDK compiled from the Harb branches, ROYALE_INTERFACE_INFO, or from develop?
Hiedra
De: Roman Isitua <ro...@gmail.com>>
Enviado el: jueves, 30 de diciembre de 2021 16:52
Para: users@royale.apache.org<ma...@royale.apache.org>
Asunto: Re: Compiling Modules (was Re: Load time is very slow)
I decided to remove the below settings completely
-export-public-symbols=false
-prevent-rename-protected-symbols=false
-prevent-rename-public-symbols=false
-prevent-rename-internal-symbols=false
I enabled the below settings
-js-dynamic-access-unknown-members=true;
-js-default-initializers=true
The release version starts up
<image001.png>
<image002.png>
However, the moment I launch a module. I get the below error
<image003.png>
It appears to be failing when I launch the "Overview" module (by clicking the Overview side menu).
So my current observation is that by retaining only two settings
-js-dynamic-access-unknown-members=true;
-js-default-initializers=true
The release module starts up but the app fails whenever I launch a module.
The smallest size settings in the documentation do not work. The app does not start up.
-export-public-symbols=false
-prevent-rename-protected-symbols=false
-prevent-rename-public-symbols=false
-prevent-rename-internal-symbols=false
The error trace is below
Uncaught TypeError: cm.valuesImpl.init is not a function
at Wr.Rr.pl<https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwr.rr.pl%2F&data=04%7C01%7Caharui%40adobe.com%7C80e01d235d69484f1d5b08d9cef8dc4a%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637768390529991330%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=rwfUL1HhlNr1vf9V19OLiiRl6hyyk8vPcwjKiUi7fBY%3D&reserved=0> (Overview.js:792)
at Function.mq.generateMXMLProperties (Overview.js:743)
at Wr.lq.generateMXMLAttributes (Overview.js:551)
at new Wr (Overview.js:810)
at QN.J.loadHandler (FrontEnd.js:1978)
3Overview.js:56 Uncaught TypeError: Cannot read properties of undefined (reading 'prototype')
at P (Overview.js:56)
at VG.convert (FrontEnd.js:910)
at ny (FrontEnd.js:250)
at HTMLElement.iy (FrontEnd.js:125)
at HTMLElement.b (FrontEnd.js:121)
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOut (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOver (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOver @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOut (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOut @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOver (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOver @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOut (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOut @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOver (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOver @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOut (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOut @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOver (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOver @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOut (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOut @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
On Thu, Dec 30, 2021 at 4:32 PM Roman Isitua <ro...@gmail.com>> wrote:
I get the same error even when I set the -js-dynamic-access-unknown-members=true;
On Thu, Dec 30, 2021 at 4:24 PM Roman Isitua <ro...@gmail.com>> wrote:
Using the below settings,
-export-public-symbols=false
-prevent-rename-protected-symbols=false
-prevent-rename-public-symbols=false
-prevent-rename-internal-symbols=false
-js-dynamic-access-unknown-members=false;
-js-default-initializers=true
Debug version runs fine. The release version does not start up
<image004.png>
I get the below errors
Uncaught TypeError: Cannot read properties of undefined (reading 'apply')
at KE.hm (FrontEnd.js:1600)
at XE.M.Fb (FrontEnd.js:943)
at XE.M.uh (FrontEnd.js:937)
at FE.M.na<https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Ffe.m.na%2F&data=04%7C01%7Caharui%40adobe.com%7C80e01d235d69484f1d5b08d9cef8dc4a%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637768390529991330%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=9%2F60HStQz320A6hmliSQNHfO9d7xpJS9b2Jm0GF4Oic%3D&reserved=0> (FrontEnd.js:497)
at FE.M.v (FrontEnd.js:497)
at dR.M.S (FrontEnd.js:213)
at dR.Nz.S (FrontEnd.js:217)
at dR.M.start (FrontEnd.js:1396)
at index.html:45
:8080/favicon.ico:1 Failed to load resource: the server responded with a status of 404 (Not Found)
FrontEnd.js is the start up class for the application. i.e. It implements the Jewel application class.
On Thu, Dec 30, 2021 at 3:19 PM Roman Isitua <ro...@gmail.com>> wrote:
Hi Harb,
Thanks for your response. I have gone through the documentation. I will do my test again starting with the smallest size option and share my findings.
Regards,
On Thu, Dec 30, 2021 at 10:59 AM Harbs <ha...@gmail.com>> wrote:
Sorry for my deal in responding.
Let’s take a step back.
I’m not sure how you are compiling your modules. I just added some content to the module documentation page which explains what compiler options you need while compiling modules. (It still needs some editing.) https://apache.github.io/royale-docs/features/modules#minification<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapache.github.io%2Froyale-docs%2Ffeatures%2Fmodules%23minification&data=04%7C01%7Caharui%40adobe.com%7C80e01d235d69484f1d5b08d9cef8dc4a%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637768390529991330%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=Rh6LYZnUWqkTA%2BvIjrNtdmPvK6g6s5koLXqe8MXHOQE%3D&reserved=0>
Are you using those options?
On Dec 29, 2021, at 2:19 AM, Maria Jose Esteve <mj...@iest.com>> wrote:
Hi, Let me join you with these tests....
@Harb, I have compiled the SDK from this branch, feature/ROYALE_INTERFACE_INFO, and when running in debug I get this error:
Message on the PURGE CONSOLE is displayed:
Cannot convert org.apache.royale.reflection.beads.ClassAliasBead to IBead
Message in the IDE Window:
Se produjo una excepción: TypeError: Cannot convert [object Object] to IBead
at App.org.apache.royale.core.ElementWrapper.addBead (http://localhost:8080/WNetSuitePlus/org/apache/royale/core/ElementWrapper.js:114:11)
at App.org.apache.royale.core.HTMLElementWrapper.addBead (http://localhost:8080/WNetSuitePlus/org/apache/royale/core/HTMLElementWrapper.js:43:65)
at App.org.apache.royale.jewel.Application.start (http://localhost:8080/WNetSuitePlus/org/apache/royale/jewel/Application.js:246:10)
at App.App_loadXML (http://localhost:8080/WNetSuitePlus/App.js:1681:25)
at org.apache.royale.net.URLLoader.org.apache.royale.events.EventDispatcher.fireListeners (http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:97:23)
at Function.goog.events.EventTarget.dispatchEventInternal_ (http://localhost:8080/WNetSuitePlus/library/closure/goog/events/eventtarget.js:381:26)
at org.apache.royale.net.URLLoader.org.apache.royale.events.EventDispatcher.dispatchEvent (http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:72:37)
at org.apache.royale.net.URLLoader.jsEventHandler (http://localhost:8080/WNetSuitePlus/org/apache/royale/net/URLLoader.js:169:12)
Call stack:
<image003.png>
[INFO] Executing MXMLC in tool group Royale with args: [
-load-config=D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\compile-app-config.xml,
-js-default-initializers=true,
-source-map=true,
-js-dynamic-access-unknown-members=true,
-keep-as3-metadata+=Inject,Dispatcher,EventHandler,Event,PostConstruct,PreDestroy,ViewAdded,ViewRemoved,Bindable,Transient,
-keep-code-with-metadata=Inject,
-show-binding-warnings=false,
-export-public-symbols=false,
-prevent-rename-protected-symbols=false,
-prevent-rename-internal-symbols=false,
-js-output=D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\javascript,
-compiler.targets=JSRoyale,
D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\src\main\royale\App.mxml
The release execution does not change, the error is the same as before (SDK compilation from the develop branch):
Se produjo una excepción: ReferenceError: Error #1065: Variable com.iest.winplusweb.models.MasterConfigSystemModel is not defined.
at yR (http://localhost:8080/WPWebRelease/App.js:3605:1771)
at Mya (http://localhost:8080/WPWebRelease/App.js:3343:365)
at AR.J.usa (http://localhost:8080/WPWebRelease/App.js:434:441)
at GFa.J.fromTypeDefinition (http://localhost:8080/WPWebRelease/App.js:5706:139)
at Function.YT.getTypeDescriptor (http://localhost:8080/WPWebRelease/App.js:4570:820)
at Function.fX.constructBean (http://localhost:8080/WPWebRelease/App.js:2336:472)
at r$.J.initialize (http://localhost:8080/WPWebRelease/App.js:5041:66)
at OW.J.init (http://localhost:8080/WPWebRelease/App.js:950:452)
at OW.J.u (http://localhost:8080/WPWebRelease/App.js:951:454)
at $$.J.addBead (http://localhost:8080/WPWebRelease/App.js:357:549)
The main difference:
project compiled from "SDK-develop" runs fine in js-debug and gives error in js-release and, compiled from "SDK-ROYALE_INTERFACE_INFO" does not launch because of conversion error.
Hiedra
De: Roman Isitua <ro...@gmail.com>>
Enviado el: martes, 28 de diciembre de 2021 15:55
Para: users@royale.apache.org<ma...@royale.apache.org>
Asunto: Re: Load time is very slow
@Harb
I have checked out the feature/ROYALE_INTERFACE_INFO branch and compiled asjs and compiler. I have rebuilt my application with modules in release mode.
I get the following error when I attempt to launch a module
<image001.png>
The module loads fine in debug mode
<image002.png>
Snippets of the log
Overview.js:786 Uncaught TypeError: cm.valuesImpl.init is not a function
at Rr.Mr.yl (Overview.js:786)
at Function.iq.generateMXMLProperties (Overview.js:736)
at Rr.hq.generateMXMLAttributes (Overview.js:546)
at new Rr (Overview.js:804)
at LN.J.loadHandler (FrontEnd.js:1967)
Mr.yl @ Overview.js:786
iq.generateMXMLProperties @ Overview.js:736
hq.generateMXMLAttributes @ Overview.js:546
Rr @ Overview.js:804
J.loadHandler @ FrontEnd.js:1967
load (async)
LN.loadModule @ FrontEnd.js:1965
dN.loadModule @ FrontEnd.js:2406
LD.Un @ FrontEnd.js:1809
ny @ FrontEnd.js:123
ny @ FrontEnd.js:248
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
I have attached the full log to this email.
On Tue, Dec 28, 2021 at 2:51 PM Roman Isitua <ro...@gmail.com>> wrote:
Hi Maria,
Prior to starting this mail discussion "Load time is very slow". I can confirm I have only been compiling in debug mode. My target\javascript\bin\ only had js-debug. It was after I upgraded my royale sdk from 0.9.7 to 0.9.8 that I compiled in release mode.
On Tue, Dec 28, 2021 at 2:24 PM Maria Jose Esteve <mj...@iest.com>> wrote:
Hi, @Roman, I think you are doing a double compile can it be? My times are the same as yours and I always compile in debug and release.
Look at your target folder " target\javascript\bin\" and if you have two folders: js-debug and js-release you are compiling always double.
In my case, the architecture of my project as well as the Maven compilation files (pom.xml) were provided by an external company (we didn't know anything about Maven or Royale at that time) and I understand that this formula was chosen to show us the options we had.
A priori and without doing any test as Harb has done, I think that modularity gives us the advantage of compiling parts of the code once and not compiling them again if they are not modified. So far WITH MY COMPILATION TIMES, sometimes more than 1 minute, this is fundamental. But of course, now we have the problem of minification of the modules and it is really a serious problem because it is impossible for us to deploy in production.
I will try to separate the compiación realese with a profile and if I succeed I will pass it to you @Roman.
@Harb what do you mean by compiling the ROYALE_INTERFACE_INFO branch?
Hiedra
De: Harbs <ha...@gmail.com>>
Enviado el: lunes, 27 de diciembre de 2021 18:32
Para: users@royale.apache.org<ma...@royale.apache.org>
Asunto: Re: Load time is very slow
That doesn’t sound right.
Are you sure you’re compiling debug and not release? That sounds like release build times.
On Dec 27, 2021, at 3:31 PM, Roman Isitua <ro...@gmail.com>> wrote:
Wow ! You are using a workstation with a bleeding edge processor.
I just compiled my app now. It took 44 seconds. (First compilation after ide start up.) Subsequently compilations are usually 19s to 20s.
My application code base is very very small compared to yours. As we continue to add functionality, I expect the compile times to rise.
<MainApp_pom.xml><Overview_pom.xml><fm_client2_pom.xml>
Re: Compiling Modules (was Re: Load time is very slow)
Posted by Roman Isitua <ro...@gmail.com>.
I can confirm that classes are being renamed in both files.
I have attempted your suggestion i.e. removing variable maps and property
maps then use
-externs-report;-export-public-symbols=true;-prevent-rename-public-symbols=true;
I get the below error
command line Error: configuration variable 'externs-report' expected 1
argument(s), got 0.
I cannot find any documentation on how to use the -externs-report argument.
What does it do ? and what are the acceptable values ?
Regards,
On Sun, Jan 2, 2022 at 9:06 AM Alex Harui <ah...@adobe.com> wrote:
> Hi Roman,
>
>
>
> It might be more complicated. The settings are probably doing something
> since you reported that the error occurred in the app vs the module
> depending on the settings.
>
>
>
> I went back and looked at the original module example in
> examples/royale/ModuleExample and was surprised there weren’t more compiler
> settings. I thought we’d found a way to externalize the main app’s code
> for the module. Because if both the app and module have a copy of
> SimpleCSSValuesImpl or any other class that both JS files use, there could
> be issues as to which one gets loaded (maybe both) and what export aliases
> are pointing to. Sounds like changing settings affected whether the
> aliases pointed at module code vs app code.
>
>
>
> I thought we were using similar settings to what we used for SWF where the
> module would not contain a copy of SimpleCSSValuesImpl so it would use the
> one loaded by the main app, but I didn’t see those settings. We might need
> to make that work because otherwise I think static initializations won’t do
> the right thing. Or maybe we’ve figured out that it is simpler just to
> write defensive code that doesn’t get broken. But also, if the module has
> its own copy of code already loaded by the main app, that’s sort of a waste
> of bytes. Maybe there was a minification issue with not having the module
> link in classes already linked into the main app. I see an -externs-report
> option in the compiler but the example doesn’t seem to use it.
>
>
>
> You should be able to scan the JS files and see if a class is in both
> module and app and if it is getting renamed.
>
>
>
> I don’t know if I will have time to investigate further. The currently
> recommended options for modules involving variable maps and property maps
> may need to be abandoned in favor of externs and preventing renames.
>
>
>
> -Alex
>
>
>
>
>
> *From: *Roman Isitua <ro...@gmail.com>
> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Date: *Saturday, January 1, 2022 at 3:02 AM
> *To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Subject: *Re: Compiling Modules (was Re: Load time is very slow)
>
>
>
> Alex, thank you for your detailed analysis of the error log.
>
>
>
> I agree with you that the best strategy is to prevent renaming of
> public/exports used by the module. I have tried different options to
> prevent renaming
>
> It appears none of them stops this. From my observation, it appears that
> this default options below
>
>
>
>
> -export-public-symbols=true;-prevent-rename-public-symbols=true;-prevent-rename-public-instance-accessors=true;
>
>
>
> Only seem to affect the main application (main module) but have no effect
> on the other modules even though I ensured they were applied in
> their respective module pom. I came to this conclusion when I decided to
> turn set -prevent-rename-public-symbols=false
>
>
>
> I noticed that I got the same error but this time around in the main
> module.
>
>
>
> Uncaught TypeError: this.rb[(intermediate value).Kd(...)] is not a function
> at HN.iI.send (FrontEnd.js:970)
> at nI.EH.Ea (FrontEnd.js:880)
> at ON.q6 (FrontEnd.js:1815)
> at TN.L2 (FrontEnd.js:2034)
> at hF.Xf (FrontEnd.js:2063)
> at lF.kb (FrontEnd.js:1233)
> at lF.Vf (FrontEnd.js:1224)
> at cF.O (FrontEnd.js:659)
> at cF.M.w (FrontEnd.js:661)
> at gQ.mA.M (FrontEnd.js:241)
>
>
>
> FrontEnd.js maps to FrontEnd.as in my application and is the entry point
> of the application. This confirms that -prevent-rename-public-symbols=false
> has
>
> an effect on the main module but no effect on other modules even though
> they were applied in the respective module pom's.
>
>
>
> Maybe there are other options I am overlooking.
>
>
>
> On Sat, Jan 1, 2022 at 9:31 AM Alex Harui <ah...@adobe.com> wrote:
>
> In case it helps, the minification (variable renaming) mechanism is
> essentially guaranteed to cause problems in modules. The Closure Compiler
> basically takes variables, sees if it is worth renaming it, then gives it
> the name ‘a’, then ‘b’, and so-on, (it skips a few letters, IIRC), then
> moves on to ‘aa’, and ‘ab’, etc. The odds that the compiler will encounter
> the same variables in the same order when compiling an app and one or more
> modules is close to zero.
>
>
>
> I did some work to try to dump the mapping of the renamed variables in the
> main app and use that when compiling the modules. It was working for a
> while, then some code was added to the framework that started fooling the
> Closure Compiler. I spent some time trying to fix the Closure Compiler,
> but ran out of time. Meanwhile, Josh was adding more control over renaming
> so I moved on to other things.
>
>
>
> IMO, the best strategy to take would be to try to control what gets
> renamed. All public/exports from the app that are used by the module
> should not be renamed. That will definitely make the app and modules
> bigger, but unless the Closure Compiler folks become interested in
> runtime-loaded modules, it is challenging for the Royale compiler to allow
> aggressive renaming.
>
>
>
> I think what is going on with the exceptions below is that exporting
> doesn’t really prevent renaming. It only sets up an externally-visible
> alias to a renamed variable. Especially for static members. So it isn’t
> sufficient to export public variables, the code within the module must not
> let the Closure Compiler think that the intra-module references can be
> renamed, in this case, from SimpleCSSValuesImpl to QI
>
>
>
> I don’t know the renaming options we’ve added to the Royale Compiler, so I
> don’t know if there is an option to control that. I think there is a way
> to convince the Closure Compiler to not rename SimpleCSSValuesImpl because
> I’ve seen other class names not get renamed.
>
>
>
> HTH,
>
> -Alex
>
>
>
> *From: *Roman Isitua <ro...@gmail.com>
> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Date: *Friday, December 31, 2021 at 10:42 AM
> *To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Subject: *Re: Compiling Modules (was Re: Load time is very slow)
>
>
>
> I have tested on both. The error log is the same.
>
>
>
> I don't understand your second question. Kindly clarify ?
>
>
>
>
>
> I followed strictly the approach used for loading modules here in this
> example.
>
> This is the only method I know for loading modules. If there is another
> method please share.
>
>
>
>
>
>
> https://royale.apache.org/dividing-an-apache-royale-application-with-modules/
> <https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Froyale.apache.org%2Fdividing-an-apache-royale-application-with-modules%2F&data=04%7C01%7Caharui%40adobe.com%7Cbb4c911ab5664808355908d9cd1630b7%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637766317469204767%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=gHQ7%2FCyT%2FRTRqbf7fE7MonqFK8QHhWMC5KbOuly2DcI%3D&reserved=0>
>
>
>
> On Fri, 31 Dec 2021, 19:14 Maria Jose Esteve, <mj...@iest.com> wrote:
>
> @Roman, which branch did you compile the SDK from, ROYALE_INTERFACE_INFO
> or develop?
>
> Could you pass the Overview.mxml view to the main application? (to rule
> it out)
>
>
>
> Hiedra
>
>
>
> *De:* Roman Isitua <ro...@gmail.com>
> *Enviado el:* viernes, 31 de diciembre de 2021 17:56
> *Para:* users@royale.apache.org
> *Asunto:* Re: Compiling Modules (was Re: Load time is very slow)
>
>
>
> I have tried tracing where the errors are happening whenever I test the
> release version
>
> Uncaught TypeError: Ql.valuesImpl.init is not a function
> at Hr.Cr.um (Overview.js:846)
> at Function.ep.generateMXMLProperties (Overview.js:795)
> at Hr.Sp.generateMXMLAttributes (Overview.js:599)
> at new Hr (Overview.js:864)
> at PN.M.loadHandler (FrontEnd.js:2042)
> 9Overview.js:173 Uncaught TypeError: this.createElement is not a function
> at $B.V (Overview.js:173)
> at new $B (FrontEnd.js:2430)
> at EP.convert (FrontEnd.js:2430)
> at Zy (FrontEnd.js:261)
> at HTMLAnchorElement.Uy (FrontEnd.js:121)
> at HTMLAnchorElement.Sy.b (FrontEnd.js:117)
>
>
>
>
>
> The highlighted code in red is declared as follows in the Overview.mxml
> (maven module)
>
>
>
> <j:valuesImpl>
>
> <js:SimpleCSSValuesImpl/>
>
> </j:valuesImpl>
>
>
>
> The j:valuesImpl points to the following code in jewel Module.js
>
>
>
> /**
> * @nocollapse
> * @export
> * @type {org.apache.royale.core.IValuesImpl}
> */
> org.apache.royale.jewel.Module.prototype.valuesImpl;
>
>
> org.apache.royale.jewel.Module.prototype.set__valuesImpl = function(value)
> {
> org.apache.royale.core.ValuesManager.valuesImpl.init(this);
> };
>
>
>
>
>
> it appears this function is improperly renamed and whenever the app tries
> to load the module is not able to recognise it as a function.
>
>
>
> The same issue of improper function renaming is happening in the second
> error as well
>
>
>
> 9Overview.js:173 Uncaught TypeError: this.createElement is not a function
>
>
>
>
>
> On Thu, Dec 30, 2021 at 10:42 PM Roman Isitua <ro...@gmail.com>
> wrote:
>
>
>
> I have applied the js compiler option as follows
>
>
>
>
> <additionalCompilerOptions>-source-map=false;-compiler.show-binding-warnings=false;-js-default-initializers=true;-js-dynamic-access-unknown-members=true;
> -js-compiler-option=--variable_map_output_file
> gccvars.txt;-js-compiler-option+=--property_map_output_file gccprops.txt
> </additionalCompilerOptions>
>
>
>
>
>
> I get the same error as before when attempting to launch the jewel module.
>
>
>
> *Error! Filename not specified.*
>
>
>
>
>
> Same error trace.
>
>
>
> Uncaught TypeError: cm.valuesImpl.init is not a function
> at Rr.Mr.yl (Overview.js:786)
> at Function.iq.generateMXMLProperties (Overview.js:736)
> at Rr.hq.generateMXMLAttributes (Overview.js:546)
> at new Rr (Overview.js:804)
> at LN.J.loadHandler (FrontEnd.js:1967)
> FrontEnd.js:1640 Uncaught TypeError: M is not a function
> at oM.J.handleMouseOut (FrontEnd.js:1640)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:248)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> FrontEnd.js:1640 Uncaught TypeError: M is not a function
> at oM.J.handleMouseOver (FrontEnd.js:1640)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:248)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> FrontEnd.js:1640 Uncaught TypeError: M is not a function
> at oM.J.handleMouseOut (FrontEnd.js:1640)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:248)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> FrontEnd.js:1640 Uncaught TypeError: M is not a function
> at oM.J.handleMouseOver (FrontEnd.js:1640)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:248)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> FrontEnd.js:1640 Uncaught TypeError: M is not a function
> at oM.J.handleMouseOut (FrontEnd.js:1640)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:248)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> FrontEnd.js:1640 Uncaught TypeError: M is not a function
> at oM.J.handleMouseOver (FrontEnd.js:1640)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:248)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> FrontEnd.js:1640 Uncaught TypeError: M is not a function
> at oM.J.handleMouseOut (FrontEnd.js:1640)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:248)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> 3Overview.js:56 Uncaught TypeError: Cannot read properties of undefined
> (reading 'prototype')
> at P (Overview.js:56)
> at SG.convert (FrontEnd.js:904)
> at ny (FrontEnd.js:248)
> at HTMLElement.iy (FrontEnd.js:125)
> at HTMLElement.b (FrontEnd.js:121)
>
>
>
> On Thu, Dec 30, 2021 at 6:56 PM Harbs <ha...@gmail.com> wrote:
>
> 1. I’d get rid of the agressive minification options. It will likely cause
> issues. If you get it to work without those options, you can try to add
> them back in and see if it still works.
>
> 2. You seem to be missing the compiler options explained here:
> https://apache.github.io/royale-docs/features/modules#minification
> <https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapache.github.io%2Froyale-docs%2Ffeatures%2Fmodules%23minification&data=04%7C01%7Caharui%40adobe.com%7Cbb4c911ab5664808355908d9cd1630b7%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637766317469204767%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=%2BbYUFfqzb4QzEkFBJp9fi0e%2FeYx7IqvtItN4slKbK38%3D&reserved=0>
>
>
>
> For a pom, it would look something like this (adjust your paths to match
> your setup):
>
>
>
> Main app:
>
> <additionalCompilerOptions>-source-map=true;-js-compiler-option=--variable_map_output_file
> gccvars.txt;-js-compiler-option+=--property_map_output_file
> gccprops.txt</additionalCompilerOptions>
>
>
>
> Module:
>
> <additionalCompilerOptions>-source-map=true;-js-compiler-option=--variable_map_input_file
> ../../../../../MainApp/bin/js-release/gccvars.txt;-js-compiler-option+=--property_map_input_file
> ../../../../../MainApp/bin/js-release/gccprops.txt</additionalCompilerOptions>
>
>
>
> On Dec 30, 2021, at 7:43 PM, Roman Isitua <ro...@gmail.com> wrote:
>
>
>
> I think it will be better for me to share my pom's that way you can see
> all the compilation options used. The pom for the parent (FmClient2), the
> MainApp and one module (Overview) have been attached to this email.
>
>
>
>
>
> On Thu, Dec 30, 2021 at 6:22 PM Harbs <ha...@gmail.com> wrote:
>
> Roman, can you share your full compiler options?
>
>
>
> I decided to remove the below settings completely
> -export-public-symbols=false
> -prevent-rename-protected-symbols=false
> -prevent-rename-public-symbols=false
> -prevent-rename-internal-symbols=false
>
>
> I enabled the below settings
>
> -js-dynamic-access-unknown-members=true;
> -js-default-initializers=true
>
>
> The release version starts up
>
>
>
> Hiedra, that’s great!
>
>
>
> On Dec 30, 2021, at 7:15 PM, Roman Isitua <ro...@gmail.com> wrote:
>
>
>
>
>
> Yes. I am testing with the sdk compiled on branch ROYALE_INTERFACE_INFO
>
>
>
> On Thu, Dec 30, 2021 at 6:10 PM Maria Jose Esteve <mj...@iest.com>
> wrote:
>
> Roman, are you testing with the SDK compiled from the Harb branches,
> ROYALE_INTERFACE_INFO, or from develop?
>
>
>
> Hiedra
>
>
>
> *De:* Roman Isitua <ro...@gmail.com>
> *Enviado el:* jueves, 30 de diciembre de 2021 16:52
> *Para:* users@royale.apache.org
> *Asunto:* Re: Compiling Modules (was Re: Load time is very slow)
>
>
>
> I decided to remove the below settings completely
> -export-public-symbols=false
> -prevent-rename-protected-symbols=false
> -prevent-rename-public-symbols=false
> -prevent-rename-internal-symbols=false
>
>
> I enabled the below settings
>
> -js-dynamic-access-unknown-members=true;
> -js-default-initializers=true
>
>
> The release version starts up
>
>
>
>
>
>
>
> <image001.png>
>
>
>
>
>
> <image002.png>
>
>
>
> However, the moment I launch a module. I get the below error
>
>
>
> <image003.png>
>
>
>
>
>
> It appears to be failing when I launch the "*Overview*" module
> (by clicking the Overview side menu).
>
>
>
> So my current observation is that by retaining only two settings
>
>
>
> -js-dynamic-access-unknown-members=true;
> -js-default-initializers=true
>
>
>
> The release module starts up but the app fails whenever I launch a module.
>
>
>
> The smallest size settings in the documentation do not work. The app does
> not start up.
>
>
>
> -export-public-symbols=false
> -prevent-rename-protected-symbols=false
> -prevent-rename-public-symbols=false
> -prevent-rename-internal-symbols=false
>
>
>
>
>
>
>
> The error trace is below
>
>
>
>
>
> Uncaught TypeError: cm.valuesImpl.init is not a function
> at Wr.Rr.pl
> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwr.rr.pl%2F&data=04%7C01%7Caharui%40adobe.com%7Cbb4c911ab5664808355908d9cd1630b7%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637766317469204767%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=eD7plf2Ay8jDRKilUhOXLH%2BK%2FvYPjI7rJh2sOUillgk%3D&reserved=0>
> (Overview.js:792)
> at Function.mq.generateMXMLProperties (Overview.js:743)
> at Wr.lq.generateMXMLAttributes (Overview.js:551)
> at new Wr (Overview.js:810)
> at QN.J.loadHandler (FrontEnd.js:1978)
> 3Overview.js:56 Uncaught TypeError: Cannot read properties of undefined
> (reading 'prototype')
> at P (Overview.js:56)
> at VG.convert (FrontEnd.js:910)
> at ny (FrontEnd.js:250)
> at HTMLElement.iy (FrontEnd.js:125)
> at HTMLElement.b (FrontEnd.js:121)
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOut (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOver (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOver @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOut (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOut @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOver (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOver @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOut (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOut @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOver (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOver @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOut (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOut @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOver (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOver @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOut (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOut @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
>
>
>
> On Thu, Dec 30, 2021 at 4:32 PM Roman Isitua <ro...@gmail.com>
> wrote:
>
> I get the same error even when I set
> the -js-dynamic-access-unknown-members=true;
>
>
>
> On Thu, Dec 30, 2021 at 4:24 PM Roman Isitua <ro...@gmail.com>
> wrote:
>
>
>
> Using the below settings,
>
> -export-public-symbols=false
> -prevent-rename-protected-symbols=false
> -prevent-rename-public-symbols=false
> -prevent-rename-internal-symbols=false
> -js-dynamic-access-unknown-members=false;
>
> -js-default-initializers=true
>
>
> Debug version runs fine. The release version does not start up
>
> <image004.png>
>
>
> I get the below errors
>
> Uncaught TypeError: Cannot read properties of undefined (reading 'apply')
> at KE.hm (FrontEnd.js:1600)
> at XE.M.Fb (FrontEnd.js:943)
> at XE.M.uh (FrontEnd.js:937)
> at FE.M.na
> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Ffe.m.na%2F&data=04%7C01%7Caharui%40adobe.com%7Cbb4c911ab5664808355908d9cd1630b7%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637766317469204767%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=C2dMLjuecMOcaQ6hesLK2sXJ4uUmP1frYCqcrIbYpyI%3D&reserved=0>
> (FrontEnd.js:497)
> at FE.M.v (FrontEnd.js:497)
> at dR.M.S (FrontEnd.js:213)
> at dR.Nz.S (FrontEnd.js:217)
> at dR.M.start (FrontEnd.js:1396)
> at index.html:45
> :8080/favicon.ico:1 Failed to load resource: the server responded with a
> status of 404 (Not Found)
>
>
>
>
>
> FrontEnd.js is the start up class for the application. i.e. It implements
> the Jewel application class.
>
>
>
>
>
>
>
> On Thu, Dec 30, 2021 at 3:19 PM Roman Isitua <ro...@gmail.com>
> wrote:
>
> Hi Harb,
>
>
>
> Thanks for your response. I have gone through the documentation. I will do
> my test again starting with the smallest size option and share my findings.
>
>
>
> Regards,
>
>
>
> On Thu, Dec 30, 2021 at 10:59 AM Harbs <ha...@gmail.com> wrote:
>
> Sorry for my deal in responding.
>
>
>
> Let’s take a step back.
>
>
>
> I’m not sure how you are compiling your modules. I just added some content
> to the module documentation page which explains what compiler options you
> need while compiling modules. (It still needs some editing.)
> https://apache.github.io/royale-docs/features/modules#minification
> <https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapache.github.io%2Froyale-docs%2Ffeatures%2Fmodules%23minification&data=04%7C01%7Caharui%40adobe.com%7Cbb4c911ab5664808355908d9cd1630b7%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637766317469204767%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=%2BbYUFfqzb4QzEkFBJp9fi0e%2FeYx7IqvtItN4slKbK38%3D&reserved=0>
>
>
>
> Are you using those options?
>
>
>
> On Dec 29, 2021, at 2:19 AM, Maria Jose Esteve <mj...@iest.com> wrote:
>
>
>
> Hi, Let me join you with these tests....
>
>
>
> @Harb, I have compiled the SDK from this branch, feature/ROYALE_INTERFACE_INFO,
> and when running in debug I get this error:
>
>
>
> Message on the PURGE CONSOLE is displayed:
>
>
>
> Cannot convert org.apache.royale.reflection.beads.ClassAliasBead to IBead
>
>
>
> Message in the IDE Window:
>
>
>
> Se produjo una excepción: TypeError: Cannot convert [object Object] to
> IBead
>
> at App.org.apache.royale.core.ElementWrapper.addBead (
> http://localhost:8080/WNetSuitePlus/org/apache/royale/core/ElementWrapper.js:114:11
> )
>
> at App.org.apache.royale.core.HTMLElementWrapper.addBead (
> http://localhost:8080/WNetSuitePlus/org/apache/royale/core/HTMLElementWrapper.js:43:65
> )
>
> at App.org.apache.royale.jewel.Application.start (
> http://localhost:8080/WNetSuitePlus/org/apache/royale/jewel/Application.js:246:10
> )
>
> at App.App_loadXML (http://localhost:8080/WNetSuitePlus/App.js:1681:25
> )
>
> at
> org.apache.royale.net.URLLoader.org.apache.royale.events.EventDispatcher.fireListeners
> (
> http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:97:23
> )
>
> at Function.goog.events.EventTarget.dispatchEventInternal_ (
> http://localhost:8080/WNetSuitePlus/library/closure/goog/events/eventtarget.js:381:26
> )
>
> at
> org.apache.royale.net.URLLoader.org.apache.royale.events.EventDispatcher.dispatchEvent
> (
> http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:72:37
> )
>
> at org.apache.royale.net.URLLoader.jsEventHandler (
> http://localhost:8080/WNetSuitePlus/org/apache/royale/net/URLLoader.js:169:12
> )
>
>
>
> Call stack:
>
>
>
> <image003.png>
>
>
>
> [INFO] Executing MXMLC in tool group Royale with args: [
>
>
> -load-config=D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\compile-app-config.xml,
>
> -js-default-initializers=true,
>
> -source-map=true,
>
> -js-dynamic-access-unknown-members=true,
>
>
> -keep-as3-metadata+=Inject,Dispatcher,EventHandler,Event,PostConstruct,PreDestroy,ViewAdded,ViewRemoved,Bindable,Transient,
>
> -keep-code-with-metadata=Inject,
>
> -show-binding-warnings=false,
>
> -export-public-symbols=false,
>
> -prevent-rename-protected-symbols=false,
>
> -prevent-rename-internal-symbols=false,
>
>
> -js-output=D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\javascript,
>
> -compiler.targets=JSRoyale,
>
>
> D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\src\main\royale\App.mxml
>
>
>
>
>
> The release execution does not change, the error is the same as before
> (SDK compilation from the develop branch):
>
>
>
> Se produjo una excepción: ReferenceError: Error #1065: Variable
> com.iest.winplusweb.models.MasterConfigSystemModel is not defined.
>
> at yR (http://localhost:8080/WPWebRelease/App.js:3605:1771)
>
> at Mya (http://localhost:8080/WPWebRelease/App.js:3343:365)
>
> at AR.J.usa (http://localhost:8080/WPWebRelease/App.js:434:441)
>
> at GFa.J.fromTypeDefinition (
> http://localhost:8080/WPWebRelease/App.js:5706:139)
>
> at Function.YT.getTypeDescriptor (
> http://localhost:8080/WPWebRelease/App.js:4570:820)
>
> at Function.fX.constructBean (
> http://localhost:8080/WPWebRelease/App.js:2336:472)
>
> at r$.J.initialize (http://localhost:8080/WPWebRelease/App.js:5041:66)
>
> at OW.J.init (http://localhost:8080/WPWebRelease/App.js:950:452)
>
> at OW.J.u (http://localhost:8080/WPWebRelease/App.js:951:454)
>
> at $$.J.addBead (http://localhost:8080/WPWebRelease/App.js:357:549)
>
>
>
> The main difference:
>
> project compiled from "SDK-develop" runs fine in js-debug and gives error
> in js-release and, compiled from "SDK-ROYALE_INTERFACE_INFO" does not
> launch because of conversion error.
>
>
>
> Hiedra
>
>
>
> *De:* Roman Isitua <ro...@gmail.com>
> *Enviado el:* martes, 28 de diciembre de 2021 15:55
> *Para:* users@royale.apache.org
> *Asunto:* Re: Load time is very slow
>
>
>
> @Harb
>
>
>
> I have checked out the feature/ROYALE_INTERFACE_INFO branch and compiled
> asjs and compiler. I have rebuilt my application with modules in release
> mode.
>
>
>
> I get the following error when I attempt to launch a module
>
>
>
>
>
> <image001.png>
>
>
>
>
>
> The module loads fine in debug mode
>
>
>
> <image002.png>
>
>
>
>
>
> Snippets of the log
>
>
>
> Overview.js:786 Uncaught TypeError: cm.valuesImpl.init is not a function
> at Rr.Mr.yl (Overview.js:786)
> at Function.iq.generateMXMLProperties (Overview.js:736)
> at Rr.hq.generateMXMLAttributes (Overview.js:546)
> at new Rr (Overview.js:804)
> at LN.J.loadHandler (FrontEnd.js:1967)
> Mr.yl @ Overview.js:786
> iq.generateMXMLProperties @ Overview.js:736
> hq.generateMXMLAttributes @ Overview.js:546
> Rr @ Overview.js:804
> J.loadHandler @ FrontEnd.js:1967
> load (async)
> LN.loadModule @ FrontEnd.js:1965
> dN.loadModule @ FrontEnd.js:2406
> LD.Un @ FrontEnd.js:1809
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:248
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
>
>
>
>
>
> I have attached the full log to this email.
>
>
>
>
>
>
>
>
>
> On Tue, Dec 28, 2021 at 2:51 PM Roman Isitua <ro...@gmail.com>
> wrote:
>
> Hi Maria,
>
>
>
> Prior to starting this mail discussion "Load time is very slow". I can
> confirm I have only been compiling in debug mode. My target\javascript\bin\
> only had js-debug. It was after I upgraded my royale sdk from 0.9.7 to
> 0.9.8 that I compiled in release mode.
>
>
>
>
>
>
>
> On Tue, Dec 28, 2021 at 2:24 PM Maria Jose Esteve <mj...@iest.com>
> wrote:
>
> Hi, @Roman, I think you are doing a double compile can it be? My times are
> the same as yours and I always compile in debug and release.
>
>
>
> Look at your target folder " target\javascript\bin\" and if you have two
> folders: js-debug and js-release you are compiling always double.
>
>
>
> In my case, the architecture of my project as well as the Maven
> compilation files (pom.xml) were provided by an external company (we didn't
> know anything about Maven or Royale at that time) and I understand that
> this formula was chosen to show us the options we had.
>
>
>
> A priori and without doing any test as Harb has done, I think that
> modularity gives us the advantage of compiling parts of the code once and
> not compiling them again if they are not modified. So far WITH MY
> COMPILATION TIMES, sometimes more than 1 minute, this is fundamental. But
> of course, now we have the problem of minification of the modules and it is
> really a serious problem because it is impossible for us to deploy in
> production.
>
>
>
> I will try to separate the compiación realese with a profile and if I
> succeed I will pass it to you @Roman.
>
>
>
> @Harb what do you mean by compiling the ROYALE_INTERFACE_INFO branch?
>
>
>
> Hiedra
>
>
>
> *De:* Harbs <ha...@gmail.com>
> *Enviado el:* lunes, 27 de diciembre de 2021 18:32
> *Para:* users@royale.apache.org
> *Asunto:* Re: Load time is very slow
>
>
>
> That doesn’t sound right.
>
>
>
> Are you sure you’re compiling debug and not release? That sounds like
> release build times.
>
>
>
> On Dec 27, 2021, at 3:31 PM, Roman Isitua <ro...@gmail.com> wrote:
>
>
>
> Wow ! You are using a workstation with a bleeding edge processor.
>
>
>
> I just compiled my app now. It took 44 seconds. (First compilation after
> ide start up.) Subsequently compilations are usually 19s to 20s.
>
>
>
> My application code base is very very small compared to yours. As we
> continue to add functionality, I expect the compile times to rise.
>
>
>
>
>
>
>
>
>
> <MainApp_pom.xml><Overview_pom.xml><fm_client2_pom.xml>
>
>
>
>
Re: Compiling Modules (was Re: Load time is very slow)
Posted by Alex Harui <ah...@adobe.com>.
Hi Roman,
It might be more complicated. The settings are probably doing something since you reported that the error occurred in the app vs the module depending on the settings.
I went back and looked at the original module example in examples/royale/ModuleExample and was surprised there weren’t more compiler settings. I thought we’d found a way to externalize the main app’s code for the module. Because if both the app and module have a copy of SimpleCSSValuesImpl or any other class that both JS files use, there could be issues as to which one gets loaded (maybe both) and what export aliases are pointing to. Sounds like changing settings affected whether the aliases pointed at module code vs app code.
I thought we were using similar settings to what we used for SWF where the module would not contain a copy of SimpleCSSValuesImpl so it would use the one loaded by the main app, but I didn’t see those settings. We might need to make that work because otherwise I think static initializations won’t do the right thing. Or maybe we’ve figured out that it is simpler just to write defensive code that doesn’t get broken. But also, if the module has its own copy of code already loaded by the main app, that’s sort of a waste of bytes. Maybe there was a minification issue with not having the module link in classes already linked into the main app. I see an -externs-report option in the compiler but the example doesn’t seem to use it.
You should be able to scan the JS files and see if a class is in both module and app and if it is getting renamed.
I don’t know if I will have time to investigate further. The currently recommended options for modules involving variable maps and property maps may need to be abandoned in favor of externs and preventing renames.
-Alex
From: Roman Isitua <ro...@gmail.com>
Reply-To: "users@royale.apache.org" <us...@royale.apache.org>
Date: Saturday, January 1, 2022 at 3:02 AM
To: "users@royale.apache.org" <us...@royale.apache.org>
Subject: Re: Compiling Modules (was Re: Load time is very slow)
Alex, thank you for your detailed analysis of the error log.
I agree with you that the best strategy is to prevent renaming of public/exports used by the module. I have tried different options to prevent renaming
It appears none of them stops this. From my observation, it appears that this default options below
-export-public-symbols=true;-prevent-rename-public-symbols=true;-prevent-rename-public-instance-accessors=true;
Only seem to affect the main application (main module) but have no effect on the other modules even though I ensured they were applied in their respective module pom. I came to this conclusion when I decided to turn set -prevent-rename-public-symbols=false
I noticed that I got the same error but this time around in the main module.
Uncaught TypeError: this.rb[(intermediate value).Kd(...)] is not a function
at HN.iI.send (FrontEnd.js:970)
at nI.EH.Ea (FrontEnd.js:880)
at ON.q6 (FrontEnd.js:1815)
at TN.L2 (FrontEnd.js:2034)
at hF.Xf (FrontEnd.js:2063)
at lF.kb (FrontEnd.js:1233)
at lF.Vf (FrontEnd.js:1224)
at cF.O (FrontEnd.js:659)
at cF.M.w (FrontEnd.js:661)
at gQ.mA.M (FrontEnd.js:241)
FrontEnd.js maps to FrontEnd.as in my application and is the entry point of the application. This confirms that -prevent-rename-public-symbols=false has
an effect on the main module but no effect on other modules even though they were applied in the respective module pom's.
Maybe there are other options I am overlooking.
On Sat, Jan 1, 2022 at 9:31 AM Alex Harui <ah...@adobe.com>> wrote:
In case it helps, the minification (variable renaming) mechanism is essentially guaranteed to cause problems in modules. The Closure Compiler basically takes variables, sees if it is worth renaming it, then gives it the name ‘a’, then ‘b’, and so-on, (it skips a few letters, IIRC), then moves on to ‘aa’, and ‘ab’, etc. The odds that the compiler will encounter the same variables in the same order when compiling an app and one or more modules is close to zero.
I did some work to try to dump the mapping of the renamed variables in the main app and use that when compiling the modules. It was working for a while, then some code was added to the framework that started fooling the Closure Compiler. I spent some time trying to fix the Closure Compiler, but ran out of time. Meanwhile, Josh was adding more control over renaming so I moved on to other things.
IMO, the best strategy to take would be to try to control what gets renamed. All public/exports from the app that are used by the module should not be renamed. That will definitely make the app and modules bigger, but unless the Closure Compiler folks become interested in runtime-loaded modules, it is challenging for the Royale compiler to allow aggressive renaming.
I think what is going on with the exceptions below is that exporting doesn’t really prevent renaming. It only sets up an externally-visible alias to a renamed variable. Especially for static members. So it isn’t sufficient to export public variables, the code within the module must not let the Closure Compiler think that the intra-module references can be renamed, in this case, from SimpleCSSValuesImpl to QI
I don’t know the renaming options we’ve added to the Royale Compiler, so I don’t know if there is an option to control that. I think there is a way to convince the Closure Compiler to not rename SimpleCSSValuesImpl because I’ve seen other class names not get renamed.
HTH,
-Alex
From: Roman Isitua <ro...@gmail.com>>
Reply-To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Date: Friday, December 31, 2021 at 10:42 AM
To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Subject: Re: Compiling Modules (was Re: Load time is very slow)
I have tested on both. The error log is the same.
I don't understand your second question. Kindly clarify ?
I followed strictly the approach used for loading modules here in this example.
This is the only method I know for loading modules. If there is another method please share.
https://royale.apache.org/dividing-an-apache-royale-application-with-modules/<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Froyale.apache.org%2Fdividing-an-apache-royale-application-with-modules%2F&data=04%7C01%7Caharui%40adobe.com%7Cbb4c911ab5664808355908d9cd1630b7%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637766317469204767%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=gHQ7%2FCyT%2FRTRqbf7fE7MonqFK8QHhWMC5KbOuly2DcI%3D&reserved=0>
On Fri, 31 Dec 2021, 19:14 Maria Jose Esteve, <mj...@iest.com>> wrote:
@Roman, which branch did you compile the SDK from, ROYALE_INTERFACE_INFO or develop?
Could you pass the Overview.mxml view to the main application? (to rule it out)
Hiedra
De: Roman Isitua <ro...@gmail.com>>
Enviado el: viernes, 31 de diciembre de 2021 17:56
Para: users@royale.apache.org<ma...@royale.apache.org>
Asunto: Re: Compiling Modules (was Re: Load time is very slow)
I have tried tracing where the errors are happening whenever I test the release version
Uncaught TypeError: Ql.valuesImpl.init is not a function
at Hr.Cr.um (Overview.js:846)
at Function.ep.generateMXMLProperties (Overview.js:795)
at Hr.Sp.generateMXMLAttributes (Overview.js:599)
at new Hr (Overview.js:864)
at PN.M.loadHandler (FrontEnd.js:2042)
9Overview.js:173 Uncaught TypeError: this.createElement is not a function
at $B.V (Overview.js:173)
at new $B (FrontEnd.js:2430)
at EP.convert (FrontEnd.js:2430)
at Zy (FrontEnd.js:261)
at HTMLAnchorElement.Uy (FrontEnd.js:121)
at HTMLAnchorElement.Sy.b (FrontEnd.js:117)
The highlighted code in red is declared as follows in the Overview.mxml (maven module)
<j:valuesImpl>
<js:SimpleCSSValuesImpl/>
</j:valuesImpl>
The j:valuesImpl points to the following code in jewel Module.js
/**
* @nocollapse
* @export
* @type {org.apache.royale.core.IValuesImpl}
*/
org.apache.royale.jewel.Module.prototype.valuesImpl;
org.apache.royale.jewel.Module.prototype.set__valuesImpl = function(value) {
org.apache.royale.core.ValuesManager.valuesImpl.init(this);
};
it appears this function is improperly renamed and whenever the app tries to load the module is not able to recognise it as a function.
The same issue of improper function renaming is happening in the second error as well
9Overview.js:173 Uncaught TypeError: this.createElement is not a function
On Thu, Dec 30, 2021 at 10:42 PM Roman Isitua <ro...@gmail.com>> wrote:
I have applied the js compiler option as follows
<additionalCompilerOptions>-source-map=false;-compiler.show-binding-warnings=false;-js-default-initializers=true;-js-dynamic-access-unknown-members=true;
-js-compiler-option=--variable_map_output_file gccvars.txt;-js-compiler-option+=--property_map_output_file gccprops.txt
</additionalCompilerOptions>
I get the same error as before when attempting to launch the jewel module.
Error! Filename not specified.
Same error trace.
Uncaught TypeError: cm.valuesImpl.init is not a function
at Rr.Mr.yl (Overview.js:786)
at Function.iq.generateMXMLProperties (Overview.js:736)
at Rr.hq.generateMXMLAttributes (Overview.js:546)
at new Rr (Overview.js:804)
at LN.J.loadHandler (FrontEnd.js:1967)
FrontEnd.js:1640 Uncaught TypeError: M is not a function
at oM.J.handleMouseOut (FrontEnd.js:1640)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:248)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
FrontEnd.js:1640 Uncaught TypeError: M is not a function
at oM.J.handleMouseOver (FrontEnd.js:1640)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:248)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
FrontEnd.js:1640 Uncaught TypeError: M is not a function
at oM.J.handleMouseOut (FrontEnd.js:1640)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:248)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
FrontEnd.js:1640 Uncaught TypeError: M is not a function
at oM.J.handleMouseOver (FrontEnd.js:1640)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:248)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
FrontEnd.js:1640 Uncaught TypeError: M is not a function
at oM.J.handleMouseOut (FrontEnd.js:1640)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:248)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
FrontEnd.js:1640 Uncaught TypeError: M is not a function
at oM.J.handleMouseOver (FrontEnd.js:1640)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:248)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
FrontEnd.js:1640 Uncaught TypeError: M is not a function
at oM.J.handleMouseOut (FrontEnd.js:1640)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:248)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
3Overview.js:56 Uncaught TypeError: Cannot read properties of undefined (reading 'prototype')
at P (Overview.js:56)
at SG.convert (FrontEnd.js:904)
at ny (FrontEnd.js:248)
at HTMLElement.iy (FrontEnd.js:125)
at HTMLElement.b (FrontEnd.js:121)
On Thu, Dec 30, 2021 at 6:56 PM Harbs <ha...@gmail.com>> wrote:
1. I’d get rid of the agressive minification options. It will likely cause issues. If you get it to work without those options, you can try to add them back in and see if it still works.
2. You seem to be missing the compiler options explained here: https://apache.github.io/royale-docs/features/modules#minification<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapache.github.io%2Froyale-docs%2Ffeatures%2Fmodules%23minification&data=04%7C01%7Caharui%40adobe.com%7Cbb4c911ab5664808355908d9cd1630b7%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637766317469204767%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=%2BbYUFfqzb4QzEkFBJp9fi0e%2FeYx7IqvtItN4slKbK38%3D&reserved=0>
For a pom, it would look something like this (adjust your paths to match your setup):
Main app:
<additionalCompilerOptions>-source-map=true;-js-compiler-option=--variable_map_output_file gccvars.txt;-js-compiler-option+=--property_map_output_file gccprops.txt</additionalCompilerOptions>
Module:
<additionalCompilerOptions>-source-map=true;-js-compiler-option=--variable_map_input_file ../../../../../MainApp/bin/js-release/gccvars.txt;-js-compiler-option+=--property_map_input_file ../../../../../MainApp/bin/js-release/gccprops.txt</additionalCompilerOptions>
On Dec 30, 2021, at 7:43 PM, Roman Isitua <ro...@gmail.com>> wrote:
I think it will be better for me to share my pom's that way you can see all the compilation options used. The pom for the parent (FmClient2), the MainApp and one module (Overview) have been attached to this email.
On Thu, Dec 30, 2021 at 6:22 PM Harbs <ha...@gmail.com>> wrote:
Roman, can you share your full compiler options?
I decided to remove the below settings completely
-export-public-symbols=false
-prevent-rename-protected-symbols=false
-prevent-rename-public-symbols=false
-prevent-rename-internal-symbols=false
I enabled the below settings
-js-dynamic-access-unknown-members=true;
-js-default-initializers=true
The release version starts up
Hiedra, that’s great!
On Dec 30, 2021, at 7:15 PM, Roman Isitua <ro...@gmail.com>> wrote:
Yes. I am testing with the sdk compiled on branch ROYALE_INTERFACE_INFO
On Thu, Dec 30, 2021 at 6:10 PM Maria Jose Esteve <mj...@iest.com>> wrote:
Roman, are you testing with the SDK compiled from the Harb branches, ROYALE_INTERFACE_INFO, or from develop?
Hiedra
De: Roman Isitua <ro...@gmail.com>>
Enviado el: jueves, 30 de diciembre de 2021 16:52
Para: users@royale.apache.org<ma...@royale.apache.org>
Asunto: Re: Compiling Modules (was Re: Load time is very slow)
I decided to remove the below settings completely
-export-public-symbols=false
-prevent-rename-protected-symbols=false
-prevent-rename-public-symbols=false
-prevent-rename-internal-symbols=false
I enabled the below settings
-js-dynamic-access-unknown-members=true;
-js-default-initializers=true
The release version starts up
<image001.png>
<image002.png>
However, the moment I launch a module. I get the below error
<image003.png>
It appears to be failing when I launch the "Overview" module (by clicking the Overview side menu).
So my current observation is that by retaining only two settings
-js-dynamic-access-unknown-members=true;
-js-default-initializers=true
The release module starts up but the app fails whenever I launch a module.
The smallest size settings in the documentation do not work. The app does not start up.
-export-public-symbols=false
-prevent-rename-protected-symbols=false
-prevent-rename-public-symbols=false
-prevent-rename-internal-symbols=false
The error trace is below
Uncaught TypeError: cm.valuesImpl.init is not a function
at Wr.Rr.pl<https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwr.rr.pl%2F&data=04%7C01%7Caharui%40adobe.com%7Cbb4c911ab5664808355908d9cd1630b7%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637766317469204767%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=eD7plf2Ay8jDRKilUhOXLH%2BK%2FvYPjI7rJh2sOUillgk%3D&reserved=0> (Overview.js:792)
at Function.mq.generateMXMLProperties (Overview.js:743)
at Wr.lq.generateMXMLAttributes (Overview.js:551)
at new Wr (Overview.js:810)
at QN.J.loadHandler (FrontEnd.js:1978)
3Overview.js:56 Uncaught TypeError: Cannot read properties of undefined (reading 'prototype')
at P (Overview.js:56)
at VG.convert (FrontEnd.js:910)
at ny (FrontEnd.js:250)
at HTMLElement.iy (FrontEnd.js:125)
at HTMLElement.b (FrontEnd.js:121)
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOut (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOver (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOver @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOut (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOut @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOver (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOver @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOut (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOut @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOver (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOver @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOut (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOut @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOver (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOver @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOut (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOut @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
On Thu, Dec 30, 2021 at 4:32 PM Roman Isitua <ro...@gmail.com>> wrote:
I get the same error even when I set the -js-dynamic-access-unknown-members=true;
On Thu, Dec 30, 2021 at 4:24 PM Roman Isitua <ro...@gmail.com>> wrote:
Using the below settings,
-export-public-symbols=false
-prevent-rename-protected-symbols=false
-prevent-rename-public-symbols=false
-prevent-rename-internal-symbols=false
-js-dynamic-access-unknown-members=false;
-js-default-initializers=true
Debug version runs fine. The release version does not start up
<image004.png>
I get the below errors
Uncaught TypeError: Cannot read properties of undefined (reading 'apply')
at KE.hm (FrontEnd.js:1600)
at XE.M.Fb (FrontEnd.js:943)
at XE.M.uh (FrontEnd.js:937)
at FE.M.na<https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Ffe.m.na%2F&data=04%7C01%7Caharui%40adobe.com%7Cbb4c911ab5664808355908d9cd1630b7%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637766317469204767%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=C2dMLjuecMOcaQ6hesLK2sXJ4uUmP1frYCqcrIbYpyI%3D&reserved=0> (FrontEnd.js:497)
at FE.M.v (FrontEnd.js:497)
at dR.M.S (FrontEnd.js:213)
at dR.Nz.S (FrontEnd.js:217)
at dR.M.start (FrontEnd.js:1396)
at index.html:45
:8080/favicon.ico:1 Failed to load resource: the server responded with a status of 404 (Not Found)
FrontEnd.js is the start up class for the application. i.e. It implements the Jewel application class.
On Thu, Dec 30, 2021 at 3:19 PM Roman Isitua <ro...@gmail.com>> wrote:
Hi Harb,
Thanks for your response. I have gone through the documentation. I will do my test again starting with the smallest size option and share my findings.
Regards,
On Thu, Dec 30, 2021 at 10:59 AM Harbs <ha...@gmail.com>> wrote:
Sorry for my deal in responding.
Let’s take a step back.
I’m not sure how you are compiling your modules. I just added some content to the module documentation page which explains what compiler options you need while compiling modules. (It still needs some editing.) https://apache.github.io/royale-docs/features/modules#minification<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapache.github.io%2Froyale-docs%2Ffeatures%2Fmodules%23minification&data=04%7C01%7Caharui%40adobe.com%7Cbb4c911ab5664808355908d9cd1630b7%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637766317469204767%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=%2BbYUFfqzb4QzEkFBJp9fi0e%2FeYx7IqvtItN4slKbK38%3D&reserved=0>
Are you using those options?
On Dec 29, 2021, at 2:19 AM, Maria Jose Esteve <mj...@iest.com>> wrote:
Hi, Let me join you with these tests....
@Harb, I have compiled the SDK from this branch, feature/ROYALE_INTERFACE_INFO, and when running in debug I get this error:
Message on the PURGE CONSOLE is displayed:
Cannot convert org.apache.royale.reflection.beads.ClassAliasBead to IBead
Message in the IDE Window:
Se produjo una excepción: TypeError: Cannot convert [object Object] to IBead
at App.org.apache.royale.core.ElementWrapper.addBead (http://localhost:8080/WNetSuitePlus/org/apache/royale/core/ElementWrapper.js:114:11)
at App.org.apache.royale.core.HTMLElementWrapper.addBead (http://localhost:8080/WNetSuitePlus/org/apache/royale/core/HTMLElementWrapper.js:43:65)
at App.org.apache.royale.jewel.Application.start (http://localhost:8080/WNetSuitePlus/org/apache/royale/jewel/Application.js:246:10)
at App.App_loadXML (http://localhost:8080/WNetSuitePlus/App.js:1681:25)
at org.apache.royale.net.URLLoader.org.apache.royale.events.EventDispatcher.fireListeners (http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:97:23)
at Function.goog.events.EventTarget.dispatchEventInternal_ (http://localhost:8080/WNetSuitePlus/library/closure/goog/events/eventtarget.js:381:26)
at org.apache.royale.net.URLLoader.org.apache.royale.events.EventDispatcher.dispatchEvent (http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:72:37)
at org.apache.royale.net.URLLoader.jsEventHandler (http://localhost:8080/WNetSuitePlus/org/apache/royale/net/URLLoader.js:169:12)
Call stack:
<image003.png>
[INFO] Executing MXMLC in tool group Royale with args: [
-load-config=D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\compile-app-config.xml,
-js-default-initializers=true,
-source-map=true,
-js-dynamic-access-unknown-members=true,
-keep-as3-metadata+=Inject,Dispatcher,EventHandler,Event,PostConstruct,PreDestroy,ViewAdded,ViewRemoved,Bindable,Transient,
-keep-code-with-metadata=Inject,
-show-binding-warnings=false,
-export-public-symbols=false,
-prevent-rename-protected-symbols=false,
-prevent-rename-internal-symbols=false,
-js-output=D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\javascript,
-compiler.targets=JSRoyale,
D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\src\main\royale\App.mxml
The release execution does not change, the error is the same as before (SDK compilation from the develop branch):
Se produjo una excepción: ReferenceError: Error #1065: Variable com.iest.winplusweb.models.MasterConfigSystemModel is not defined.
at yR (http://localhost:8080/WPWebRelease/App.js:3605:1771)
at Mya (http://localhost:8080/WPWebRelease/App.js:3343:365)
at AR.J.usa (http://localhost:8080/WPWebRelease/App.js:434:441)
at GFa.J.fromTypeDefinition (http://localhost:8080/WPWebRelease/App.js:5706:139)
at Function.YT.getTypeDescriptor (http://localhost:8080/WPWebRelease/App.js:4570:820)
at Function.fX.constructBean (http://localhost:8080/WPWebRelease/App.js:2336:472)
at r$.J.initialize (http://localhost:8080/WPWebRelease/App.js:5041:66)
at OW.J.init (http://localhost:8080/WPWebRelease/App.js:950:452)
at OW.J.u (http://localhost:8080/WPWebRelease/App.js:951:454)
at $$.J.addBead (http://localhost:8080/WPWebRelease/App.js:357:549)
The main difference:
project compiled from "SDK-develop" runs fine in js-debug and gives error in js-release and, compiled from "SDK-ROYALE_INTERFACE_INFO" does not launch because of conversion error.
Hiedra
De: Roman Isitua <ro...@gmail.com>>
Enviado el: martes, 28 de diciembre de 2021 15:55
Para: users@royale.apache.org<ma...@royale.apache.org>
Asunto: Re: Load time is very slow
@Harb
I have checked out the feature/ROYALE_INTERFACE_INFO branch and compiled asjs and compiler. I have rebuilt my application with modules in release mode.
I get the following error when I attempt to launch a module
<image001.png>
The module loads fine in debug mode
<image002.png>
Snippets of the log
Overview.js:786 Uncaught TypeError: cm.valuesImpl.init is not a function
at Rr.Mr.yl (Overview.js:786)
at Function.iq.generateMXMLProperties (Overview.js:736)
at Rr.hq.generateMXMLAttributes (Overview.js:546)
at new Rr (Overview.js:804)
at LN.J.loadHandler (FrontEnd.js:1967)
Mr.yl @ Overview.js:786
iq.generateMXMLProperties @ Overview.js:736
hq.generateMXMLAttributes @ Overview.js:546
Rr @ Overview.js:804
J.loadHandler @ FrontEnd.js:1967
load (async)
LN.loadModule @ FrontEnd.js:1965
dN.loadModule @ FrontEnd.js:2406
LD.Un @ FrontEnd.js:1809
ny @ FrontEnd.js:123
ny @ FrontEnd.js:248
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
I have attached the full log to this email.
On Tue, Dec 28, 2021 at 2:51 PM Roman Isitua <ro...@gmail.com>> wrote:
Hi Maria,
Prior to starting this mail discussion "Load time is very slow". I can confirm I have only been compiling in debug mode. My target\javascript\bin\ only had js-debug. It was after I upgraded my royale sdk from 0.9.7 to 0.9.8 that I compiled in release mode.
On Tue, Dec 28, 2021 at 2:24 PM Maria Jose Esteve <mj...@iest.com>> wrote:
Hi, @Roman, I think you are doing a double compile can it be? My times are the same as yours and I always compile in debug and release.
Look at your target folder " target\javascript\bin\" and if you have two folders: js-debug and js-release you are compiling always double.
In my case, the architecture of my project as well as the Maven compilation files (pom.xml) were provided by an external company (we didn't know anything about Maven or Royale at that time) and I understand that this formula was chosen to show us the options we had.
A priori and without doing any test as Harb has done, I think that modularity gives us the advantage of compiling parts of the code once and not compiling them again if they are not modified. So far WITH MY COMPILATION TIMES, sometimes more than 1 minute, this is fundamental. But of course, now we have the problem of minification of the modules and it is really a serious problem because it is impossible for us to deploy in production.
I will try to separate the compiación realese with a profile and if I succeed I will pass it to you @Roman.
@Harb what do you mean by compiling the ROYALE_INTERFACE_INFO branch?
Hiedra
De: Harbs <ha...@gmail.com>>
Enviado el: lunes, 27 de diciembre de 2021 18:32
Para: users@royale.apache.org<ma...@royale.apache.org>
Asunto: Re: Load time is very slow
That doesn’t sound right.
Are you sure you’re compiling debug and not release? That sounds like release build times.
On Dec 27, 2021, at 3:31 PM, Roman Isitua <ro...@gmail.com>> wrote:
Wow ! You are using a workstation with a bleeding edge processor.
I just compiled my app now. It took 44 seconds. (First compilation after ide start up.) Subsequently compilations are usually 19s to 20s.
My application code base is very very small compared to yours. As we continue to add functionality, I expect the compile times to rise.
<MainApp_pom.xml><Overview_pom.xml><fm_client2_pom.xml>
Re: Compiling Modules (was Re: Load time is very slow)
Posted by Roman Isitua <ro...@gmail.com>.
Alex, thank you for your detailed analysis of the error log.
I agree with you that the best strategy is to prevent renaming of
public/exports used by the module. I have tried different options to
prevent renaming
It appears none of them stops this. From my observation, it appears that
this default options below
-export-public-symbols=true;-prevent-rename-public-symbols=true;-prevent-rename-public-instance-accessors=true;
Only seem to affect the main application (main module) but have no effect
on the other modules even though I ensured they were applied in
their respective module pom. I came to this conclusion when I decided to
turn set -prevent-rename-public-symbols=false
I noticed that I got the same error but this time around in the main module.
Uncaught TypeError: this.rb[(intermediate value).Kd(...)] is not a function
at HN.iI.send (FrontEnd.js:970)
at nI.EH.Ea (FrontEnd.js:880)
at ON.q6 (FrontEnd.js:1815)
at TN.L2 (FrontEnd.js:2034)
at hF.Xf (FrontEnd.js:2063)
at lF.kb (FrontEnd.js:1233)
at lF.Vf (FrontEnd.js:1224)
at cF.O (FrontEnd.js:659)
at cF.M.w (FrontEnd.js:661)
at gQ.mA.M (FrontEnd.js:241)
FrontEnd.js maps to FrontEnd.as in my application and is the entry point of
the application. This confirms that -prevent-rename-public-symbols=false has
an effect on the main module but no effect on other modules even though
they were applied in the respective module pom's.
Maybe there are other options I am overlooking.
On Sat, Jan 1, 2022 at 9:31 AM Alex Harui <ah...@adobe.com> wrote:
> In case it helps, the minification (variable renaming) mechanism is
> essentially guaranteed to cause problems in modules. The Closure Compiler
> basically takes variables, sees if it is worth renaming it, then gives it
> the name ‘a’, then ‘b’, and so-on, (it skips a few letters, IIRC), then
> moves on to ‘aa’, and ‘ab’, etc. The odds that the compiler will encounter
> the same variables in the same order when compiling an app and one or more
> modules is close to zero.
>
>
>
> I did some work to try to dump the mapping of the renamed variables in the
> main app and use that when compiling the modules. It was working for a
> while, then some code was added to the framework that started fooling the
> Closure Compiler. I spent some time trying to fix the Closure Compiler,
> but ran out of time. Meanwhile, Josh was adding more control over renaming
> so I moved on to other things.
>
>
>
> IMO, the best strategy to take would be to try to control what gets
> renamed. All public/exports from the app that are used by the module
> should not be renamed. That will definitely make the app and modules
> bigger, but unless the Closure Compiler folks become interested in
> runtime-loaded modules, it is challenging for the Royale compiler to allow
> aggressive renaming.
>
>
>
> I think what is going on with the exceptions below is that exporting
> doesn’t really prevent renaming. It only sets up an externally-visible
> alias to a renamed variable. Especially for static members. So it isn’t
> sufficient to export public variables, the code within the module must not
> let the Closure Compiler think that the intra-module references can be
> renamed, in this case, from SimpleCSSValuesImpl to QI
>
>
>
> I don’t know the renaming options we’ve added to the Royale Compiler, so I
> don’t know if there is an option to control that. I think there is a way
> to convince the Closure Compiler to not rename SimpleCSSValuesImpl because
> I’ve seen other class names not get renamed.
>
>
>
> HTH,
>
> -Alex
>
>
>
> *From: *Roman Isitua <ro...@gmail.com>
> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Date: *Friday, December 31, 2021 at 10:42 AM
> *To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Subject: *Re: Compiling Modules (was Re: Load time is very slow)
>
>
>
> I have tested on both. The error log is the same.
>
>
>
> I don't understand your second question. Kindly clarify ?
>
>
>
>
>
> I followed strictly the approach used for loading modules here in this
> example.
>
> This is the only method I know for loading modules. If there is another
> method please share.
>
>
>
>
>
>
> https://royale.apache.org/dividing-an-apache-royale-application-with-modules/
> <https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Froyale.apache.org%2Fdividing-an-apache-royale-application-with-modules%2F&data=04%7C01%7Caharui%40adobe.com%7C37895fe9f5244b9170fa08d9cc8d5b56%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637765729789686368%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=8RPrsLji8JNT15c9yCv1IuJiy8A7%2BKQrR4k3pDluTOg%3D&reserved=0>
>
>
>
> On Fri, 31 Dec 2021, 19:14 Maria Jose Esteve, <mj...@iest.com> wrote:
>
> @Roman, which branch did you compile the SDK from, ROYALE_INTERFACE_INFO
> or develop?
>
> Could you pass the Overview.mxml view to the main application? (to rule
> it out)
>
>
>
> Hiedra
>
>
>
> *De:* Roman Isitua <ro...@gmail.com>
> *Enviado el:* viernes, 31 de diciembre de 2021 17:56
> *Para:* users@royale.apache.org
> *Asunto:* Re: Compiling Modules (was Re: Load time is very slow)
>
>
>
> I have tried tracing where the errors are happening whenever I test the
> release version
>
> Uncaught TypeError: Ql.valuesImpl.init is not a function
> at Hr.Cr.um (Overview.js:846)
> at Function.ep.generateMXMLProperties (Overview.js:795)
> at Hr.Sp.generateMXMLAttributes (Overview.js:599)
> at new Hr (Overview.js:864)
> at PN.M.loadHandler (FrontEnd.js:2042)
> 9Overview.js:173 Uncaught TypeError: this.createElement is not a function
> at $B.V (Overview.js:173)
> at new $B (FrontEnd.js:2430)
> at EP.convert (FrontEnd.js:2430)
> at Zy (FrontEnd.js:261)
> at HTMLAnchorElement.Uy (FrontEnd.js:121)
> at HTMLAnchorElement.Sy.b (FrontEnd.js:117)
>
>
>
>
>
> The highlighted code in red is declared as follows in the Overview.mxml
> (maven module)
>
>
>
> <j:valuesImpl>
>
> <js:SimpleCSSValuesImpl/>
>
> </j:valuesImpl>
>
>
>
> The j:valuesImpl points to the following code in jewel Module.js
>
>
>
> /**
> * @nocollapse
> * @export
> * @type {org.apache.royale.core.IValuesImpl}
> */
> org.apache.royale.jewel.Module.prototype.valuesImpl;
>
>
> org.apache.royale.jewel.Module.prototype.set__valuesImpl = function(value)
> {
> org.apache.royale.core.ValuesManager.valuesImpl.init(this);
> };
>
>
>
>
>
> it appears this function is improperly renamed and whenever the app tries
> to load the module is not able to recognise it as a function.
>
>
>
> The same issue of improper function renaming is happening in the second
> error as well
>
>
>
> 9Overview.js:173 Uncaught TypeError: this.createElement is not a function
>
>
>
>
>
> On Thu, Dec 30, 2021 at 10:42 PM Roman Isitua <ro...@gmail.com>
> wrote:
>
>
>
> I have applied the js compiler option as follows
>
>
>
>
> <additionalCompilerOptions>-source-map=false;-compiler.show-binding-warnings=false;-js-default-initializers=true;-js-dynamic-access-unknown-members=true;
> -js-compiler-option=--variable_map_output_file
> gccvars.txt;-js-compiler-option+=--property_map_output_file gccprops.txt
> </additionalCompilerOptions>
>
>
>
>
>
> I get the same error as before when attempting to launch the jewel module.
>
>
>
>
>
>
>
> Same error trace.
>
>
>
> Uncaught TypeError: cm.valuesImpl.init is not a function
> at Rr.Mr.yl (Overview.js:786)
> at Function.iq.generateMXMLProperties (Overview.js:736)
> at Rr.hq.generateMXMLAttributes (Overview.js:546)
> at new Rr (Overview.js:804)
> at LN.J.loadHandler (FrontEnd.js:1967)
> FrontEnd.js:1640 Uncaught TypeError: M is not a function
> at oM.J.handleMouseOut (FrontEnd.js:1640)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:248)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> FrontEnd.js:1640 Uncaught TypeError: M is not a function
> at oM.J.handleMouseOver (FrontEnd.js:1640)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:248)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> FrontEnd.js:1640 Uncaught TypeError: M is not a function
> at oM.J.handleMouseOut (FrontEnd.js:1640)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:248)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> FrontEnd.js:1640 Uncaught TypeError: M is not a function
> at oM.J.handleMouseOver (FrontEnd.js:1640)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:248)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> FrontEnd.js:1640 Uncaught TypeError: M is not a function
> at oM.J.handleMouseOut (FrontEnd.js:1640)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:248)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> FrontEnd.js:1640 Uncaught TypeError: M is not a function
> at oM.J.handleMouseOver (FrontEnd.js:1640)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:248)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> FrontEnd.js:1640 Uncaught TypeError: M is not a function
> at oM.J.handleMouseOut (FrontEnd.js:1640)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:248)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> 3Overview.js:56 Uncaught TypeError: Cannot read properties of undefined
> (reading 'prototype')
> at P (Overview.js:56)
> at SG.convert (FrontEnd.js:904)
> at ny (FrontEnd.js:248)
> at HTMLElement.iy (FrontEnd.js:125)
> at HTMLElement.b (FrontEnd.js:121)
>
>
>
> On Thu, Dec 30, 2021 at 6:56 PM Harbs <ha...@gmail.com> wrote:
>
> 1. I’d get rid of the agressive minification options. It will likely cause
> issues. If you get it to work without those options, you can try to add
> them back in and see if it still works.
>
> 2. You seem to be missing the compiler options explained here:
> https://apache.github.io/royale-docs/features/modules#minification
> <https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapache.github.io%2Froyale-docs%2Ffeatures%2Fmodules%23minification&data=04%7C01%7Caharui%40adobe.com%7C37895fe9f5244b9170fa08d9cc8d5b56%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637765729789686368%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=FecB7cs2lF4nnYR6Y2QhjeYamL1GEg1g0M%2FkmIAz4Jw%3D&reserved=0>
>
>
>
> For a pom, it would look something like this (adjust your paths to match
> your setup):
>
>
>
> Main app:
>
> <additionalCompilerOptions>-source-map=true;-js-compiler-option=--variable_map_output_file
> gccvars.txt;-js-compiler-option+=--property_map_output_file
> gccprops.txt</additionalCompilerOptions>
>
>
>
> Module:
>
> <additionalCompilerOptions>-source-map=true;-js-compiler-option=--variable_map_input_file
> ../../../../../MainApp/bin/js-release/gccvars.txt;-js-compiler-option+=--property_map_input_file
> ../../../../../MainApp/bin/js-release/gccprops.txt</additionalCompilerOptions>
>
>
>
> On Dec 30, 2021, at 7:43 PM, Roman Isitua <ro...@gmail.com> wrote:
>
>
>
> I think it will be better for me to share my pom's that way you can see
> all the compilation options used. The pom for the parent (FmClient2), the
> MainApp and one module (Overview) have been attached to this email.
>
>
>
>
>
> On Thu, Dec 30, 2021 at 6:22 PM Harbs <ha...@gmail.com> wrote:
>
> Roman, can you share your full compiler options?
>
>
>
> I decided to remove the below settings completely
> -export-public-symbols=false
> -prevent-rename-protected-symbols=false
> -prevent-rename-public-symbols=false
> -prevent-rename-internal-symbols=false
>
>
> I enabled the below settings
>
> -js-dynamic-access-unknown-members=true;
> -js-default-initializers=true
>
>
> The release version starts up
>
>
>
> Hiedra, that’s great!
>
>
>
> On Dec 30, 2021, at 7:15 PM, Roman Isitua <ro...@gmail.com> wrote:
>
>
>
>
>
> Yes. I am testing with the sdk compiled on branch ROYALE_INTERFACE_INFO
>
>
>
> On Thu, Dec 30, 2021 at 6:10 PM Maria Jose Esteve <mj...@iest.com>
> wrote:
>
> Roman, are you testing with the SDK compiled from the Harb branches,
> ROYALE_INTERFACE_INFO, or from develop?
>
>
>
> Hiedra
>
>
>
> *De:* Roman Isitua <ro...@gmail.com>
> *Enviado el:* jueves, 30 de diciembre de 2021 16:52
> *Para:* users@royale.apache.org
> *Asunto:* Re: Compiling Modules (was Re: Load time is very slow)
>
>
>
> I decided to remove the below settings completely
> -export-public-symbols=false
> -prevent-rename-protected-symbols=false
> -prevent-rename-public-symbols=false
> -prevent-rename-internal-symbols=false
>
>
> I enabled the below settings
>
> -js-dynamic-access-unknown-members=true;
> -js-default-initializers=true
>
>
> The release version starts up
>
>
>
>
>
>
>
> <image001.png>
>
>
>
>
>
> <image002.png>
>
>
>
> However, the moment I launch a module. I get the below error
>
>
>
> <image003.png>
>
>
>
>
>
> It appears to be failing when I launch the "*Overview*" module
> (by clicking the Overview side menu).
>
>
>
> So my current observation is that by retaining only two settings
>
>
>
> -js-dynamic-access-unknown-members=true;
> -js-default-initializers=true
>
>
>
> The release module starts up but the app fails whenever I launch a module.
>
>
>
> The smallest size settings in the documentation do not work. The app does
> not start up.
>
>
>
> -export-public-symbols=false
> -prevent-rename-protected-symbols=false
> -prevent-rename-public-symbols=false
> -prevent-rename-internal-symbols=false
>
>
>
>
>
>
>
> The error trace is below
>
>
>
>
>
> Uncaught TypeError: cm.valuesImpl.init is not a function
> at Wr.Rr.pl
> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwr.rr.pl%2F&data=04%7C01%7Caharui%40adobe.com%7C37895fe9f5244b9170fa08d9cc8d5b56%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637765729789686368%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=Fh9M3Q1O8NyfELxtrTrpaSyHEUPJnm1J4EMGNPLcO58%3D&reserved=0>
> (Overview.js:792)
> at Function.mq.generateMXMLProperties (Overview.js:743)
> at Wr.lq.generateMXMLAttributes (Overview.js:551)
> at new Wr (Overview.js:810)
> at QN.J.loadHandler (FrontEnd.js:1978)
> 3Overview.js:56 Uncaught TypeError: Cannot read properties of undefined
> (reading 'prototype')
> at P (Overview.js:56)
> at VG.convert (FrontEnd.js:910)
> at ny (FrontEnd.js:250)
> at HTMLElement.iy (FrontEnd.js:125)
> at HTMLElement.b (FrontEnd.js:121)
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOut (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOver (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOver @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOut (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOut @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOver (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOver @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOut (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOut @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOver (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOver @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOut (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOut @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOver (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOver @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOut (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOut @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
>
>
>
> On Thu, Dec 30, 2021 at 4:32 PM Roman Isitua <ro...@gmail.com>
> wrote:
>
> I get the same error even when I set
> the -js-dynamic-access-unknown-members=true;
>
>
>
> On Thu, Dec 30, 2021 at 4:24 PM Roman Isitua <ro...@gmail.com>
> wrote:
>
>
>
> Using the below settings,
>
> -export-public-symbols=false
> -prevent-rename-protected-symbols=false
> -prevent-rename-public-symbols=false
> -prevent-rename-internal-symbols=false
> -js-dynamic-access-unknown-members=false;
>
> -js-default-initializers=true
>
>
> Debug version runs fine. The release version does not start up
>
> <image004.png>
>
>
> I get the below errors
>
> Uncaught TypeError: Cannot read properties of undefined (reading 'apply')
> at KE.hm (FrontEnd.js:1600)
> at XE.M.Fb (FrontEnd.js:943)
> at XE.M.uh (FrontEnd.js:937)
> at FE.M.na
> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Ffe.m.na%2F&data=04%7C01%7Caharui%40adobe.com%7C37895fe9f5244b9170fa08d9cc8d5b56%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637765729789686368%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=YmNsQLXa7hYCZzNh95RO0vFW0XcOV9LUzzoU4QP3Z9c%3D&reserved=0>
> (FrontEnd.js:497)
> at FE.M.v (FrontEnd.js:497)
> at dR.M.S (FrontEnd.js:213)
> at dR.Nz.S (FrontEnd.js:217)
> at dR.M.start (FrontEnd.js:1396)
> at index.html:45
> :8080/favicon.ico:1 Failed to load resource: the server responded with a
> status of 404 (Not Found)
>
>
>
>
>
> FrontEnd.js is the start up class for the application. i.e. It implements
> the Jewel application class.
>
>
>
>
>
>
>
> On Thu, Dec 30, 2021 at 3:19 PM Roman Isitua <ro...@gmail.com>
> wrote:
>
> Hi Harb,
>
>
>
> Thanks for your response. I have gone through the documentation. I will do
> my test again starting with the smallest size option and share my findings.
>
>
>
> Regards,
>
>
>
> On Thu, Dec 30, 2021 at 10:59 AM Harbs <ha...@gmail.com> wrote:
>
> Sorry for my deal in responding.
>
>
>
> Let’s take a step back.
>
>
>
> I’m not sure how you are compiling your modules. I just added some content
> to the module documentation page which explains what compiler options you
> need while compiling modules. (It still needs some editing.)
> https://apache.github.io/royale-docs/features/modules#minification
> <https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapache.github.io%2Froyale-docs%2Ffeatures%2Fmodules%23minification&data=04%7C01%7Caharui%40adobe.com%7C37895fe9f5244b9170fa08d9cc8d5b56%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637765729789686368%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=FecB7cs2lF4nnYR6Y2QhjeYamL1GEg1g0M%2FkmIAz4Jw%3D&reserved=0>
>
>
>
> Are you using those options?
>
>
>
> On Dec 29, 2021, at 2:19 AM, Maria Jose Esteve <mj...@iest.com> wrote:
>
>
>
> Hi, Let me join you with these tests....
>
>
>
> @Harb, I have compiled the SDK from this branch, feature/ROYALE_INTERFACE_INFO,
> and when running in debug I get this error:
>
>
>
> Message on the PURGE CONSOLE is displayed:
>
>
>
> Cannot convert org.apache.royale.reflection.beads.ClassAliasBead to IBead
>
>
>
> Message in the IDE Window:
>
>
>
> Se produjo una excepción: TypeError: Cannot convert [object Object] to
> IBead
>
> at App.org.apache.royale.core.ElementWrapper.addBead (
> http://localhost:8080/WNetSuitePlus/org/apache/royale/core/ElementWrapper.js:114:11
> )
>
> at App.org.apache.royale.core.HTMLElementWrapper.addBead (
> http://localhost:8080/WNetSuitePlus/org/apache/royale/core/HTMLElementWrapper.js:43:65
> )
>
> at App.org.apache.royale.jewel.Application.start (
> http://localhost:8080/WNetSuitePlus/org/apache/royale/jewel/Application.js:246:10
> )
>
> at App.App_loadXML (http://localhost:8080/WNetSuitePlus/App.js:1681:25
> )
>
> at
> org.apache.royale.net.URLLoader.org.apache.royale.events.EventDispatcher.fireListeners
> (
> http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:97:23
> )
>
> at Function.goog.events.EventTarget.dispatchEventInternal_ (
> http://localhost:8080/WNetSuitePlus/library/closure/goog/events/eventtarget.js:381:26
> )
>
> at
> org.apache.royale.net.URLLoader.org.apache.royale.events.EventDispatcher.dispatchEvent
> (
> http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:72:37
> )
>
> at org.apache.royale.net.URLLoader.jsEventHandler (
> http://localhost:8080/WNetSuitePlus/org/apache/royale/net/URLLoader.js:169:12
> )
>
>
>
> Call stack:
>
>
>
> <image003.png>
>
>
>
> [INFO] Executing MXMLC in tool group Royale with args: [
>
>
> -load-config=D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\compile-app-config.xml,
>
> -js-default-initializers=true,
>
> -source-map=true,
>
> -js-dynamic-access-unknown-members=true,
>
>
> -keep-as3-metadata+=Inject,Dispatcher,EventHandler,Event,PostConstruct,PreDestroy,ViewAdded,ViewRemoved,Bindable,Transient,
>
> -keep-code-with-metadata=Inject,
>
> -show-binding-warnings=false,
>
> -export-public-symbols=false,
>
> -prevent-rename-protected-symbols=false,
>
> -prevent-rename-internal-symbols=false,
>
>
> -js-output=D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\javascript,
>
> -compiler.targets=JSRoyale,
>
>
> D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\src\main\royale\App.mxml
>
>
>
>
>
> The release execution does not change, the error is the same as before
> (SDK compilation from the develop branch):
>
>
>
> Se produjo una excepción: ReferenceError: Error #1065: Variable
> com.iest.winplusweb.models.MasterConfigSystemModel is not defined.
>
> at yR (http://localhost:8080/WPWebRelease/App.js:3605:1771)
>
> at Mya (http://localhost:8080/WPWebRelease/App.js:3343:365)
>
> at AR.J.usa (http://localhost:8080/WPWebRelease/App.js:434:441)
>
> at GFa.J.fromTypeDefinition (
> http://localhost:8080/WPWebRelease/App.js:5706:139)
>
> at Function.YT.getTypeDescriptor (
> http://localhost:8080/WPWebRelease/App.js:4570:820)
>
> at Function.fX.constructBean (
> http://localhost:8080/WPWebRelease/App.js:2336:472)
>
> at r$.J.initialize (http://localhost:8080/WPWebRelease/App.js:5041:66)
>
> at OW.J.init (http://localhost:8080/WPWebRelease/App.js:950:452)
>
> at OW.J.u (http://localhost:8080/WPWebRelease/App.js:951:454)
>
> at $$.J.addBead (http://localhost:8080/WPWebRelease/App.js:357:549)
>
>
>
> The main difference:
>
> project compiled from "SDK-develop" runs fine in js-debug and gives error
> in js-release and, compiled from "SDK-ROYALE_INTERFACE_INFO" does not
> launch because of conversion error.
>
>
>
> Hiedra
>
>
>
> *De:* Roman Isitua <ro...@gmail.com>
> *Enviado el:* martes, 28 de diciembre de 2021 15:55
> *Para:* users@royale.apache.org
> *Asunto:* Re: Load time is very slow
>
>
>
> @Harb
>
>
>
> I have checked out the feature/ROYALE_INTERFACE_INFO branch and compiled
> asjs and compiler. I have rebuilt my application with modules in release
> mode.
>
>
>
> I get the following error when I attempt to launch a module
>
>
>
>
>
> <image001.png>
>
>
>
>
>
> The module loads fine in debug mode
>
>
>
> <image002.png>
>
>
>
>
>
> Snippets of the log
>
>
>
> Overview.js:786 Uncaught TypeError: cm.valuesImpl.init is not a function
> at Rr.Mr.yl (Overview.js:786)
> at Function.iq.generateMXMLProperties (Overview.js:736)
> at Rr.hq.generateMXMLAttributes (Overview.js:546)
> at new Rr (Overview.js:804)
> at LN.J.loadHandler (FrontEnd.js:1967)
> Mr.yl @ Overview.js:786
> iq.generateMXMLProperties @ Overview.js:736
> hq.generateMXMLAttributes @ Overview.js:546
> Rr @ Overview.js:804
> J.loadHandler @ FrontEnd.js:1967
> load (async)
> LN.loadModule @ FrontEnd.js:1965
> dN.loadModule @ FrontEnd.js:2406
> LD.Un @ FrontEnd.js:1809
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:248
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
>
>
>
>
>
> I have attached the full log to this email.
>
>
>
>
>
>
>
>
>
> On Tue, Dec 28, 2021 at 2:51 PM Roman Isitua <ro...@gmail.com>
> wrote:
>
> Hi Maria,
>
>
>
> Prior to starting this mail discussion "Load time is very slow". I can
> confirm I have only been compiling in debug mode. My target\javascript\bin\
> only had js-debug. It was after I upgraded my royale sdk from 0.9.7 to
> 0.9.8 that I compiled in release mode.
>
>
>
>
>
>
>
> On Tue, Dec 28, 2021 at 2:24 PM Maria Jose Esteve <mj...@iest.com>
> wrote:
>
> Hi, @Roman, I think you are doing a double compile can it be? My times are
> the same as yours and I always compile in debug and release.
>
>
>
> Look at your target folder " target\javascript\bin\" and if you have two
> folders: js-debug and js-release you are compiling always double.
>
>
>
> In my case, the architecture of my project as well as the Maven
> compilation files (pom.xml) were provided by an external company (we didn't
> know anything about Maven or Royale at that time) and I understand that
> this formula was chosen to show us the options we had.
>
>
>
> A priori and without doing any test as Harb has done, I think that
> modularity gives us the advantage of compiling parts of the code once and
> not compiling them again if they are not modified. So far WITH MY
> COMPILATION TIMES, sometimes more than 1 minute, this is fundamental. But
> of course, now we have the problem of minification of the modules and it is
> really a serious problem because it is impossible for us to deploy in
> production.
>
>
>
> I will try to separate the compiación realese with a profile and if I
> succeed I will pass it to you @Roman.
>
>
>
> @Harb what do you mean by compiling the ROYALE_INTERFACE_INFO branch?
>
>
>
> Hiedra
>
>
>
> *De:* Harbs <ha...@gmail.com>
> *Enviado el:* lunes, 27 de diciembre de 2021 18:32
> *Para:* users@royale.apache.org
> *Asunto:* Re: Load time is very slow
>
>
>
> That doesn’t sound right.
>
>
>
> Are you sure you’re compiling debug and not release? That sounds like
> release build times.
>
>
>
> On Dec 27, 2021, at 3:31 PM, Roman Isitua <ro...@gmail.com> wrote:
>
>
>
> Wow ! You are using a workstation with a bleeding edge processor.
>
>
>
> I just compiled my app now. It took 44 seconds. (First compilation after
> ide start up.) Subsequently compilations are usually 19s to 20s.
>
>
>
> My application code base is very very small compared to yours. As we
> continue to add functionality, I expect the compile times to rise.
>
>
>
>
>
>
>
>
>
> <MainApp_pom.xml><Overview_pom.xml><fm_client2_pom.xml>
>
>
>
>
Re: Compiling Modules (was Re: Load time is very slow)
Posted by Alex Harui <ah...@adobe.com>.
In case it helps, the minification (variable renaming) mechanism is essentially guaranteed to cause problems in modules. The Closure Compiler basically takes variables, sees if it is worth renaming it, then gives it the name ‘a’, then ‘b’, and so-on, (it skips a few letters, IIRC), then moves on to ‘aa’, and ‘ab’, etc. The odds that the compiler will encounter the same variables in the same order when compiling an app and one or more modules is close to zero.
I did some work to try to dump the mapping of the renamed variables in the main app and use that when compiling the modules. It was working for a while, then some code was added to the framework that started fooling the Closure Compiler. I spent some time trying to fix the Closure Compiler, but ran out of time. Meanwhile, Josh was adding more control over renaming so I moved on to other things.
IMO, the best strategy to take would be to try to control what gets renamed. All public/exports from the app that are used by the module should not be renamed. That will definitely make the app and modules bigger, but unless the Closure Compiler folks become interested in runtime-loaded modules, it is challenging for the Royale compiler to allow aggressive renaming.
I think what is going on with the exceptions below is that exporting doesn’t really prevent renaming. It only sets up an externally-visible alias to a renamed variable. Especially for static members. So it isn’t sufficient to export public variables, the code within the module must not let the Closure Compiler think that the intra-module references can be renamed, in this case, from SimpleCSSValuesImpl to QI
I don’t know the renaming options we’ve added to the Royale Compiler, so I don’t know if there is an option to control that. I think there is a way to convince the Closure Compiler to not rename SimpleCSSValuesImpl because I’ve seen other class names not get renamed.
HTH,
-Alex
From: Roman Isitua <ro...@gmail.com>
Reply-To: "users@royale.apache.org" <us...@royale.apache.org>
Date: Friday, December 31, 2021 at 10:42 AM
To: "users@royale.apache.org" <us...@royale.apache.org>
Subject: Re: Compiling Modules (was Re: Load time is very slow)
I have tested on both. The error log is the same.
I don't understand your second question. Kindly clarify ?
I followed strictly the approach used for loading modules here in this example.
This is the only method I know for loading modules. If there is another method please share.
https://royale.apache.org/dividing-an-apache-royale-application-with-modules/<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Froyale.apache.org%2Fdividing-an-apache-royale-application-with-modules%2F&data=04%7C01%7Caharui%40adobe.com%7C37895fe9f5244b9170fa08d9cc8d5b56%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637765729789686368%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=8RPrsLji8JNT15c9yCv1IuJiy8A7%2BKQrR4k3pDluTOg%3D&reserved=0>
On Fri, 31 Dec 2021, 19:14 Maria Jose Esteve, <mj...@iest.com>> wrote:
@Roman, which branch did you compile the SDK from, ROYALE_INTERFACE_INFO or develop?
Could you pass the Overview.mxml view to the main application? (to rule it out)
Hiedra
De: Roman Isitua <ro...@gmail.com>>
Enviado el: viernes, 31 de diciembre de 2021 17:56
Para: users@royale.apache.org<ma...@royale.apache.org>
Asunto: Re: Compiling Modules (was Re: Load time is very slow)
I have tried tracing where the errors are happening whenever I test the release version
Uncaught TypeError: Ql.valuesImpl.init is not a function
at Hr.Cr.um (Overview.js:846)
at Function.ep.generateMXMLProperties (Overview.js:795)
at Hr.Sp.generateMXMLAttributes (Overview.js:599)
at new Hr (Overview.js:864)
at PN.M.loadHandler (FrontEnd.js:2042)
9Overview.js:173 Uncaught TypeError: this.createElement is not a function
at $B.V (Overview.js:173)
at new $B (FrontEnd.js:2430)
at EP.convert (FrontEnd.js:2430)
at Zy (FrontEnd.js:261)
at HTMLAnchorElement.Uy (FrontEnd.js:121)
at HTMLAnchorElement.Sy.b (FrontEnd.js:117)
The highlighted code in red is declared as follows in the Overview.mxml (maven module)
<j:valuesImpl>
<js:SimpleCSSValuesImpl/>
</j:valuesImpl>
The j:valuesImpl points to the following code in jewel Module.js
/**
* @nocollapse
* @export
* @type {org.apache.royale.core.IValuesImpl}
*/
org.apache.royale.jewel.Module.prototype.valuesImpl;
org.apache.royale.jewel.Module.prototype.set__valuesImpl = function(value) {
org.apache.royale.core.ValuesManager.valuesImpl.init(this);
};
it appears this function is improperly renamed and whenever the app tries to load the module is not able to recognise it as a function.
The same issue of improper function renaming is happening in the second error as well
9Overview.js:173 Uncaught TypeError: this.createElement is not a function
On Thu, Dec 30, 2021 at 10:42 PM Roman Isitua <ro...@gmail.com>> wrote:
I have applied the js compiler option as follows
<additionalCompilerOptions>-source-map=false;-compiler.show-binding-warnings=false;-js-default-initializers=true;-js-dynamic-access-unknown-members=true;
-js-compiler-option=--variable_map_output_file gccvars.txt;-js-compiler-option+=--property_map_output_file gccprops.txt
</additionalCompilerOptions>
I get the same error as before when attempting to launch the jewel module.
[cid:image001.png@01D7FE7A.90D67D00]
Same error trace.
Uncaught TypeError: cm.valuesImpl.init is not a function
at Rr.Mr.yl (Overview.js:786)
at Function.iq.generateMXMLProperties (Overview.js:736)
at Rr.hq.generateMXMLAttributes (Overview.js:546)
at new Rr (Overview.js:804)
at LN.J.loadHandler (FrontEnd.js:1967)
FrontEnd.js:1640 Uncaught TypeError: M is not a function
at oM.J.handleMouseOut (FrontEnd.js:1640)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:248)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
FrontEnd.js:1640 Uncaught TypeError: M is not a function
at oM.J.handleMouseOver (FrontEnd.js:1640)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:248)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
FrontEnd.js:1640 Uncaught TypeError: M is not a function
at oM.J.handleMouseOut (FrontEnd.js:1640)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:248)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
FrontEnd.js:1640 Uncaught TypeError: M is not a function
at oM.J.handleMouseOver (FrontEnd.js:1640)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:248)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
FrontEnd.js:1640 Uncaught TypeError: M is not a function
at oM.J.handleMouseOut (FrontEnd.js:1640)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:248)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
FrontEnd.js:1640 Uncaught TypeError: M is not a function
at oM.J.handleMouseOver (FrontEnd.js:1640)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:248)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
FrontEnd.js:1640 Uncaught TypeError: M is not a function
at oM.J.handleMouseOut (FrontEnd.js:1640)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:248)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
3Overview.js:56 Uncaught TypeError: Cannot read properties of undefined (reading 'prototype')
at P (Overview.js:56)
at SG.convert (FrontEnd.js:904)
at ny (FrontEnd.js:248)
at HTMLElement.iy (FrontEnd.js:125)
at HTMLElement.b (FrontEnd.js:121)
On Thu, Dec 30, 2021 at 6:56 PM Harbs <ha...@gmail.com>> wrote:
1. I’d get rid of the agressive minification options. It will likely cause issues. If you get it to work without those options, you can try to add them back in and see if it still works.
2. You seem to be missing the compiler options explained here: https://apache.github.io/royale-docs/features/modules#minification<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapache.github.io%2Froyale-docs%2Ffeatures%2Fmodules%23minification&data=04%7C01%7Caharui%40adobe.com%7C37895fe9f5244b9170fa08d9cc8d5b56%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637765729789686368%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=FecB7cs2lF4nnYR6Y2QhjeYamL1GEg1g0M%2FkmIAz4Jw%3D&reserved=0>
For a pom, it would look something like this (adjust your paths to match your setup):
Main app:
<additionalCompilerOptions>-source-map=true;-js-compiler-option=--variable_map_output_file gccvars.txt;-js-compiler-option+=--property_map_output_file gccprops.txt</additionalCompilerOptions>
Module:
<additionalCompilerOptions>-source-map=true;-js-compiler-option=--variable_map_input_file ../../../../../MainApp/bin/js-release/gccvars.txt;-js-compiler-option+=--property_map_input_file ../../../../../MainApp/bin/js-release/gccprops.txt</additionalCompilerOptions>
On Dec 30, 2021, at 7:43 PM, Roman Isitua <ro...@gmail.com>> wrote:
I think it will be better for me to share my pom's that way you can see all the compilation options used. The pom for the parent (FmClient2), the MainApp and one module (Overview) have been attached to this email.
On Thu, Dec 30, 2021 at 6:22 PM Harbs <ha...@gmail.com>> wrote:
Roman, can you share your full compiler options?
I decided to remove the below settings completely
-export-public-symbols=false
-prevent-rename-protected-symbols=false
-prevent-rename-public-symbols=false
-prevent-rename-internal-symbols=false
I enabled the below settings
-js-dynamic-access-unknown-members=true;
-js-default-initializers=true
The release version starts up
Hiedra, that’s great!
On Dec 30, 2021, at 7:15 PM, Roman Isitua <ro...@gmail.com>> wrote:
Yes. I am testing with the sdk compiled on branch ROYALE_INTERFACE_INFO
On Thu, Dec 30, 2021 at 6:10 PM Maria Jose Esteve <mj...@iest.com>> wrote:
Roman, are you testing with the SDK compiled from the Harb branches, ROYALE_INTERFACE_INFO, or from develop?
Hiedra
De: Roman Isitua <ro...@gmail.com>>
Enviado el: jueves, 30 de diciembre de 2021 16:52
Para: users@royale.apache.org<ma...@royale.apache.org>
Asunto: Re: Compiling Modules (was Re: Load time is very slow)
I decided to remove the below settings completely
-export-public-symbols=false
-prevent-rename-protected-symbols=false
-prevent-rename-public-symbols=false
-prevent-rename-internal-symbols=false
I enabled the below settings
-js-dynamic-access-unknown-members=true;
-js-default-initializers=true
The release version starts up
<image001.png>
<image002.png>
However, the moment I launch a module. I get the below error
<image003.png>
It appears to be failing when I launch the "Overview" module (by clicking the Overview side menu).
So my current observation is that by retaining only two settings
-js-dynamic-access-unknown-members=true;
-js-default-initializers=true
The release module starts up but the app fails whenever I launch a module.
The smallest size settings in the documentation do not work. The app does not start up.
-export-public-symbols=false
-prevent-rename-protected-symbols=false
-prevent-rename-public-symbols=false
-prevent-rename-internal-symbols=false
The error trace is below
Uncaught TypeError: cm.valuesImpl.init is not a function
at Wr.Rr.pl<https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwr.rr.pl%2F&data=04%7C01%7Caharui%40adobe.com%7C37895fe9f5244b9170fa08d9cc8d5b56%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637765729789686368%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=Fh9M3Q1O8NyfELxtrTrpaSyHEUPJnm1J4EMGNPLcO58%3D&reserved=0> (Overview.js:792)
at Function.mq.generateMXMLProperties (Overview.js:743)
at Wr.lq.generateMXMLAttributes (Overview.js:551)
at new Wr (Overview.js:810)
at QN.J.loadHandler (FrontEnd.js:1978)
3Overview.js:56 Uncaught TypeError: Cannot read properties of undefined (reading 'prototype')
at P (Overview.js:56)
at VG.convert (FrontEnd.js:910)
at ny (FrontEnd.js:250)
at HTMLElement.iy (FrontEnd.js:125)
at HTMLElement.b (FrontEnd.js:121)
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOut (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOver (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOver @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOut (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOut @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOver (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOver @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOut (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOut @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOver (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOver @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOut (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOut @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOver (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOver @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOut (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOut @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
On Thu, Dec 30, 2021 at 4:32 PM Roman Isitua <ro...@gmail.com>> wrote:
I get the same error even when I set the -js-dynamic-access-unknown-members=true;
On Thu, Dec 30, 2021 at 4:24 PM Roman Isitua <ro...@gmail.com>> wrote:
Using the below settings,
-export-public-symbols=false
-prevent-rename-protected-symbols=false
-prevent-rename-public-symbols=false
-prevent-rename-internal-symbols=false
-js-dynamic-access-unknown-members=false;
-js-default-initializers=true
Debug version runs fine. The release version does not start up
<image004.png>
I get the below errors
Uncaught TypeError: Cannot read properties of undefined (reading 'apply')
at KE.hm (FrontEnd.js:1600)
at XE.M.Fb (FrontEnd.js:943)
at XE.M.uh (FrontEnd.js:937)
at FE.M.na<https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Ffe.m.na%2F&data=04%7C01%7Caharui%40adobe.com%7C37895fe9f5244b9170fa08d9cc8d5b56%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637765729789686368%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=YmNsQLXa7hYCZzNh95RO0vFW0XcOV9LUzzoU4QP3Z9c%3D&reserved=0> (FrontEnd.js:497)
at FE.M.v (FrontEnd.js:497)
at dR.M.S (FrontEnd.js:213)
at dR.Nz.S (FrontEnd.js:217)
at dR.M.start (FrontEnd.js:1396)
at index.html:45
:8080/favicon.ico:1 Failed to load resource: the server responded with a status of 404 (Not Found)
FrontEnd.js is the start up class for the application. i.e. It implements the Jewel application class.
On Thu, Dec 30, 2021 at 3:19 PM Roman Isitua <ro...@gmail.com>> wrote:
Hi Harb,
Thanks for your response. I have gone through the documentation. I will do my test again starting with the smallest size option and share my findings.
Regards,
On Thu, Dec 30, 2021 at 10:59 AM Harbs <ha...@gmail.com>> wrote:
Sorry for my deal in responding.
Let’s take a step back.
I’m not sure how you are compiling your modules. I just added some content to the module documentation page which explains what compiler options you need while compiling modules. (It still needs some editing.) https://apache.github.io/royale-docs/features/modules#minification<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapache.github.io%2Froyale-docs%2Ffeatures%2Fmodules%23minification&data=04%7C01%7Caharui%40adobe.com%7C37895fe9f5244b9170fa08d9cc8d5b56%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637765729789686368%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=FecB7cs2lF4nnYR6Y2QhjeYamL1GEg1g0M%2FkmIAz4Jw%3D&reserved=0>
Are you using those options?
On Dec 29, 2021, at 2:19 AM, Maria Jose Esteve <mj...@iest.com>> wrote:
Hi, Let me join you with these tests....
@Harb, I have compiled the SDK from this branch, feature/ROYALE_INTERFACE_INFO, and when running in debug I get this error:
Message on the PURGE CONSOLE is displayed:
Cannot convert org.apache.royale.reflection.beads.ClassAliasBead to IBead
Message in the IDE Window:
Se produjo una excepción: TypeError: Cannot convert [object Object] to IBead
at App.org.apache.royale.core.ElementWrapper.addBead (http://localhost:8080/WNetSuitePlus/org/apache/royale/core/ElementWrapper.js:114:11)
at App.org.apache.royale.core.HTMLElementWrapper.addBead (http://localhost:8080/WNetSuitePlus/org/apache/royale/core/HTMLElementWrapper.js:43:65)
at App.org.apache.royale.jewel.Application.start (http://localhost:8080/WNetSuitePlus/org/apache/royale/jewel/Application.js:246:10)
at App.App_loadXML (http://localhost:8080/WNetSuitePlus/App.js:1681:25)
at org.apache.royale.net.URLLoader.org.apache.royale.events.EventDispatcher.fireListeners (http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:97:23)
at Function.goog.events.EventTarget.dispatchEventInternal_ (http://localhost:8080/WNetSuitePlus/library/closure/goog/events/eventtarget.js:381:26)
at org.apache.royale.net.URLLoader.org.apache.royale.events.EventDispatcher.dispatchEvent (http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:72:37)
at org.apache.royale.net.URLLoader.jsEventHandler (http://localhost:8080/WNetSuitePlus/org/apache/royale/net/URLLoader.js:169:12)
Call stack:
<image003.png>
[INFO] Executing MXMLC in tool group Royale with args: [
-load-config=D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\compile-app-config.xml,
-js-default-initializers=true,
-source-map=true,
-js-dynamic-access-unknown-members=true,
-keep-as3-metadata+=Inject,Dispatcher,EventHandler,Event,PostConstruct,PreDestroy,ViewAdded,ViewRemoved,Bindable,Transient,
-keep-code-with-metadata=Inject,
-show-binding-warnings=false,
-export-public-symbols=false,
-prevent-rename-protected-symbols=false,
-prevent-rename-internal-symbols=false,
-js-output=D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\javascript,
-compiler.targets=JSRoyale,
D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\src\main\royale\App.mxml
The release execution does not change, the error is the same as before (SDK compilation from the develop branch):
Se produjo una excepción: ReferenceError: Error #1065: Variable com.iest.winplusweb.models.MasterConfigSystemModel is not defined.
at yR (http://localhost:8080/WPWebRelease/App.js:3605:1771)
at Mya (http://localhost:8080/WPWebRelease/App.js:3343:365)
at AR.J.usa (http://localhost:8080/WPWebRelease/App.js:434:441)
at GFa.J.fromTypeDefinition (http://localhost:8080/WPWebRelease/App.js:5706:139)
at Function.YT.getTypeDescriptor (http://localhost:8080/WPWebRelease/App.js:4570:820)
at Function.fX.constructBean (http://localhost:8080/WPWebRelease/App.js:2336:472)
at r$.J.initialize (http://localhost:8080/WPWebRelease/App.js:5041:66)
at OW.J.init (http://localhost:8080/WPWebRelease/App.js:950:452)
at OW.J.u (http://localhost:8080/WPWebRelease/App.js:951:454)
at $$.J.addBead (http://localhost:8080/WPWebRelease/App.js:357:549)
The main difference:
project compiled from "SDK-develop" runs fine in js-debug and gives error in js-release and, compiled from "SDK-ROYALE_INTERFACE_INFO" does not launch because of conversion error.
Hiedra
De: Roman Isitua <ro...@gmail.com>>
Enviado el: martes, 28 de diciembre de 2021 15:55
Para: users@royale.apache.org<ma...@royale.apache.org>
Asunto: Re: Load time is very slow
@Harb
I have checked out the feature/ROYALE_INTERFACE_INFO branch and compiled asjs and compiler. I have rebuilt my application with modules in release mode.
I get the following error when I attempt to launch a module
<image001.png>
The module loads fine in debug mode
<image002.png>
Snippets of the log
Overview.js:786 Uncaught TypeError: cm.valuesImpl.init is not a function
at Rr.Mr.yl (Overview.js:786)
at Function.iq.generateMXMLProperties (Overview.js:736)
at Rr.hq.generateMXMLAttributes (Overview.js:546)
at new Rr (Overview.js:804)
at LN.J.loadHandler (FrontEnd.js:1967)
Mr.yl @ Overview.js:786
iq.generateMXMLProperties @ Overview.js:736
hq.generateMXMLAttributes @ Overview.js:546
Rr @ Overview.js:804
J.loadHandler @ FrontEnd.js:1967
load (async)
LN.loadModule @ FrontEnd.js:1965
dN.loadModule @ FrontEnd.js:2406
LD.Un @ FrontEnd.js:1809
ny @ FrontEnd.js:123
ny @ FrontEnd.js:248
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
I have attached the full log to this email.
On Tue, Dec 28, 2021 at 2:51 PM Roman Isitua <ro...@gmail.com>> wrote:
Hi Maria,
Prior to starting this mail discussion "Load time is very slow". I can confirm I have only been compiling in debug mode. My target\javascript\bin\ only had js-debug. It was after I upgraded my royale sdk from 0.9.7 to 0.9.8 that I compiled in release mode.
On Tue, Dec 28, 2021 at 2:24 PM Maria Jose Esteve <mj...@iest.com>> wrote:
Hi, @Roman, I think you are doing a double compile can it be? My times are the same as yours and I always compile in debug and release.
Look at your target folder " target\javascript\bin\" and if you have two folders: js-debug and js-release you are compiling always double.
In my case, the architecture of my project as well as the Maven compilation files (pom.xml) were provided by an external company (we didn't know anything about Maven or Royale at that time) and I understand that this formula was chosen to show us the options we had.
A priori and without doing any test as Harb has done, I think that modularity gives us the advantage of compiling parts of the code once and not compiling them again if they are not modified. So far WITH MY COMPILATION TIMES, sometimes more than 1 minute, this is fundamental. But of course, now we have the problem of minification of the modules and it is really a serious problem because it is impossible for us to deploy in production.
I will try to separate the compiación realese with a profile and if I succeed I will pass it to you @Roman.
@Harb what do you mean by compiling the ROYALE_INTERFACE_INFO branch?
Hiedra
De: Harbs <ha...@gmail.com>>
Enviado el: lunes, 27 de diciembre de 2021 18:32
Para: users@royale.apache.org<ma...@royale.apache.org>
Asunto: Re: Load time is very slow
That doesn’t sound right.
Are you sure you’re compiling debug and not release? That sounds like release build times.
On Dec 27, 2021, at 3:31 PM, Roman Isitua <ro...@gmail.com>> wrote:
Wow ! You are using a workstation with a bleeding edge processor.
I just compiled my app now. It took 44 seconds. (First compilation after ide start up.) Subsequently compilations are usually 19s to 20s.
My application code base is very very small compared to yours. As we continue to add functionality, I expect the compile times to rise.
<MainApp_pom.xml><Overview_pom.xml><fm_client2_pom.xml>
Re: Compiling Modules (was Re: Load time is very slow)
Posted by Roman Isitua <ro...@gmail.com>.
I am using maven modules in a hierarchy as well. Mine is like
<modules>
<module>MainApp</module>
<module>Overview</module>
</modules>
I think the main difference between yours and mine is that I am using
j:ModuleLoader at runtime to load a module when a side menu is clicked.
On Sat, Jan 1, 2022 at 4:02 AM Maria Jose Esteve <mj...@iest.com> wrote:
> I think, as Greg says, "after 3 McAllan I can only have faith" 😝, we are
> having a misconception....
>
> If you are using j:ModuleLoader, you are using runtime module loading,
> like we used to do in Flex is that right? This is different from Maven
> modules.
>
>
>
> Maven modules are somewhat different, although conceptually they are
> similar. Imagine a "library" that is composed of different
> "sub-libraries/modules", each of them could be a module, swc, configured in
> a pom. In my case, I have a main pom (I think your SpacioFM2) that contains
> 2 sub-modules the application and the library. In the module "royaleapp"
> are all the "views" and in the library there is a module for each
> logical/conceptual entity I need: For example, I have a module that is
> "royalecomponents", another one that is "royaledto", another one
> "royaleproducts", etc... etc. ....
>
>
>
> In my main pom I have configured the following modules: royeleapp and
> royalelibs
>
>
>
>
>
> <modules>
>
> <module>royaleapp</module>
>
> <module>royalelibs</module>
>
> </modules>
>
>
>
>
>
> In the royalelibs pom I have configured different modules:
>
>
>
>
>
> <modules>
>
>
>
> <module>royalecustomtheme</module>
>
> <module>royaleecharts</module>
>
> <module>royalejscalendar</module>
>
> <module>royalecomponents</module>
>
> <module>royaleinspiretree</module>
>
> <module>royalearq</module>
>
> <module>royaledto</module>
>
> <module>royalecommons</module>
>
> <module>royaleconfig</module>
>
> <module>royaleconfigsystem</module>
>
> <module>royalesproducts</module>
>
> …
>
> </modules>
>
>
>
> When I refer to the Maven modules I mean these, the ones that are between
> <modules></modules> in some of the pom's.
>
>
>
> I don't know if I have explained myself well Roman....
>
>
>
> Overview.mxml where is it located in your pom's hierarchy? In the lib
> (royalelibs)?
>
>
>
> Hiedra
>
>
>
> *De:* Roman Isitua <ro...@gmail.com>
> *Enviado el:* viernes, 31 de diciembre de 2021 19:41
> *Para:* users@royale.apache.org
> *Asunto:* Re: Compiling Modules (was Re: Load time is very slow)
>
>
>
> I have tested on both. The error log is the same.
>
>
>
> I don't understand your second question. Kindly clarify ?
>
>
>
>
>
> I followed strictly the approach used for loading modules here in this
> example.
>
> This is the only method I know for loading modules. If there is another
> method please share.
>
>
>
>
>
>
> https://royale.apache.org/dividing-an-apache-royale-application-with-modules/
>
>
>
> On Fri, 31 Dec 2021, 19:14 Maria Jose Esteve, <mj...@iest.com> wrote:
>
> @Roman, which branch did you compile the SDK from, ROYALE_INTERFACE_INFO
> or develop?
>
> Could you pass the Overview.mxml view to the main application? (to rule
> it out)
>
>
>
> Hiedra
>
>
>
> *De:* Roman Isitua <ro...@gmail.com>
> *Enviado el:* viernes, 31 de diciembre de 2021 17:56
> *Para:* users@royale.apache.org
> *Asunto:* Re: Compiling Modules (was Re: Load time is very slow)
>
>
>
> I have tried tracing where the errors are happening whenever I test the
> release version
>
> Uncaught TypeError: Ql.valuesImpl.init is not a function
> at Hr.Cr.um (Overview.js:846)
> at Function.ep.generateMXMLProperties (Overview.js:795)
> at Hr.Sp.generateMXMLAttributes (Overview.js:599)
> at new Hr (Overview.js:864)
> at PN.M.loadHandler (FrontEnd.js:2042)
> 9Overview.js:173 Uncaught TypeError: this.createElement is not a function
> at $B.V (Overview.js:173)
> at new $B (FrontEnd.js:2430)
> at EP.convert (FrontEnd.js:2430)
> at Zy (FrontEnd.js:261)
> at HTMLAnchorElement.Uy (FrontEnd.js:121)
> at HTMLAnchorElement.Sy.b (FrontEnd.js:117)
>
>
>
>
>
> The highlighted code in red is declared as follows in the Overview.mxml
> (maven module)
>
>
>
> <j:valuesImpl>
>
> <js:SimpleCSSValuesImpl/>
>
> </j:valuesImpl>
>
>
>
> The j:valuesImpl points to the following code in jewel Module.js
>
>
>
> /**
> * @nocollapse
> * @export
> * @type {org.apache.royale.core.IValuesImpl}
> */
> org.apache.royale.jewel.Module.prototype.valuesImpl;
>
>
> org.apache.royale.jewel.Module.prototype.set__valuesImpl = function(value)
> {
> org.apache.royale.core.ValuesManager.valuesImpl.init(this);
> };
>
>
>
>
>
> it appears this function is improperly renamed and whenever the app tries
> to load the module is not able to recognise it as a function.
>
>
>
> The same issue of improper function renaming is happening in the second
> error as well
>
>
>
> 9Overview.js:173 Uncaught TypeError: this.createElement is not a function
>
>
>
>
>
> On Thu, Dec 30, 2021 at 10:42 PM Roman Isitua <ro...@gmail.com>
> wrote:
>
>
>
> I have applied the js compiler option as follows
>
>
>
>
> <additionalCompilerOptions>-source-map=false;-compiler.show-binding-warnings=false;-js-default-initializers=true;-js-dynamic-access-unknown-members=true;
> -js-compiler-option=--variable_map_output_file
> gccvars.txt;-js-compiler-option+=--property_map_output_file gccprops.txt
> </additionalCompilerOptions>
>
>
>
>
>
> I get the same error as before when attempting to launch the jewel module.
>
>
>
>
>
>
>
> Same error trace.
>
>
>
> Uncaught TypeError: cm.valuesImpl.init is not a function
> at Rr.Mr.yl (Overview.js:786)
> at Function.iq.generateMXMLProperties (Overview.js:736)
> at Rr.hq.generateMXMLAttributes (Overview.js:546)
> at new Rr (Overview.js:804)
> at LN.J.loadHandler (FrontEnd.js:1967)
> FrontEnd.js:1640 Uncaught TypeError: M is not a function
> at oM.J.handleMouseOut (FrontEnd.js:1640)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:248)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> FrontEnd.js:1640 Uncaught TypeError: M is not a function
> at oM.J.handleMouseOver (FrontEnd.js:1640)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:248)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> FrontEnd.js:1640 Uncaught TypeError: M is not a function
> at oM.J.handleMouseOut (FrontEnd.js:1640)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:248)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> FrontEnd.js:1640 Uncaught TypeError: M is not a function
> at oM.J.handleMouseOver (FrontEnd.js:1640)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:248)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> FrontEnd.js:1640 Uncaught TypeError: M is not a function
> at oM.J.handleMouseOut (FrontEnd.js:1640)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:248)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> FrontEnd.js:1640 Uncaught TypeError: M is not a function
> at oM.J.handleMouseOver (FrontEnd.js:1640)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:248)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> FrontEnd.js:1640 Uncaught TypeError: M is not a function
> at oM.J.handleMouseOut (FrontEnd.js:1640)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:248)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> 3Overview.js:56 Uncaught TypeError: Cannot read properties of undefined
> (reading 'prototype')
> at P (Overview.js:56)
> at SG.convert (FrontEnd.js:904)
> at ny (FrontEnd.js:248)
> at HTMLElement.iy (FrontEnd.js:125)
> at HTMLElement.b (FrontEnd.js:121)
>
>
>
> On Thu, Dec 30, 2021 at 6:56 PM Harbs <ha...@gmail.com> wrote:
>
> 1. I’d get rid of the agressive minification options. It will likely cause
> issues. If you get it to work without those options, you can try to add
> them back in and see if it still works.
>
> 2. You seem to be missing the compiler options explained here:
> https://apache.github.io/royale-docs/features/modules#minification
>
>
>
> For a pom, it would look something like this (adjust your paths to match
> your setup):
>
>
>
> Main app:
>
> <additionalCompilerOptions>-source-map=true;-js-compiler-option=--variable_map_output_file
> gccvars.txt;-js-compiler-option+=--property_map_output_file
> gccprops.txt</additionalCompilerOptions>
>
>
>
> Module:
>
> <additionalCompilerOptions>-source-map=true;-js-compiler-option=--variable_map_input_file
> ../../../../../MainApp/bin/js-release/gccvars.txt;-js-compiler-option+=--property_map_input_file
> ../../../../../MainApp/bin/js-release/gccprops.txt</additionalCompilerOptions>
>
>
>
> On Dec 30, 2021, at 7:43 PM, Roman Isitua <ro...@gmail.com> wrote:
>
>
>
> I think it will be better for me to share my pom's that way you can see
> all the compilation options used. The pom for the parent (FmClient2), the
> MainApp and one module (Overview) have been attached to this email.
>
>
>
>
>
> On Thu, Dec 30, 2021 at 6:22 PM Harbs <ha...@gmail.com> wrote:
>
> Roman, can you share your full compiler options?
>
>
>
> I decided to remove the below settings completely
> -export-public-symbols=false
> -prevent-rename-protected-symbols=false
> -prevent-rename-public-symbols=false
> -prevent-rename-internal-symbols=false
>
>
> I enabled the below settings
>
> -js-dynamic-access-unknown-members=true;
> -js-default-initializers=true
>
>
> The release version starts up
>
>
>
> Hiedra, that’s great!
>
>
>
> On Dec 30, 2021, at 7:15 PM, Roman Isitua <ro...@gmail.com> wrote:
>
>
>
>
>
> Yes. I am testing with the sdk compiled on branch ROYALE_INTERFACE_INFO
>
>
>
> On Thu, Dec 30, 2021 at 6:10 PM Maria Jose Esteve <mj...@iest.com>
> wrote:
>
> Roman, are you testing with the SDK compiled from the Harb branches,
> ROYALE_INTERFACE_INFO, or from develop?
>
>
>
> Hiedra
>
>
>
> *De:* Roman Isitua <ro...@gmail.com>
> *Enviado el:* jueves, 30 de diciembre de 2021 16:52
> *Para:* users@royale.apache.org
> *Asunto:* Re: Compiling Modules (was Re: Load time is very slow)
>
>
>
> I decided to remove the below settings completely
> -export-public-symbols=false
> -prevent-rename-protected-symbols=false
> -prevent-rename-public-symbols=false
> -prevent-rename-internal-symbols=false
>
>
> I enabled the below settings
>
> -js-dynamic-access-unknown-members=true;
> -js-default-initializers=true
>
>
> The release version starts up
>
>
>
>
>
>
>
> <image001.png>
>
>
>
>
>
> <image002.png>
>
>
>
> However, the moment I launch a module. I get the below error
>
>
>
> <image003.png>
>
>
>
>
>
> It appears to be failing when I launch the "*Overview*" module
> (by clicking the Overview side menu).
>
>
>
> So my current observation is that by retaining only two settings
>
>
>
> -js-dynamic-access-unknown-members=true;
> -js-default-initializers=true
>
>
>
> The release module starts up but the app fails whenever I launch a module.
>
>
>
> The smallest size settings in the documentation do not work. The app does
> not start up.
>
>
>
> -export-public-symbols=false
> -prevent-rename-protected-symbols=false
> -prevent-rename-public-symbols=false
> -prevent-rename-internal-symbols=false
>
>
>
>
>
>
>
> The error trace is below
>
>
>
>
>
> Uncaught TypeError: cm.valuesImpl.init is not a function
> at Wr.Rr.pl <http://wr.rr.pl/> (Overview.js:792)
> at Function.mq.generateMXMLProperties (Overview.js:743)
> at Wr.lq.generateMXMLAttributes (Overview.js:551)
> at new Wr (Overview.js:810)
> at QN.J.loadHandler (FrontEnd.js:1978)
> 3Overview.js:56 Uncaught TypeError: Cannot read properties of undefined
> (reading 'prototype')
> at P (Overview.js:56)
> at VG.convert (FrontEnd.js:910)
> at ny (FrontEnd.js:250)
> at HTMLElement.iy (FrontEnd.js:125)
> at HTMLElement.b (FrontEnd.js:121)
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOut (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOver (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOver @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOut (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOut @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOver (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOver @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOut (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOut @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOver (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOver @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOut (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOut @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOver (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOver @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOut (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOut @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
>
>
>
> On Thu, Dec 30, 2021 at 4:32 PM Roman Isitua <ro...@gmail.com>
> wrote:
>
> I get the same error even when I set
> the -js-dynamic-access-unknown-members=true;
>
>
>
> On Thu, Dec 30, 2021 at 4:24 PM Roman Isitua <ro...@gmail.com>
> wrote:
>
>
>
> Using the below settings,
>
> -export-public-symbols=false
> -prevent-rename-protected-symbols=false
> -prevent-rename-public-symbols=false
> -prevent-rename-internal-symbols=false
> -js-dynamic-access-unknown-members=false;
>
> -js-default-initializers=true
>
>
> Debug version runs fine. The release version does not start up
>
> <image004.png>
>
>
> I get the below errors
>
> Uncaught TypeError: Cannot read properties of undefined (reading 'apply')
> at KE.hm (FrontEnd.js:1600)
> at XE.M.Fb (FrontEnd.js:943)
> at XE.M.uh (FrontEnd.js:937)
> at FE.M.na <http://fe.m.na/> (FrontEnd.js:497)
> at FE.M.v (FrontEnd.js:497)
> at dR.M.S (FrontEnd.js:213)
> at dR.Nz.S (FrontEnd.js:217)
> at dR.M.start (FrontEnd.js:1396)
> at index.html:45
> :8080/favicon.ico:1 Failed to load resource: the server responded with a
> status of 404 (Not Found)
>
>
>
>
>
> FrontEnd.js is the start up class for the application. i.e. It implements
> the Jewel application class.
>
>
>
>
>
>
>
> On Thu, Dec 30, 2021 at 3:19 PM Roman Isitua <ro...@gmail.com>
> wrote:
>
> Hi Harb,
>
>
>
> Thanks for your response. I have gone through the documentation. I will do
> my test again starting with the smallest size option and share my findings.
>
>
>
> Regards,
>
>
>
> On Thu, Dec 30, 2021 at 10:59 AM Harbs <ha...@gmail.com> wrote:
>
> Sorry for my deal in responding.
>
>
>
> Let’s take a step back.
>
>
>
> I’m not sure how you are compiling your modules. I just added some content
> to the module documentation page which explains what compiler options you
> need while compiling modules. (It still needs some editing.)
> https://apache.github.io/royale-docs/features/modules#minification
>
>
>
> Are you using those options?
>
>
>
> On Dec 29, 2021, at 2:19 AM, Maria Jose Esteve <mj...@iest.com> wrote:
>
>
>
> Hi, Let me join you with these tests....
>
>
>
> @Harb, I have compiled the SDK from this branch, feature/ROYALE_INTERFACE_INFO,
> and when running in debug I get this error:
>
>
>
> Message on the PURGE CONSOLE is displayed:
>
>
>
> Cannot convert org.apache.royale.reflection.beads.ClassAliasBead to IBead
>
>
>
> Message in the IDE Window:
>
>
>
> Se produjo una excepción: TypeError: Cannot convert [object Object] to
> IBead
>
> at App.org.apache.royale.core.ElementWrapper.addBead (
> http://localhost:8080/WNetSuitePlus/org/apache/royale/core/ElementWrapper.js:114:11
> )
>
> at App.org.apache.royale.core.HTMLElementWrapper.addBead (
> http://localhost:8080/WNetSuitePlus/org/apache/royale/core/HTMLElementWrapper.js:43:65
> )
>
> at App.org.apache.royale.jewel.Application.start (
> http://localhost:8080/WNetSuitePlus/org/apache/royale/jewel/Application.js:246:10
> )
>
> at App.App_loadXML (http://localhost:8080/WNetSuitePlus/App.js:1681:25
> )
>
> at
> org.apache.royale.net.URLLoader.org.apache.royale.events.EventDispatcher.fireListeners
> (
> http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:97:23
> )
>
> at Function.goog.events.EventTarget.dispatchEventInternal_ (
> http://localhost:8080/WNetSuitePlus/library/closure/goog/events/eventtarget.js:381:26
> )
>
> at
> org.apache.royale.net.URLLoader.org.apache.royale.events.EventDispatcher.dispatchEvent
> (
> http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:72:37
> )
>
> at org.apache.royale.net.URLLoader.jsEventHandler (
> http://localhost:8080/WNetSuitePlus/org/apache/royale/net/URLLoader.js:169:12
> )
>
>
>
> Call stack:
>
>
>
> <image003.png>
>
>
>
> [INFO] Executing MXMLC in tool group Royale with args: [
>
>
> -load-config=D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\compile-app-config.xml,
>
> -js-default-initializers=true,
>
> -source-map=true,
>
> -js-dynamic-access-unknown-members=true,
>
>
> -keep-as3-metadata+=Inject,Dispatcher,EventHandler,Event,PostConstruct,PreDestroy,ViewAdded,ViewRemoved,Bindable,Transient,
>
> -keep-code-with-metadata=Inject,
>
> -show-binding-warnings=false,
>
> -export-public-symbols=false,
>
> -prevent-rename-protected-symbols=false,
>
> -prevent-rename-internal-symbols=false,
>
>
> -js-output=D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\javascript,
>
> -compiler.targets=JSRoyale,
>
>
> D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\src\main\royale\App.mxml
>
>
>
>
>
> The release execution does not change, the error is the same as before
> (SDK compilation from the develop branch):
>
>
>
> Se produjo una excepción: ReferenceError: Error #1065: Variable
> com.iest.winplusweb.models.MasterConfigSystemModel is not defined.
>
> at yR (http://localhost:8080/WPWebRelease/App.js:3605:1771)
>
> at Mya (http://localhost:8080/WPWebRelease/App.js:3343:365)
>
> at AR.J.usa (http://localhost:8080/WPWebRelease/App.js:434:441)
>
> at GFa.J.fromTypeDefinition (
> http://localhost:8080/WPWebRelease/App.js:5706:139)
>
> at Function.YT.getTypeDescriptor (
> http://localhost:8080/WPWebRelease/App.js:4570:820)
>
> at Function.fX.constructBean (
> http://localhost:8080/WPWebRelease/App.js:2336:472)
>
> at r$.J.initialize (http://localhost:8080/WPWebRelease/App.js:5041:66)
>
> at OW.J.init (http://localhost:8080/WPWebRelease/App.js:950:452)
>
> at OW.J.u (http://localhost:8080/WPWebRelease/App.js:951:454)
>
> at $$.J.addBead (http://localhost:8080/WPWebRelease/App.js:357:549)
>
>
>
> The main difference:
>
> project compiled from "SDK-develop" runs fine in js-debug and gives error
> in js-release and, compiled from "SDK-ROYALE_INTERFACE_INFO" does not
> launch because of conversion error.
>
>
>
> Hiedra
>
>
>
> *De:* Roman Isitua <ro...@gmail.com>
> *Enviado el:* martes, 28 de diciembre de 2021 15:55
> *Para:* users@royale.apache.org
> *Asunto:* Re: Load time is very slow
>
>
>
> @Harb
>
>
>
> I have checked out the feature/ROYALE_INTERFACE_INFO branch and compiled
> asjs and compiler. I have rebuilt my application with modules in release
> mode.
>
>
>
> I get the following error when I attempt to launch a module
>
>
>
>
>
> <image001.png>
>
>
>
>
>
> The module loads fine in debug mode
>
>
>
> <image002.png>
>
>
>
>
>
> Snippets of the log
>
>
>
> Overview.js:786 Uncaught TypeError: cm.valuesImpl.init is not a function
> at Rr.Mr.yl (Overview.js:786)
> at Function.iq.generateMXMLProperties (Overview.js:736)
> at Rr.hq.generateMXMLAttributes (Overview.js:546)
> at new Rr (Overview.js:804)
> at LN.J.loadHandler (FrontEnd.js:1967)
> Mr.yl @ Overview.js:786
> iq.generateMXMLProperties @ Overview.js:736
> hq.generateMXMLAttributes @ Overview.js:546
> Rr @ Overview.js:804
> J.loadHandler @ FrontEnd.js:1967
> load (async)
> LN.loadModule @ FrontEnd.js:1965
> dN.loadModule @ FrontEnd.js:2406
> LD.Un @ FrontEnd.js:1809
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:248
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
>
>
>
>
>
> I have attached the full log to this email.
>
>
>
>
>
>
>
>
>
> On Tue, Dec 28, 2021 at 2:51 PM Roman Isitua <ro...@gmail.com>
> wrote:
>
> Hi Maria,
>
>
>
> Prior to starting this mail discussion "Load time is very slow". I can
> confirm I have only been compiling in debug mode. My target\javascript\bin\
> only had js-debug. It was after I upgraded my royale sdk from 0.9.7 to
> 0.9.8 that I compiled in release mode.
>
>
>
>
>
>
>
> On Tue, Dec 28, 2021 at 2:24 PM Maria Jose Esteve <mj...@iest.com>
> wrote:
>
> Hi, @Roman, I think you are doing a double compile can it be? My times are
> the same as yours and I always compile in debug and release.
>
>
>
> Look at your target folder " target\javascript\bin\" and if you have two
> folders: js-debug and js-release you are compiling always double.
>
>
>
> In my case, the architecture of my project as well as the Maven
> compilation files (pom.xml) were provided by an external company (we didn't
> know anything about Maven or Royale at that time) and I understand that
> this formula was chosen to show us the options we had.
>
>
>
> A priori and without doing any test as Harb has done, I think that
> modularity gives us the advantage of compiling parts of the code once and
> not compiling them again if they are not modified. So far WITH MY
> COMPILATION TIMES, sometimes more than 1 minute, this is fundamental. But
> of course, now we have the problem of minification of the modules and it is
> really a serious problem because it is impossible for us to deploy in
> production.
>
>
>
> I will try to separate the compiación realese with a profile and if I
> succeed I will pass it to you @Roman.
>
>
>
> @Harb what do you mean by compiling the ROYALE_INTERFACE_INFO branch?
>
>
>
> Hiedra
>
>
>
> *De:* Harbs <ha...@gmail.com>
> *Enviado el:* lunes, 27 de diciembre de 2021 18:32
> *Para:* users@royale.apache.org
> *Asunto:* Re: Load time is very slow
>
>
>
> That doesn’t sound right.
>
>
>
> Are you sure you’re compiling debug and not release? That sounds like
> release build times.
>
>
>
> On Dec 27, 2021, at 3:31 PM, Roman Isitua <ro...@gmail.com> wrote:
>
>
>
> Wow ! You are using a workstation with a bleeding edge processor.
>
>
>
> I just compiled my app now. It took 44 seconds. (First compilation after
> ide start up.) Subsequently compilations are usually 19s to 20s.
>
>
>
> My application code base is very very small compared to yours. As we
> continue to add functionality, I expect the compile times to rise.
>
>
>
>
>
>
>
>
>
> <MainApp_pom.xml><Overview_pom.xml><fm_client2_pom.xml>
>
>
>
>
RE: Compiling Modules (was Re: Load time is very slow)
Posted by Maria Jose Esteve <mj...@iest.com>.
I think, as Greg says, "after 3 McAllan I can only have faith" 😝, we are having a misconception....
If you are using j:ModuleLoader, you are using runtime module loading, like we used to do in Flex is that right? This is different from Maven modules.
Maven modules are somewhat different, although conceptually they are similar. Imagine a "library" that is composed of different "sub-libraries/modules", each of them could be a module, swc, configured in a pom. In my case, I have a main pom (I think your SpacioFM2) that contains 2 sub-modules the application and the library. In the module "royaleapp" are all the "views" and in the library there is a module for each logical/conceptual entity I need: For example, I have a module that is "royalecomponents", another one that is "royaledto", another one "royaleproducts", etc... etc. ....
In my main pom I have configured the following modules: royeleapp and royalelibs
<modules>
<module>royaleapp</module>
<module>royalelibs</module>
</modules>
In the royalelibs pom I have configured different modules:
<modules>
<module>royalecustomtheme</module>
<module>royaleecharts</module>
<module>royalejscalendar</module>
<module>royalecomponents</module>
<module>royaleinspiretree</module>
<module>royalearq</module>
<module>royaledto</module>
<module>royalecommons</module>
<module>royaleconfig</module>
<module>royaleconfigsystem</module>
<module>royalesproducts</module>
…
</modules>
When I refer to the Maven modules I mean these, the ones that are between <modules></modules> in some of the pom's.
I don't know if I have explained myself well Roman....
Overview.mxml where is it located in your pom's hierarchy? In the lib (royalelibs)?
Hiedra
De: Roman Isitua <ro...@gmail.com>
Enviado el: viernes, 31 de diciembre de 2021 19:41
Para: users@royale.apache.org
Asunto: Re: Compiling Modules (was Re: Load time is very slow)
I have tested on both. The error log is the same.
I don't understand your second question. Kindly clarify ?
I followed strictly the approach used for loading modules here in this example.
This is the only method I know for loading modules. If there is another method please share.
https://royale.apache.org/dividing-an-apache-royale-application-with-modules/
On Fri, 31 Dec 2021, 19:14 Maria Jose Esteve, <mj...@iest.com>> wrote:
@Roman, which branch did you compile the SDK from, ROYALE_INTERFACE_INFO or develop?
Could you pass the Overview.mxml view to the main application? (to rule it out)
Hiedra
De: Roman Isitua <ro...@gmail.com>>
Enviado el: viernes, 31 de diciembre de 2021 17:56
Para: users@royale.apache.org<ma...@royale.apache.org>
Asunto: Re: Compiling Modules (was Re: Load time is very slow)
I have tried tracing where the errors are happening whenever I test the release version
Uncaught TypeError: Ql.valuesImpl.init is not a function
at Hr.Cr.um (Overview.js:846)
at Function.ep.generateMXMLProperties (Overview.js:795)
at Hr.Sp.generateMXMLAttributes (Overview.js:599)
at new Hr (Overview.js:864)
at PN.M.loadHandler (FrontEnd.js:2042)
9Overview.js:173 Uncaught TypeError: this.createElement is not a function
at $B.V (Overview.js:173)
at new $B (FrontEnd.js:2430)
at EP.convert (FrontEnd.js:2430)
at Zy (FrontEnd.js:261)
at HTMLAnchorElement.Uy (FrontEnd.js:121)
at HTMLAnchorElement.Sy.b (FrontEnd.js:117)
The highlighted code in red is declared as follows in the Overview.mxml (maven module)
<j:valuesImpl>
<js:SimpleCSSValuesImpl/>
</j:valuesImpl>
The j:valuesImpl points to the following code in jewel Module.js
/**
* @nocollapse
* @export
* @type {org.apache.royale.core.IValuesImpl}
*/
org.apache.royale.jewel.Module.prototype.valuesImpl;
org.apache.royale.jewel.Module.prototype.set__valuesImpl = function(value) {
org.apache.royale.core.ValuesManager.valuesImpl.init(this);
};
it appears this function is improperly renamed and whenever the app tries to load the module is not able to recognise it as a function.
The same issue of improper function renaming is happening in the second error as well
9Overview.js:173 Uncaught TypeError: this.createElement is not a function
On Thu, Dec 30, 2021 at 10:42 PM Roman Isitua <ro...@gmail.com>> wrote:
I have applied the js compiler option as follows
<additionalCompilerOptions>-source-map=false;-compiler.show-binding-warnings=false;-js-default-initializers=true;-js-dynamic-access-unknown-members=true;
-js-compiler-option=--variable_map_output_file gccvars.txt;-js-compiler-option+=--property_map_output_file gccprops.txt
</additionalCompilerOptions>
I get the same error as before when attempting to launch the jewel module.
[cid:image001.png@01D7FE7A.90D67D00]
Same error trace.
Uncaught TypeError: cm.valuesImpl.init is not a function
at Rr.Mr.yl (Overview.js:786)
at Function.iq.generateMXMLProperties (Overview.js:736)
at Rr.hq.generateMXMLAttributes (Overview.js:546)
at new Rr (Overview.js:804)
at LN.J.loadHandler (FrontEnd.js:1967)
FrontEnd.js:1640 Uncaught TypeError: M is not a function
at oM.J.handleMouseOut (FrontEnd.js:1640)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:248)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
FrontEnd.js:1640 Uncaught TypeError: M is not a function
at oM.J.handleMouseOver (FrontEnd.js:1640)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:248)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
FrontEnd.js:1640 Uncaught TypeError: M is not a function
at oM.J.handleMouseOut (FrontEnd.js:1640)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:248)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
FrontEnd.js:1640 Uncaught TypeError: M is not a function
at oM.J.handleMouseOver (FrontEnd.js:1640)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:248)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
FrontEnd.js:1640 Uncaught TypeError: M is not a function
at oM.J.handleMouseOut (FrontEnd.js:1640)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:248)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
FrontEnd.js:1640 Uncaught TypeError: M is not a function
at oM.J.handleMouseOver (FrontEnd.js:1640)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:248)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
FrontEnd.js:1640 Uncaught TypeError: M is not a function
at oM.J.handleMouseOut (FrontEnd.js:1640)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:248)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
3Overview.js:56 Uncaught TypeError: Cannot read properties of undefined (reading 'prototype')
at P (Overview.js:56)
at SG.convert (FrontEnd.js:904)
at ny (FrontEnd.js:248)
at HTMLElement.iy (FrontEnd.js:125)
at HTMLElement.b (FrontEnd.js:121)
On Thu, Dec 30, 2021 at 6:56 PM Harbs <ha...@gmail.com>> wrote:
1. I’d get rid of the agressive minification options. It will likely cause issues. If you get it to work without those options, you can try to add them back in and see if it still works.
2. You seem to be missing the compiler options explained here: https://apache.github.io/royale-docs/features/modules#minification
For a pom, it would look something like this (adjust your paths to match your setup):
Main app:
<additionalCompilerOptions>-source-map=true;-js-compiler-option=--variable_map_output_file gccvars.txt;-js-compiler-option+=--property_map_output_file gccprops.txt</additionalCompilerOptions>
Module:
<additionalCompilerOptions>-source-map=true;-js-compiler-option=--variable_map_input_file ../../../../../MainApp/bin/js-release/gccvars.txt;-js-compiler-option+=--property_map_input_file ../../../../../MainApp/bin/js-release/gccprops.txt</additionalCompilerOptions>
On Dec 30, 2021, at 7:43 PM, Roman Isitua <ro...@gmail.com>> wrote:
I think it will be better for me to share my pom's that way you can see all the compilation options used. The pom for the parent (FmClient2), the MainApp and one module (Overview) have been attached to this email.
On Thu, Dec 30, 2021 at 6:22 PM Harbs <ha...@gmail.com>> wrote:
Roman, can you share your full compiler options?
I decided to remove the below settings completely
-export-public-symbols=false
-prevent-rename-protected-symbols=false
-prevent-rename-public-symbols=false
-prevent-rename-internal-symbols=false
I enabled the below settings
-js-dynamic-access-unknown-members=true;
-js-default-initializers=true
The release version starts up
Hiedra, that’s great!
On Dec 30, 2021, at 7:15 PM, Roman Isitua <ro...@gmail.com>> wrote:
Yes. I am testing with the sdk compiled on branch ROYALE_INTERFACE_INFO
On Thu, Dec 30, 2021 at 6:10 PM Maria Jose Esteve <mj...@iest.com>> wrote:
Roman, are you testing with the SDK compiled from the Harb branches, ROYALE_INTERFACE_INFO, or from develop?
Hiedra
De: Roman Isitua <ro...@gmail.com>>
Enviado el: jueves, 30 de diciembre de 2021 16:52
Para: users@royale.apache.org<ma...@royale.apache.org>
Asunto: Re: Compiling Modules (was Re: Load time is very slow)
I decided to remove the below settings completely
-export-public-symbols=false
-prevent-rename-protected-symbols=false
-prevent-rename-public-symbols=false
-prevent-rename-internal-symbols=false
I enabled the below settings
-js-dynamic-access-unknown-members=true;
-js-default-initializers=true
The release version starts up
<image001.png>
<image002.png>
However, the moment I launch a module. I get the below error
<image003.png>
It appears to be failing when I launch the "Overview" module (by clicking the Overview side menu).
So my current observation is that by retaining only two settings
-js-dynamic-access-unknown-members=true;
-js-default-initializers=true
The release module starts up but the app fails whenever I launch a module.
The smallest size settings in the documentation do not work. The app does not start up.
-export-public-symbols=false
-prevent-rename-protected-symbols=false
-prevent-rename-public-symbols=false
-prevent-rename-internal-symbols=false
The error trace is below
Uncaught TypeError: cm.valuesImpl.init is not a function
at Wr.Rr.pl<http://wr.rr.pl/> (Overview.js:792)
at Function.mq.generateMXMLProperties (Overview.js:743)
at Wr.lq.generateMXMLAttributes (Overview.js:551)
at new Wr (Overview.js:810)
at QN.J.loadHandler (FrontEnd.js:1978)
3Overview.js:56 Uncaught TypeError: Cannot read properties of undefined (reading 'prototype')
at P (Overview.js:56)
at VG.convert (FrontEnd.js:910)
at ny (FrontEnd.js:250)
at HTMLElement.iy (FrontEnd.js:125)
at HTMLElement.b (FrontEnd.js:121)
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOut (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOver (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOver @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOut (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOut @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOver (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOver @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOut (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOut @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOver (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOver @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOut (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOut @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOver (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOver @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOut (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOut @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
On Thu, Dec 30, 2021 at 4:32 PM Roman Isitua <ro...@gmail.com>> wrote:
I get the same error even when I set the -js-dynamic-access-unknown-members=true;
On Thu, Dec 30, 2021 at 4:24 PM Roman Isitua <ro...@gmail.com>> wrote:
Using the below settings,
-export-public-symbols=false
-prevent-rename-protected-symbols=false
-prevent-rename-public-symbols=false
-prevent-rename-internal-symbols=false
-js-dynamic-access-unknown-members=false;
-js-default-initializers=true
Debug version runs fine. The release version does not start up
<image004.png>
I get the below errors
Uncaught TypeError: Cannot read properties of undefined (reading 'apply')
at KE.hm (FrontEnd.js:1600)
at XE.M.Fb (FrontEnd.js:943)
at XE.M.uh (FrontEnd.js:937)
at FE.M.na<http://fe.m.na/> (FrontEnd.js:497)
at FE.M.v (FrontEnd.js:497)
at dR.M.S (FrontEnd.js:213)
at dR.Nz.S (FrontEnd.js:217)
at dR.M.start (FrontEnd.js:1396)
at index.html:45
:8080/favicon.ico:1 Failed to load resource: the server responded with a status of 404 (Not Found)
FrontEnd.js is the start up class for the application. i.e. It implements the Jewel application class.
On Thu, Dec 30, 2021 at 3:19 PM Roman Isitua <ro...@gmail.com>> wrote:
Hi Harb,
Thanks for your response. I have gone through the documentation. I will do my test again starting with the smallest size option and share my findings.
Regards,
On Thu, Dec 30, 2021 at 10:59 AM Harbs <ha...@gmail.com>> wrote:
Sorry for my deal in responding.
Let’s take a step back.
I’m not sure how you are compiling your modules. I just added some content to the module documentation page which explains what compiler options you need while compiling modules. (It still needs some editing.) https://apache.github.io/royale-docs/features/modules#minification
Are you using those options?
On Dec 29, 2021, at 2:19 AM, Maria Jose Esteve <mj...@iest.com>> wrote:
Hi, Let me join you with these tests....
@Harb, I have compiled the SDK from this branch, feature/ROYALE_INTERFACE_INFO, and when running in debug I get this error:
Message on the PURGE CONSOLE is displayed:
Cannot convert org.apache.royale.reflection.beads.ClassAliasBead to IBead
Message in the IDE Window:
Se produjo una excepción: TypeError: Cannot convert [object Object] to IBead
at App.org.apache.royale.core.ElementWrapper.addBead (http://localhost:8080/WNetSuitePlus/org/apache/royale/core/ElementWrapper.js:114:11)
at App.org.apache.royale.core.HTMLElementWrapper.addBead (http://localhost:8080/WNetSuitePlus/org/apache/royale/core/HTMLElementWrapper.js:43:65)
at App.org.apache.royale.jewel.Application.start (http://localhost:8080/WNetSuitePlus/org/apache/royale/jewel/Application.js:246:10)
at App.App_loadXML (http://localhost:8080/WNetSuitePlus/App.js:1681:25)
at org.apache.royale.net.URLLoader.org.apache.royale.events.EventDispatcher.fireListeners (http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:97:23)
at Function.goog.events.EventTarget.dispatchEventInternal_ (http://localhost:8080/WNetSuitePlus/library/closure/goog/events/eventtarget.js:381:26)
at org.apache.royale.net.URLLoader.org.apache.royale.events.EventDispatcher.dispatchEvent (http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:72:37)
at org.apache.royale.net.URLLoader.jsEventHandler (http://localhost:8080/WNetSuitePlus/org/apache/royale/net/URLLoader.js:169:12)
Call stack:
<image003.png>
[INFO] Executing MXMLC in tool group Royale with args: [
-load-config=D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\compile-app-config.xml,
-js-default-initializers=true,
-source-map=true,
-js-dynamic-access-unknown-members=true,
-keep-as3-metadata+=Inject,Dispatcher,EventHandler,Event,PostConstruct,PreDestroy,ViewAdded,ViewRemoved,Bindable,Transient,
-keep-code-with-metadata=Inject,
-show-binding-warnings=false,
-export-public-symbols=false,
-prevent-rename-protected-symbols=false,
-prevent-rename-internal-symbols=false,
-js-output=D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\javascript,
-compiler.targets=JSRoyale,
D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\src\main\royale\App.mxml
The release execution does not change, the error is the same as before (SDK compilation from the develop branch):
Se produjo una excepción: ReferenceError: Error #1065: Variable com.iest.winplusweb.models.MasterConfigSystemModel is not defined.
at yR (http://localhost:8080/WPWebRelease/App.js:3605:1771)
at Mya (http://localhost:8080/WPWebRelease/App.js:3343:365)
at AR.J.usa (http://localhost:8080/WPWebRelease/App.js:434:441)
at GFa.J.fromTypeDefinition (http://localhost:8080/WPWebRelease/App.js:5706:139)
at Function.YT.getTypeDescriptor (http://localhost:8080/WPWebRelease/App.js:4570:820)
at Function.fX.constructBean (http://localhost:8080/WPWebRelease/App.js:2336:472)
at r$.J.initialize (http://localhost:8080/WPWebRelease/App.js:5041:66)
at OW.J.init (http://localhost:8080/WPWebRelease/App.js:950:452)
at OW.J.u (http://localhost:8080/WPWebRelease/App.js:951:454)
at $$.J.addBead (http://localhost:8080/WPWebRelease/App.js:357:549)
The main difference:
project compiled from "SDK-develop" runs fine in js-debug and gives error in js-release and, compiled from "SDK-ROYALE_INTERFACE_INFO" does not launch because of conversion error.
Hiedra
De: Roman Isitua <ro...@gmail.com>>
Enviado el: martes, 28 de diciembre de 2021 15:55
Para: users@royale.apache.org<ma...@royale.apache.org>
Asunto: Re: Load time is very slow
@Harb
I have checked out the feature/ROYALE_INTERFACE_INFO branch and compiled asjs and compiler. I have rebuilt my application with modules in release mode.
I get the following error when I attempt to launch a module
<image001.png>
The module loads fine in debug mode
<image002.png>
Snippets of the log
Overview.js:786 Uncaught TypeError: cm.valuesImpl.init is not a function
at Rr.Mr.yl (Overview.js:786)
at Function.iq.generateMXMLProperties (Overview.js:736)
at Rr.hq.generateMXMLAttributes (Overview.js:546)
at new Rr (Overview.js:804)
at LN.J.loadHandler (FrontEnd.js:1967)
Mr.yl @ Overview.js:786
iq.generateMXMLProperties @ Overview.js:736
hq.generateMXMLAttributes @ Overview.js:546
Rr @ Overview.js:804
J.loadHandler @ FrontEnd.js:1967
load (async)
LN.loadModule @ FrontEnd.js:1965
dN.loadModule @ FrontEnd.js:2406
LD.Un @ FrontEnd.js:1809
ny @ FrontEnd.js:123
ny @ FrontEnd.js:248
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
I have attached the full log to this email.
On Tue, Dec 28, 2021 at 2:51 PM Roman Isitua <ro...@gmail.com>> wrote:
Hi Maria,
Prior to starting this mail discussion "Load time is very slow". I can confirm I have only been compiling in debug mode. My target\javascript\bin\ only had js-debug. It was after I upgraded my royale sdk from 0.9.7 to 0.9.8 that I compiled in release mode.
On Tue, Dec 28, 2021 at 2:24 PM Maria Jose Esteve <mj...@iest.com>> wrote:
Hi, @Roman, I think you are doing a double compile can it be? My times are the same as yours and I always compile in debug and release.
Look at your target folder " target\javascript\bin\" and if you have two folders: js-debug and js-release you are compiling always double.
In my case, the architecture of my project as well as the Maven compilation files (pom.xml) were provided by an external company (we didn't know anything about Maven or Royale at that time) and I understand that this formula was chosen to show us the options we had.
A priori and without doing any test as Harb has done, I think that modularity gives us the advantage of compiling parts of the code once and not compiling them again if they are not modified. So far WITH MY COMPILATION TIMES, sometimes more than 1 minute, this is fundamental. But of course, now we have the problem of minification of the modules and it is really a serious problem because it is impossible for us to deploy in production.
I will try to separate the compiación realese with a profile and if I succeed I will pass it to you @Roman.
@Harb what do you mean by compiling the ROYALE_INTERFACE_INFO branch?
Hiedra
De: Harbs <ha...@gmail.com>>
Enviado el: lunes, 27 de diciembre de 2021 18:32
Para: users@royale.apache.org<ma...@royale.apache.org>
Asunto: Re: Load time is very slow
That doesn’t sound right.
Are you sure you’re compiling debug and not release? That sounds like release build times.
On Dec 27, 2021, at 3:31 PM, Roman Isitua <ro...@gmail.com>> wrote:
Wow ! You are using a workstation with a bleeding edge processor.
I just compiled my app now. It took 44 seconds. (First compilation after ide start up.) Subsequently compilations are usually 19s to 20s.
My application code base is very very small compared to yours. As we continue to add functionality, I expect the compile times to rise.
<MainApp_pom.xml><Overview_pom.xml><fm_client2_pom.xml>
Re: Compiling Modules (was Re: Load time is very slow)
Posted by Roman Isitua <ro...@gmail.com>.
I have tested on both. The error log is the same.
I don't understand your second question. Kindly clarify ?
I followed strictly the approach used for loading modules here in this
example.
This is the only method I know for loading modules. If there is another
method please share.
https://royale.apache.org/dividing-an-apache-royale-application-with-modules/
On Fri, 31 Dec 2021, 19:14 Maria Jose Esteve, <mj...@iest.com> wrote:
> @Roman, which branch did you compile the SDK from, ROYALE_INTERFACE_INFO
> or develop?
>
> Could you pass the Overview.mxml view to the main application? (to rule
> it out)
>
>
>
> Hiedra
>
>
>
> *De:* Roman Isitua <ro...@gmail.com>
> *Enviado el:* viernes, 31 de diciembre de 2021 17:56
> *Para:* users@royale.apache.org
> *Asunto:* Re: Compiling Modules (was Re: Load time is very slow)
>
>
>
> I have tried tracing where the errors are happening whenever I test the
> release version
>
> Uncaught TypeError: Ql.valuesImpl.init is not a function
> at Hr.Cr.um (Overview.js:846)
> at Function.ep.generateMXMLProperties (Overview.js:795)
> at Hr.Sp.generateMXMLAttributes (Overview.js:599)
> at new Hr (Overview.js:864)
> at PN.M.loadHandler (FrontEnd.js:2042)
> 9Overview.js:173 Uncaught TypeError: this.createElement is not a function
> at $B.V (Overview.js:173)
> at new $B (FrontEnd.js:2430)
> at EP.convert (FrontEnd.js:2430)
> at Zy (FrontEnd.js:261)
> at HTMLAnchorElement.Uy (FrontEnd.js:121)
> at HTMLAnchorElement.Sy.b (FrontEnd.js:117)
>
>
>
>
>
> The highlighted code in red is declared as follows in the Overview.mxml
> (maven module)
>
>
>
> <j:valuesImpl>
>
> <js:SimpleCSSValuesImpl/>
>
> </j:valuesImpl>
>
>
>
> The j:valuesImpl points to the following code in jewel Module.js
>
>
>
> /**
> * @nocollapse
> * @export
> * @type {org.apache.royale.core.IValuesImpl}
> */
> org.apache.royale.jewel.Module.prototype.valuesImpl;
>
>
> org.apache.royale.jewel.Module.prototype.set__valuesImpl = function(value)
> {
> org.apache.royale.core.ValuesManager.valuesImpl.init(this);
> };
>
>
>
>
>
> it appears this function is improperly renamed and whenever the app tries
> to load the module is not able to recognise it as a function.
>
>
>
> The same issue of improper function renaming is happening in the second
> error as well
>
>
>
> 9Overview.js:173 Uncaught TypeError: this.createElement is not a function
>
>
>
>
>
> On Thu, Dec 30, 2021 at 10:42 PM Roman Isitua <ro...@gmail.com>
> wrote:
>
>
>
> I have applied the js compiler option as follows
>
>
>
>
> <additionalCompilerOptions>-source-map=false;-compiler.show-binding-warnings=false;-js-default-initializers=true;-js-dynamic-access-unknown-members=true;
> -js-compiler-option=--variable_map_output_file
> gccvars.txt;-js-compiler-option+=--property_map_output_file gccprops.txt
> </additionalCompilerOptions>
>
>
>
>
>
> I get the same error as before when attempting to launch the jewel module.
>
>
>
>
>
>
>
> Same error trace.
>
>
>
> Uncaught TypeError: cm.valuesImpl.init is not a function
> at Rr.Mr.yl (Overview.js:786)
> at Function.iq.generateMXMLProperties (Overview.js:736)
> at Rr.hq.generateMXMLAttributes (Overview.js:546)
> at new Rr (Overview.js:804)
> at LN.J.loadHandler (FrontEnd.js:1967)
> FrontEnd.js:1640 Uncaught TypeError: M is not a function
> at oM.J.handleMouseOut (FrontEnd.js:1640)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:248)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> FrontEnd.js:1640 Uncaught TypeError: M is not a function
> at oM.J.handleMouseOver (FrontEnd.js:1640)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:248)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> FrontEnd.js:1640 Uncaught TypeError: M is not a function
> at oM.J.handleMouseOut (FrontEnd.js:1640)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:248)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> FrontEnd.js:1640 Uncaught TypeError: M is not a function
> at oM.J.handleMouseOver (FrontEnd.js:1640)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:248)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> FrontEnd.js:1640 Uncaught TypeError: M is not a function
> at oM.J.handleMouseOut (FrontEnd.js:1640)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:248)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> FrontEnd.js:1640 Uncaught TypeError: M is not a function
> at oM.J.handleMouseOver (FrontEnd.js:1640)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:248)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> FrontEnd.js:1640 Uncaught TypeError: M is not a function
> at oM.J.handleMouseOut (FrontEnd.js:1640)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:248)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> 3Overview.js:56 Uncaught TypeError: Cannot read properties of undefined
> (reading 'prototype')
> at P (Overview.js:56)
> at SG.convert (FrontEnd.js:904)
> at ny (FrontEnd.js:248)
> at HTMLElement.iy (FrontEnd.js:125)
> at HTMLElement.b (FrontEnd.js:121)
>
>
>
> On Thu, Dec 30, 2021 at 6:56 PM Harbs <ha...@gmail.com> wrote:
>
> 1. I’d get rid of the agressive minification options. It will likely cause
> issues. If you get it to work without those options, you can try to add
> them back in and see if it still works.
>
> 2. You seem to be missing the compiler options explained here:
> https://apache.github.io/royale-docs/features/modules#minification
>
>
>
> For a pom, it would look something like this (adjust your paths to match
> your setup):
>
>
>
> Main app:
>
> <additionalCompilerOptions>-source-map=true;-js-compiler-option=--variable_map_output_file
> gccvars.txt;-js-compiler-option+=--property_map_output_file
> gccprops.txt</additionalCompilerOptions>
>
>
>
> Module:
>
> <additionalCompilerOptions>-source-map=true;-js-compiler-option=--variable_map_input_file
> ../../../../../MainApp/bin/js-release/gccvars.txt;-js-compiler-option+=--property_map_input_file
> ../../../../../MainApp/bin/js-release/gccprops.txt</additionalCompilerOptions>
>
>
>
> On Dec 30, 2021, at 7:43 PM, Roman Isitua <ro...@gmail.com> wrote:
>
>
>
> I think it will be better for me to share my pom's that way you can see
> all the compilation options used. The pom for the parent (FmClient2), the
> MainApp and one module (Overview) have been attached to this email.
>
>
>
>
>
> On Thu, Dec 30, 2021 at 6:22 PM Harbs <ha...@gmail.com> wrote:
>
> Roman, can you share your full compiler options?
>
>
>
> I decided to remove the below settings completely
> -export-public-symbols=false
> -prevent-rename-protected-symbols=false
> -prevent-rename-public-symbols=false
> -prevent-rename-internal-symbols=false
>
>
> I enabled the below settings
>
> -js-dynamic-access-unknown-members=true;
> -js-default-initializers=true
>
>
> The release version starts up
>
>
>
> Hiedra, that’s great!
>
>
>
> On Dec 30, 2021, at 7:15 PM, Roman Isitua <ro...@gmail.com> wrote:
>
>
>
>
>
> Yes. I am testing with the sdk compiled on branch ROYALE_INTERFACE_INFO
>
>
>
> On Thu, Dec 30, 2021 at 6:10 PM Maria Jose Esteve <mj...@iest.com>
> wrote:
>
> Roman, are you testing with the SDK compiled from the Harb branches,
> ROYALE_INTERFACE_INFO, or from develop?
>
>
>
> Hiedra
>
>
>
> *De:* Roman Isitua <ro...@gmail.com>
> *Enviado el:* jueves, 30 de diciembre de 2021 16:52
> *Para:* users@royale.apache.org
> *Asunto:* Re: Compiling Modules (was Re: Load time is very slow)
>
>
>
> I decided to remove the below settings completely
> -export-public-symbols=false
> -prevent-rename-protected-symbols=false
> -prevent-rename-public-symbols=false
> -prevent-rename-internal-symbols=false
>
>
> I enabled the below settings
>
> -js-dynamic-access-unknown-members=true;
> -js-default-initializers=true
>
>
> The release version starts up
>
>
>
>
>
>
>
> <image001.png>
>
>
>
>
>
> <image002.png>
>
>
>
> However, the moment I launch a module. I get the below error
>
>
>
> <image003.png>
>
>
>
>
>
> It appears to be failing when I launch the "*Overview*" module
> (by clicking the Overview side menu).
>
>
>
> So my current observation is that by retaining only two settings
>
>
>
> -js-dynamic-access-unknown-members=true;
> -js-default-initializers=true
>
>
>
> The release module starts up but the app fails whenever I launch a module.
>
>
>
> The smallest size settings in the documentation do not work. The app does
> not start up.
>
>
>
> -export-public-symbols=false
> -prevent-rename-protected-symbols=false
> -prevent-rename-public-symbols=false
> -prevent-rename-internal-symbols=false
>
>
>
>
>
>
>
> The error trace is below
>
>
>
>
>
> Uncaught TypeError: cm.valuesImpl.init is not a function
> at Wr.Rr.pl <http://wr.rr.pl/> (Overview.js:792)
> at Function.mq.generateMXMLProperties (Overview.js:743)
> at Wr.lq.generateMXMLAttributes (Overview.js:551)
> at new Wr (Overview.js:810)
> at QN.J.loadHandler (FrontEnd.js:1978)
> 3Overview.js:56 Uncaught TypeError: Cannot read properties of undefined
> (reading 'prototype')
> at P (Overview.js:56)
> at VG.convert (FrontEnd.js:910)
> at ny (FrontEnd.js:250)
> at HTMLElement.iy (FrontEnd.js:125)
> at HTMLElement.b (FrontEnd.js:121)
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOut (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOver (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOver @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOut (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOut @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOver (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOver @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOut (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOut @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOver (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOver @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOut (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOut @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOver (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOver @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOut (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOut @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
>
>
>
> On Thu, Dec 30, 2021 at 4:32 PM Roman Isitua <ro...@gmail.com>
> wrote:
>
> I get the same error even when I set
> the -js-dynamic-access-unknown-members=true;
>
>
>
> On Thu, Dec 30, 2021 at 4:24 PM Roman Isitua <ro...@gmail.com>
> wrote:
>
>
>
> Using the below settings,
>
> -export-public-symbols=false
> -prevent-rename-protected-symbols=false
> -prevent-rename-public-symbols=false
> -prevent-rename-internal-symbols=false
> -js-dynamic-access-unknown-members=false;
>
> -js-default-initializers=true
>
>
> Debug version runs fine. The release version does not start up
>
> <image004.png>
>
>
> I get the below errors
>
> Uncaught TypeError: Cannot read properties of undefined (reading 'apply')
> at KE.hm (FrontEnd.js:1600)
> at XE.M.Fb (FrontEnd.js:943)
> at XE.M.uh (FrontEnd.js:937)
> at FE.M.na <http://fe.m.na/> (FrontEnd.js:497)
> at FE.M.v (FrontEnd.js:497)
> at dR.M.S (FrontEnd.js:213)
> at dR.Nz.S (FrontEnd.js:217)
> at dR.M.start (FrontEnd.js:1396)
> at index.html:45
> :8080/favicon.ico:1 Failed to load resource: the server responded with a
> status of 404 (Not Found)
>
>
>
>
>
> FrontEnd.js is the start up class for the application. i.e. It implements
> the Jewel application class.
>
>
>
>
>
>
>
> On Thu, Dec 30, 2021 at 3:19 PM Roman Isitua <ro...@gmail.com>
> wrote:
>
> Hi Harb,
>
>
>
> Thanks for your response. I have gone through the documentation. I will do
> my test again starting with the smallest size option and share my findings.
>
>
>
> Regards,
>
>
>
> On Thu, Dec 30, 2021 at 10:59 AM Harbs <ha...@gmail.com> wrote:
>
> Sorry for my deal in responding.
>
>
>
> Let’s take a step back.
>
>
>
> I’m not sure how you are compiling your modules. I just added some content
> to the module documentation page which explains what compiler options you
> need while compiling modules. (It still needs some editing.)
> https://apache.github.io/royale-docs/features/modules#minification
>
>
>
> Are you using those options?
>
>
>
> On Dec 29, 2021, at 2:19 AM, Maria Jose Esteve <mj...@iest.com> wrote:
>
>
>
> Hi, Let me join you with these tests....
>
>
>
> @Harb, I have compiled the SDK from this branch, feature/ROYALE_INTERFACE_INFO,
> and when running in debug I get this error:
>
>
>
> Message on the PURGE CONSOLE is displayed:
>
>
>
> Cannot convert org.apache.royale.reflection.beads.ClassAliasBead to IBead
>
>
>
> Message in the IDE Window:
>
>
>
> Se produjo una excepción: TypeError: Cannot convert [object Object] to
> IBead
>
> at App.org.apache.royale.core.ElementWrapper.addBead (
> http://localhost:8080/WNetSuitePlus/org/apache/royale/core/ElementWrapper.js:114:11
> )
>
> at App.org.apache.royale.core.HTMLElementWrapper.addBead (
> http://localhost:8080/WNetSuitePlus/org/apache/royale/core/HTMLElementWrapper.js:43:65
> )
>
> at App.org.apache.royale.jewel.Application.start (
> http://localhost:8080/WNetSuitePlus/org/apache/royale/jewel/Application.js:246:10
> )
>
> at App.App_loadXML (http://localhost:8080/WNetSuitePlus/App.js:1681:25
> )
>
> at
> org.apache.royale.net.URLLoader.org.apache.royale.events.EventDispatcher.fireListeners
> (
> http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:97:23
> )
>
> at Function.goog.events.EventTarget.dispatchEventInternal_ (
> http://localhost:8080/WNetSuitePlus/library/closure/goog/events/eventtarget.js:381:26
> )
>
> at
> org.apache.royale.net.URLLoader.org.apache.royale.events.EventDispatcher.dispatchEvent
> (
> http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:72:37
> )
>
> at org.apache.royale.net.URLLoader.jsEventHandler (
> http://localhost:8080/WNetSuitePlus/org/apache/royale/net/URLLoader.js:169:12
> )
>
>
>
> Call stack:
>
>
>
> <image003.png>
>
>
>
> [INFO] Executing MXMLC in tool group Royale with args: [
>
>
> -load-config=D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\compile-app-config.xml,
>
> -js-default-initializers=true,
>
> -source-map=true,
>
> -js-dynamic-access-unknown-members=true,
>
>
> -keep-as3-metadata+=Inject,Dispatcher,EventHandler,Event,PostConstruct,PreDestroy,ViewAdded,ViewRemoved,Bindable,Transient,
>
> -keep-code-with-metadata=Inject,
>
> -show-binding-warnings=false,
>
> -export-public-symbols=false,
>
> -prevent-rename-protected-symbols=false,
>
> -prevent-rename-internal-symbols=false,
>
>
> -js-output=D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\javascript,
>
> -compiler.targets=JSRoyale,
>
>
> D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\src\main\royale\App.mxml
>
>
>
>
>
> The release execution does not change, the error is the same as before
> (SDK compilation from the develop branch):
>
>
>
> Se produjo una excepción: ReferenceError: Error #1065: Variable
> com.iest.winplusweb.models.MasterConfigSystemModel is not defined.
>
> at yR (http://localhost:8080/WPWebRelease/App.js:3605:1771)
>
> at Mya (http://localhost:8080/WPWebRelease/App.js:3343:365)
>
> at AR.J.usa (http://localhost:8080/WPWebRelease/App.js:434:441)
>
> at GFa.J.fromTypeDefinition (
> http://localhost:8080/WPWebRelease/App.js:5706:139)
>
> at Function.YT.getTypeDescriptor (
> http://localhost:8080/WPWebRelease/App.js:4570:820)
>
> at Function.fX.constructBean (
> http://localhost:8080/WPWebRelease/App.js:2336:472)
>
> at r$.J.initialize (http://localhost:8080/WPWebRelease/App.js:5041:66)
>
> at OW.J.init (http://localhost:8080/WPWebRelease/App.js:950:452)
>
> at OW.J.u (http://localhost:8080/WPWebRelease/App.js:951:454)
>
> at $$.J.addBead (http://localhost:8080/WPWebRelease/App.js:357:549)
>
>
>
> The main difference:
>
> project compiled from "SDK-develop" runs fine in js-debug and gives error
> in js-release and, compiled from "SDK-ROYALE_INTERFACE_INFO" does not
> launch because of conversion error.
>
>
>
> Hiedra
>
>
>
> *De:* Roman Isitua <ro...@gmail.com>
> *Enviado el:* martes, 28 de diciembre de 2021 15:55
> *Para:* users@royale.apache.org
> *Asunto:* Re: Load time is very slow
>
>
>
> @Harb
>
>
>
> I have checked out the feature/ROYALE_INTERFACE_INFO branch and compiled
> asjs and compiler. I have rebuilt my application with modules in release
> mode.
>
>
>
> I get the following error when I attempt to launch a module
>
>
>
>
>
> <image001.png>
>
>
>
>
>
> The module loads fine in debug mode
>
>
>
> <image002.png>
>
>
>
>
>
> Snippets of the log
>
>
>
> Overview.js:786 Uncaught TypeError: cm.valuesImpl.init is not a function
> at Rr.Mr.yl (Overview.js:786)
> at Function.iq.generateMXMLProperties (Overview.js:736)
> at Rr.hq.generateMXMLAttributes (Overview.js:546)
> at new Rr (Overview.js:804)
> at LN.J.loadHandler (FrontEnd.js:1967)
> Mr.yl @ Overview.js:786
> iq.generateMXMLProperties @ Overview.js:736
> hq.generateMXMLAttributes @ Overview.js:546
> Rr @ Overview.js:804
> J.loadHandler @ FrontEnd.js:1967
> load (async)
> LN.loadModule @ FrontEnd.js:1965
> dN.loadModule @ FrontEnd.js:2406
> LD.Un @ FrontEnd.js:1809
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:248
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
>
>
>
>
>
> I have attached the full log to this email.
>
>
>
>
>
>
>
>
>
> On Tue, Dec 28, 2021 at 2:51 PM Roman Isitua <ro...@gmail.com>
> wrote:
>
> Hi Maria,
>
>
>
> Prior to starting this mail discussion "Load time is very slow". I can
> confirm I have only been compiling in debug mode. My target\javascript\bin\
> only had js-debug. It was after I upgraded my royale sdk from 0.9.7 to
> 0.9.8 that I compiled in release mode.
>
>
>
>
>
>
>
> On Tue, Dec 28, 2021 at 2:24 PM Maria Jose Esteve <mj...@iest.com>
> wrote:
>
> Hi, @Roman, I think you are doing a double compile can it be? My times are
> the same as yours and I always compile in debug and release.
>
>
>
> Look at your target folder " target\javascript\bin\" and if you have two
> folders: js-debug and js-release you are compiling always double.
>
>
>
> In my case, the architecture of my project as well as the Maven
> compilation files (pom.xml) were provided by an external company (we didn't
> know anything about Maven or Royale at that time) and I understand that
> this formula was chosen to show us the options we had.
>
>
>
> A priori and without doing any test as Harb has done, I think that
> modularity gives us the advantage of compiling parts of the code once and
> not compiling them again if they are not modified. So far WITH MY
> COMPILATION TIMES, sometimes more than 1 minute, this is fundamental. But
> of course, now we have the problem of minification of the modules and it is
> really a serious problem because it is impossible for us to deploy in
> production.
>
>
>
> I will try to separate the compiación realese with a profile and if I
> succeed I will pass it to you @Roman.
>
>
>
> @Harb what do you mean by compiling the ROYALE_INTERFACE_INFO branch?
>
>
>
> Hiedra
>
>
>
> *De:* Harbs <ha...@gmail.com>
> *Enviado el:* lunes, 27 de diciembre de 2021 18:32
> *Para:* users@royale.apache.org
> *Asunto:* Re: Load time is very slow
>
>
>
> That doesn’t sound right.
>
>
>
> Are you sure you’re compiling debug and not release? That sounds like
> release build times.
>
>
>
> On Dec 27, 2021, at 3:31 PM, Roman Isitua <ro...@gmail.com> wrote:
>
>
>
> Wow ! You are using a workstation with a bleeding edge processor.
>
>
>
> I just compiled my app now. It took 44 seconds. (First compilation after
> ide start up.) Subsequently compilations are usually 19s to 20s.
>
>
>
> My application code base is very very small compared to yours. As we
> continue to add functionality, I expect the compile times to rise.
>
>
>
>
>
>
>
>
>
> <MainApp_pom.xml><Overview_pom.xml><fm_client2_pom.xml>
>
>
>
>
RE: Compiling Modules (was Re: Load time is very slow)
Posted by Maria Jose Esteve <mj...@iest.com>.
@Roman, which branch did you compile the SDK from, ROYALE_INTERFACE_INFO or develop?
Could you pass the Overview.mxml view to the main application? (to rule it out)
Hiedra
De: Roman Isitua <ro...@gmail.com>
Enviado el: viernes, 31 de diciembre de 2021 17:56
Para: users@royale.apache.org
Asunto: Re: Compiling Modules (was Re: Load time is very slow)
I have tried tracing where the errors are happening whenever I test the release version
Uncaught TypeError: Ql.valuesImpl.init is not a function
at Hr.Cr.um (Overview.js:846)
at Function.ep.generateMXMLProperties (Overview.js:795)
at Hr.Sp.generateMXMLAttributes (Overview.js:599)
at new Hr (Overview.js:864)
at PN.M.loadHandler (FrontEnd.js:2042)
9Overview.js:173 Uncaught TypeError: this.createElement is not a function
at $B.V (Overview.js:173)
at new $B (FrontEnd.js:2430)
at EP.convert (FrontEnd.js:2430)
at Zy (FrontEnd.js:261)
at HTMLAnchorElement.Uy (FrontEnd.js:121)
at HTMLAnchorElement.Sy.b (FrontEnd.js:117)
The highlighted code in red is declared as follows in the Overview.mxml (maven module)
<j:valuesImpl>
<js:SimpleCSSValuesImpl/>
</j:valuesImpl>
The j:valuesImpl points to the following code in jewel Module.js
/**
* @nocollapse
* @export
* @type {org.apache.royale.core.IValuesImpl}
*/
org.apache.royale.jewel.Module.prototype.valuesImpl;
org.apache.royale.jewel.Module.prototype.set__valuesImpl = function(value) {
org.apache.royale.core.ValuesManager.valuesImpl.init(this);
};
it appears this function is improperly renamed and whenever the app tries to load the module is not able to recognise it as a function.
The same issue of improper function renaming is happening in the second error as well
9Overview.js:173 Uncaught TypeError: this.createElement is not a function
On Thu, Dec 30, 2021 at 10:42 PM Roman Isitua <ro...@gmail.com>> wrote:
I have applied the js compiler option as follows
<additionalCompilerOptions>-source-map=false;-compiler.show-binding-warnings=false;-js-default-initializers=true;-js-dynamic-access-unknown-members=true;
-js-compiler-option=--variable_map_output_file gccvars.txt;-js-compiler-option+=--property_map_output_file gccprops.txt
</additionalCompilerOptions>
I get the same error as before when attempting to launch the jewel module.
[cid:image001.png@01D7FE7A.90D67D00]
Same error trace.
Uncaught TypeError: cm.valuesImpl.init is not a function
at Rr.Mr.yl (Overview.js:786)
at Function.iq.generateMXMLProperties (Overview.js:736)
at Rr.hq.generateMXMLAttributes (Overview.js:546)
at new Rr (Overview.js:804)
at LN.J.loadHandler (FrontEnd.js:1967)
FrontEnd.js:1640 Uncaught TypeError: M is not a function
at oM.J.handleMouseOut (FrontEnd.js:1640)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:248)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
FrontEnd.js:1640 Uncaught TypeError: M is not a function
at oM.J.handleMouseOver (FrontEnd.js:1640)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:248)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
FrontEnd.js:1640 Uncaught TypeError: M is not a function
at oM.J.handleMouseOut (FrontEnd.js:1640)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:248)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
FrontEnd.js:1640 Uncaught TypeError: M is not a function
at oM.J.handleMouseOver (FrontEnd.js:1640)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:248)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
FrontEnd.js:1640 Uncaught TypeError: M is not a function
at oM.J.handleMouseOut (FrontEnd.js:1640)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:248)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
FrontEnd.js:1640 Uncaught TypeError: M is not a function
at oM.J.handleMouseOver (FrontEnd.js:1640)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:248)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
FrontEnd.js:1640 Uncaught TypeError: M is not a function
at oM.J.handleMouseOut (FrontEnd.js:1640)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:248)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
3Overview.js:56 Uncaught TypeError: Cannot read properties of undefined (reading 'prototype')
at P (Overview.js:56)
at SG.convert (FrontEnd.js:904)
at ny (FrontEnd.js:248)
at HTMLElement.iy (FrontEnd.js:125)
at HTMLElement.b (FrontEnd.js:121)
On Thu, Dec 30, 2021 at 6:56 PM Harbs <ha...@gmail.com>> wrote:
1. I’d get rid of the agressive minification options. It will likely cause issues. If you get it to work without those options, you can try to add them back in and see if it still works.
2. You seem to be missing the compiler options explained here: https://apache.github.io/royale-docs/features/modules#minification
For a pom, it would look something like this (adjust your paths to match your setup):
Main app:
<additionalCompilerOptions>-source-map=true;-js-compiler-option=--variable_map_output_file gccvars.txt;-js-compiler-option+=--property_map_output_file gccprops.txt</additionalCompilerOptions>
Module:
<additionalCompilerOptions>-source-map=true;-js-compiler-option=--variable_map_input_file ../../../../../MainApp/bin/js-release/gccvars.txt;-js-compiler-option+=--property_map_input_file ../../../../../MainApp/bin/js-release/gccprops.txt</additionalCompilerOptions>
On Dec 30, 2021, at 7:43 PM, Roman Isitua <ro...@gmail.com>> wrote:
I think it will be better for me to share my pom's that way you can see all the compilation options used. The pom for the parent (FmClient2), the MainApp and one module (Overview) have been attached to this email.
On Thu, Dec 30, 2021 at 6:22 PM Harbs <ha...@gmail.com>> wrote:
Roman, can you share your full compiler options?
I decided to remove the below settings completely
-export-public-symbols=false
-prevent-rename-protected-symbols=false
-prevent-rename-public-symbols=false
-prevent-rename-internal-symbols=false
I enabled the below settings
-js-dynamic-access-unknown-members=true;
-js-default-initializers=true
The release version starts up
Hiedra, that’s great!
On Dec 30, 2021, at 7:15 PM, Roman Isitua <ro...@gmail.com>> wrote:
Yes. I am testing with the sdk compiled on branch ROYALE_INTERFACE_INFO
On Thu, Dec 30, 2021 at 6:10 PM Maria Jose Esteve <mj...@iest.com>> wrote:
Roman, are you testing with the SDK compiled from the Harb branches, ROYALE_INTERFACE_INFO, or from develop?
Hiedra
De: Roman Isitua <ro...@gmail.com>>
Enviado el: jueves, 30 de diciembre de 2021 16:52
Para: users@royale.apache.org<ma...@royale.apache.org>
Asunto: Re: Compiling Modules (was Re: Load time is very slow)
I decided to remove the below settings completely
-export-public-symbols=false
-prevent-rename-protected-symbols=false
-prevent-rename-public-symbols=false
-prevent-rename-internal-symbols=false
I enabled the below settings
-js-dynamic-access-unknown-members=true;
-js-default-initializers=true
The release version starts up
<image001.png>
<image002.png>
However, the moment I launch a module. I get the below error
<image003.png>
It appears to be failing when I launch the "Overview" module (by clicking the Overview side menu).
So my current observation is that by retaining only two settings
-js-dynamic-access-unknown-members=true;
-js-default-initializers=true
The release module starts up but the app fails whenever I launch a module.
The smallest size settings in the documentation do not work. The app does not start up.
-export-public-symbols=false
-prevent-rename-protected-symbols=false
-prevent-rename-public-symbols=false
-prevent-rename-internal-symbols=false
The error trace is below
Uncaught TypeError: cm.valuesImpl.init is not a function
at Wr.Rr.pl<http://wr.rr.pl/> (Overview.js:792)
at Function.mq.generateMXMLProperties (Overview.js:743)
at Wr.lq.generateMXMLAttributes (Overview.js:551)
at new Wr (Overview.js:810)
at QN.J.loadHandler (FrontEnd.js:1978)
3Overview.js:56 Uncaught TypeError: Cannot read properties of undefined (reading 'prototype')
at P (Overview.js:56)
at VG.convert (FrontEnd.js:910)
at ny (FrontEnd.js:250)
at HTMLElement.iy (FrontEnd.js:125)
at HTMLElement.b (FrontEnd.js:121)
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOut (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOver (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOver @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOut (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOut @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOver (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOver @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOut (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOut @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOver (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOver @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOut (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOut @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOver (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOver @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOut (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOut @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
On Thu, Dec 30, 2021 at 4:32 PM Roman Isitua <ro...@gmail.com>> wrote:
I get the same error even when I set the -js-dynamic-access-unknown-members=true;
On Thu, Dec 30, 2021 at 4:24 PM Roman Isitua <ro...@gmail.com>> wrote:
Using the below settings,
-export-public-symbols=false
-prevent-rename-protected-symbols=false
-prevent-rename-public-symbols=false
-prevent-rename-internal-symbols=false
-js-dynamic-access-unknown-members=false;
-js-default-initializers=true
Debug version runs fine. The release version does not start up
<image004.png>
I get the below errors
Uncaught TypeError: Cannot read properties of undefined (reading 'apply')
at KE.hm (FrontEnd.js:1600)
at XE.M.Fb (FrontEnd.js:943)
at XE.M.uh (FrontEnd.js:937)
at FE.M.na<http://fe.m.na/> (FrontEnd.js:497)
at FE.M.v (FrontEnd.js:497)
at dR.M.S (FrontEnd.js:213)
at dR.Nz.S (FrontEnd.js:217)
at dR.M.start (FrontEnd.js:1396)
at index.html:45
:8080/favicon.ico:1 Failed to load resource: the server responded with a status of 404 (Not Found)
FrontEnd.js is the start up class for the application. i.e. It implements the Jewel application class.
On Thu, Dec 30, 2021 at 3:19 PM Roman Isitua <ro...@gmail.com>> wrote:
Hi Harb,
Thanks for your response. I have gone through the documentation. I will do my test again starting with the smallest size option and share my findings.
Regards,
On Thu, Dec 30, 2021 at 10:59 AM Harbs <ha...@gmail.com>> wrote:
Sorry for my deal in responding.
Let’s take a step back.
I’m not sure how you are compiling your modules. I just added some content to the module documentation page which explains what compiler options you need while compiling modules. (It still needs some editing.) https://apache.github.io/royale-docs/features/modules#minification
Are you using those options?
On Dec 29, 2021, at 2:19 AM, Maria Jose Esteve <mj...@iest.com>> wrote:
Hi, Let me join you with these tests....
@Harb, I have compiled the SDK from this branch, feature/ROYALE_INTERFACE_INFO, and when running in debug I get this error:
Message on the PURGE CONSOLE is displayed:
Cannot convert org.apache.royale.reflection.beads.ClassAliasBead to IBead
Message in the IDE Window:
Se produjo una excepción: TypeError: Cannot convert [object Object] to IBead
at App.org.apache.royale.core.ElementWrapper.addBead (http://localhost:8080/WNetSuitePlus/org/apache/royale/core/ElementWrapper.js:114:11)
at App.org.apache.royale.core.HTMLElementWrapper.addBead (http://localhost:8080/WNetSuitePlus/org/apache/royale/core/HTMLElementWrapper.js:43:65)
at App.org.apache.royale.jewel.Application.start (http://localhost:8080/WNetSuitePlus/org/apache/royale/jewel/Application.js:246:10)
at App.App_loadXML (http://localhost:8080/WNetSuitePlus/App.js:1681:25)
at org.apache.royale.net.URLLoader.org.apache.royale.events.EventDispatcher.fireListeners (http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:97:23)
at Function.goog.events.EventTarget.dispatchEventInternal_ (http://localhost:8080/WNetSuitePlus/library/closure/goog/events/eventtarget.js:381:26)
at org.apache.royale.net.URLLoader.org.apache.royale.events.EventDispatcher.dispatchEvent (http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:72:37)
at org.apache.royale.net.URLLoader.jsEventHandler (http://localhost:8080/WNetSuitePlus/org/apache/royale/net/URLLoader.js:169:12)
Call stack:
<image003.png>
[INFO] Executing MXMLC in tool group Royale with args: [
-load-config=D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\compile-app-config.xml,
-js-default-initializers=true,
-source-map=true,
-js-dynamic-access-unknown-members=true,
-keep-as3-metadata+=Inject,Dispatcher,EventHandler,Event,PostConstruct,PreDestroy,ViewAdded,ViewRemoved,Bindable,Transient,
-keep-code-with-metadata=Inject,
-show-binding-warnings=false,
-export-public-symbols=false,
-prevent-rename-protected-symbols=false,
-prevent-rename-internal-symbols=false,
-js-output=D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\javascript,
-compiler.targets=JSRoyale,
D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\src\main\royale\App.mxml
The release execution does not change, the error is the same as before (SDK compilation from the develop branch):
Se produjo una excepción: ReferenceError: Error #1065: Variable com.iest.winplusweb.models.MasterConfigSystemModel is not defined.
at yR (http://localhost:8080/WPWebRelease/App.js:3605:1771)
at Mya (http://localhost:8080/WPWebRelease/App.js:3343:365)
at AR.J.usa (http://localhost:8080/WPWebRelease/App.js:434:441)
at GFa.J.fromTypeDefinition (http://localhost:8080/WPWebRelease/App.js:5706:139)
at Function.YT.getTypeDescriptor (http://localhost:8080/WPWebRelease/App.js:4570:820)
at Function.fX.constructBean (http://localhost:8080/WPWebRelease/App.js:2336:472)
at r$.J.initialize (http://localhost:8080/WPWebRelease/App.js:5041:66)
at OW.J.init (http://localhost:8080/WPWebRelease/App.js:950:452)
at OW.J.u (http://localhost:8080/WPWebRelease/App.js:951:454)
at $$.J.addBead (http://localhost:8080/WPWebRelease/App.js:357:549)
The main difference:
project compiled from "SDK-develop" runs fine in js-debug and gives error in js-release and, compiled from "SDK-ROYALE_INTERFACE_INFO" does not launch because of conversion error.
Hiedra
De: Roman Isitua <ro...@gmail.com>>
Enviado el: martes, 28 de diciembre de 2021 15:55
Para: users@royale.apache.org<ma...@royale.apache.org>
Asunto: Re: Load time is very slow
@Harb
I have checked out the feature/ROYALE_INTERFACE_INFO branch and compiled asjs and compiler. I have rebuilt my application with modules in release mode.
I get the following error when I attempt to launch a module
<image001.png>
The module loads fine in debug mode
<image002.png>
Snippets of the log
Overview.js:786 Uncaught TypeError: cm.valuesImpl.init is not a function
at Rr.Mr.yl (Overview.js:786)
at Function.iq.generateMXMLProperties (Overview.js:736)
at Rr.hq.generateMXMLAttributes (Overview.js:546)
at new Rr (Overview.js:804)
at LN.J.loadHandler (FrontEnd.js:1967)
Mr.yl @ Overview.js:786
iq.generateMXMLProperties @ Overview.js:736
hq.generateMXMLAttributes @ Overview.js:546
Rr @ Overview.js:804
J.loadHandler @ FrontEnd.js:1967
load (async)
LN.loadModule @ FrontEnd.js:1965
dN.loadModule @ FrontEnd.js:2406
LD.Un @ FrontEnd.js:1809
ny @ FrontEnd.js:123
ny @ FrontEnd.js:248
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
I have attached the full log to this email.
On Tue, Dec 28, 2021 at 2:51 PM Roman Isitua <ro...@gmail.com>> wrote:
Hi Maria,
Prior to starting this mail discussion "Load time is very slow". I can confirm I have only been compiling in debug mode. My target\javascript\bin\ only had js-debug. It was after I upgraded my royale sdk from 0.9.7 to 0.9.8 that I compiled in release mode.
On Tue, Dec 28, 2021 at 2:24 PM Maria Jose Esteve <mj...@iest.com>> wrote:
Hi, @Roman, I think you are doing a double compile can it be? My times are the same as yours and I always compile in debug and release.
Look at your target folder " target\javascript\bin\" and if you have two folders: js-debug and js-release you are compiling always double.
In my case, the architecture of my project as well as the Maven compilation files (pom.xml) were provided by an external company (we didn't know anything about Maven or Royale at that time) and I understand that this formula was chosen to show us the options we had.
A priori and without doing any test as Harb has done, I think that modularity gives us the advantage of compiling parts of the code once and not compiling them again if they are not modified. So far WITH MY COMPILATION TIMES, sometimes more than 1 minute, this is fundamental. But of course, now we have the problem of minification of the modules and it is really a serious problem because it is impossible for us to deploy in production.
I will try to separate the compiación realese with a profile and if I succeed I will pass it to you @Roman.
@Harb what do you mean by compiling the ROYALE_INTERFACE_INFO branch?
Hiedra
De: Harbs <ha...@gmail.com>>
Enviado el: lunes, 27 de diciembre de 2021 18:32
Para: users@royale.apache.org<ma...@royale.apache.org>
Asunto: Re: Load time is very slow
That doesn’t sound right.
Are you sure you’re compiling debug and not release? That sounds like release build times.
On Dec 27, 2021, at 3:31 PM, Roman Isitua <ro...@gmail.com>> wrote:
Wow ! You are using a workstation with a bleeding edge processor.
I just compiled my app now. It took 44 seconds. (First compilation after ide start up.) Subsequently compilations are usually 19s to 20s.
My application code base is very very small compared to yours. As we continue to add functionality, I expect the compile times to rise.
<MainApp_pom.xml><Overview_pom.xml><fm_client2_pom.xml>
Re: Compiling Modules (was Re: Load time is very slow)
Posted by Greg Dove <gr...@gmail.com>.
Sorry I have not been following these threads in detail because I have been
(and am currently still) on vacation.
AFAIK royale modules are not reliable in release mode. I don't know anyone
who has had experience otherwise. I did try testing them some time ago and
that was my experience, and I believe we had similar feedback from others
in the community (who were early users) that it was working for them in the
debug build, but not the release build.
Perhaps it can work in very simple cases in release builds, but beyond that
I think the work on them is not complete. If there are others in the
community whose experience is different and can confirm that things are
working for them in release builds, please let us know.
Maria, it is also possible that in your case, that use of Crux inside
modules is another layer of complexity in release mode, because I did not
test that when I did the original work on Crux. Was this working at some
point in the past and it has now stopped working?
On Fri, Dec 31, 2021 at 11:10 AM Roman Isitua <ro...@gmail.com> wrote:
> Yes.
>
>
> On Thu, 30 Dec 2021, 23:03 Harbs, <ha...@gmail.com> wrote:
>
>> Did you apply the input_file options to the module?
>>
>> On Dec 30, 2021, at 11:42 PM, Roman Isitua <ro...@gmail.com> wrote:
>>
>>
>> I have applied the js compiler option as follows
>>
>>
>> <additionalCompilerOptions>-source-map=false;-compiler.show-binding-warnings=false;-js-default-initializers=true;-js-dynamic-access-unknown-members=true;
>> -js-compiler-option=--variable_map_output_file
>> gccvars.txt;-js-compiler-option+=--property_map_output_file gccprops.txt
>> </additionalCompilerOptions>
>>
>>
>> I get the same error as before when attempting to launch the jewel module.
>>
>> <image.png>
>>
>>
>> Same error trace.
>>
>> Uncaught TypeError: cm.valuesImpl.init is not a function
>> at Rr.Mr.yl (Overview.js:786)
>> at Function.iq.generateMXMLProperties (Overview.js:736)
>> at Rr.hq.generateMXMLAttributes (Overview.js:546)
>> at new Rr (Overview.js:804)
>> at LN.J.loadHandler (FrontEnd.js:1967)
>> FrontEnd.js:1640 Uncaught TypeError: M is not a function
>> at oM.J.handleMouseOut (FrontEnd.js:1640)
>> at Function.ny [as googFireListener] (FrontEnd.js:123)
>> at ny (FrontEnd.js:248)
>> at HTMLAnchorElement.iy (FrontEnd.js:125)
>> at HTMLAnchorElement.b (FrontEnd.js:121)
>> FrontEnd.js:1640 Uncaught TypeError: M is not a function
>> at oM.J.handleMouseOver (FrontEnd.js:1640)
>> at Function.ny [as googFireListener] (FrontEnd.js:123)
>> at ny (FrontEnd.js:248)
>> at HTMLAnchorElement.iy (FrontEnd.js:125)
>> at HTMLAnchorElement.b (FrontEnd.js:121)
>> FrontEnd.js:1640 Uncaught TypeError: M is not a function
>> at oM.J.handleMouseOut (FrontEnd.js:1640)
>> at Function.ny [as googFireListener] (FrontEnd.js:123)
>> at ny (FrontEnd.js:248)
>> at HTMLAnchorElement.iy (FrontEnd.js:125)
>> at HTMLAnchorElement.b (FrontEnd.js:121)
>> FrontEnd.js:1640 Uncaught TypeError: M is not a function
>> at oM.J.handleMouseOver (FrontEnd.js:1640)
>> at Function.ny [as googFireListener] (FrontEnd.js:123)
>> at ny (FrontEnd.js:248)
>> at HTMLAnchorElement.iy (FrontEnd.js:125)
>> at HTMLAnchorElement.b (FrontEnd.js:121)
>> FrontEnd.js:1640 Uncaught TypeError: M is not a function
>> at oM.J.handleMouseOut (FrontEnd.js:1640)
>> at Function.ny [as googFireListener] (FrontEnd.js:123)
>> at ny (FrontEnd.js:248)
>> at HTMLAnchorElement.iy (FrontEnd.js:125)
>> at HTMLAnchorElement.b (FrontEnd.js:121)
>> FrontEnd.js:1640 Uncaught TypeError: M is not a function
>> at oM.J.handleMouseOver (FrontEnd.js:1640)
>> at Function.ny [as googFireListener] (FrontEnd.js:123)
>> at ny (FrontEnd.js:248)
>> at HTMLAnchorElement.iy (FrontEnd.js:125)
>> at HTMLAnchorElement.b (FrontEnd.js:121)
>> FrontEnd.js:1640 Uncaught TypeError: M is not a function
>> at oM.J.handleMouseOut (FrontEnd.js:1640)
>> at Function.ny [as googFireListener] (FrontEnd.js:123)
>> at ny (FrontEnd.js:248)
>> at HTMLAnchorElement.iy (FrontEnd.js:125)
>> at HTMLAnchorElement.b (FrontEnd.js:121)
>> 3Overview.js:56 Uncaught TypeError: Cannot read properties of undefined
>> (reading 'prototype')
>> at P (Overview.js:56)
>> at SG.convert (FrontEnd.js:904)
>> at ny (FrontEnd.js:248)
>> at HTMLElement.iy (FrontEnd.js:125)
>> at HTMLElement.b (FrontEnd.js:121)
>>
>> On Thu, Dec 30, 2021 at 6:56 PM Harbs <ha...@gmail.com> wrote:
>>
>>> 1. I’d get rid of the agressive minification options. It will likely
>>> cause issues. If you get it to work without those options, you can try to
>>> add them back in and see if it still works.
>>> 2. You seem to be missing the compiler options explained here:
>>> https://apache.github.io/royale-docs/features/modules#minification
>>>
>>> For a pom, it would look something like this (adjust your paths to match
>>> your setup):
>>>
>>> Main app:
>>> <additionalCompilerOptions>-source-map=true;-js-compiler-option=--variable_map_output_file
>>> gccvars.txt;-js-compiler-option+=--property_map_output_file
>>> gccprops.txt</additionalCompilerOptions>
>>>
>>> Module:
>>> <additionalCompilerOptions>-source-map=true;-js-compiler-option=--variable_map_input_file
>>> ../../../../../MainApp/bin/js-release/gccvars.txt;-js-compiler-option+=--property_map_input_file
>>> ../../../../../MainApp/bin/js-release/gccprops.txt</additionalCompilerOptions>
>>>
>>> On Dec 30, 2021, at 7:43 PM, Roman Isitua <ro...@gmail.com> wrote:
>>>
>>> I think it will be better for me to share my pom's that way you can see
>>> all the compilation options used. The pom for the parent (FmClient2), the
>>> MainApp and one module (Overview) have been attached to this email.
>>>
>>>
>>> On Thu, Dec 30, 2021 at 6:22 PM Harbs <ha...@gmail.com> wrote:
>>>
>>>> Roman, can you share your full compiler options?
>>>>
>>>> I decided to remove the below settings completely
>>>>> -export-public-symbols=false
>>>>> -prevent-rename-protected-symbols=false
>>>>> -prevent-rename-public-symbols=false
>>>>> -prevent-rename-internal-symbols=false
>>>>>
>>>>>
>>>>> I enabled the below settings
>>>>>
>>>>> -js-dynamic-access-unknown-members=true;
>>>>> -js-default-initializers=true
>>>>>
>>>>>
>>>>> The release version starts up
>>>>>
>>>>>
>>>>>
>>>> Hiedra, that’s great!
>>>>
>>>> On Dec 30, 2021, at 7:15 PM, Roman Isitua <ro...@gmail.com>
>>>> wrote:
>>>>
>>>>
>>>> Yes. I am testing with the sdk compiled on branch ROYALE_INTERFACE_INFO
>>>>
>>>> On Thu, Dec 30, 2021 at 6:10 PM Maria Jose Esteve <mj...@iest.com>
>>>> wrote:
>>>>
>>>>> Roman, are you testing with the SDK compiled from the Harb branches,
>>>>> ROYALE_INTERFACE_INFO, or from develop?
>>>>>
>>>>>
>>>>>
>>>>> Hiedra
>>>>>
>>>>>
>>>>>
>>>>> *De:* Roman Isitua <ro...@gmail.com>
>>>>> *Enviado el:* jueves, 30 de diciembre de 2021 16:52
>>>>> *Para:* users@royale.apache.org
>>>>> *Asunto:* Re: Compiling Modules (was Re: Load time is very slow)
>>>>>
>>>>>
>>>>>
>>>>> I decided to remove the below settings completely
>>>>> -export-public-symbols=false
>>>>> -prevent-rename-protected-symbols=false
>>>>> -prevent-rename-public-symbols=false
>>>>> -prevent-rename-internal-symbols=false
>>>>>
>>>>>
>>>>> I enabled the below settings
>>>>>
>>>>> -js-dynamic-access-unknown-members=true;
>>>>> -js-default-initializers=true
>>>>>
>>>>>
>>>>> The release version starts up
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> <image001.png>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> <image002.png>
>>>>>
>>>>>
>>>>>
>>>>> However, the moment I launch a module. I get the below error
>>>>>
>>>>>
>>>>>
>>>>> <image003.png>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> It appears to be failing when I launch the "*Overview*" module
>>>>> (by clicking the Overview side menu).
>>>>>
>>>>>
>>>>>
>>>>> So my current observation is that by retaining only two settings
>>>>>
>>>>>
>>>>>
>>>>> -js-dynamic-access-unknown-members=true;
>>>>> -js-default-initializers=true
>>>>>
>>>>>
>>>>>
>>>>> The release module starts up but the app fails whenever I launch a
>>>>> module.
>>>>>
>>>>>
>>>>>
>>>>> The smallest size settings in the documentation do not work. The app
>>>>> does not start up.
>>>>>
>>>>>
>>>>>
>>>>> -export-public-symbols=false
>>>>> -prevent-rename-protected-symbols=false
>>>>> -prevent-rename-public-symbols=false
>>>>> -prevent-rename-internal-symbols=false
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> The error trace is below
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> Uncaught TypeError: cm.valuesImpl.init is not a function
>>>>> at Wr.Rr.pl <http://wr.rr.pl/> (Overview.js:792)
>>>>> at Function.mq.generateMXMLProperties (Overview.js:743)
>>>>> at Wr.lq.generateMXMLAttributes (Overview.js:551)
>>>>> at new Wr (Overview.js:810)
>>>>> at QN.J.loadHandler (FrontEnd.js:1978)
>>>>> 3Overview.js:56 Uncaught TypeError: Cannot read properties of
>>>>> undefined (reading 'prototype')
>>>>> at P (Overview.js:56)
>>>>> at VG.convert (FrontEnd.js:910)
>>>>> at ny (FrontEnd.js:250)
>>>>> at HTMLElement.iy (FrontEnd.js:125)
>>>>> at HTMLElement.b (FrontEnd.js:121)
>>>>> FrontEnd.js:1649 Uncaught TypeError: M is not a function
>>>>> at sM.J.handleMouseOut (FrontEnd.js:1649)
>>>>> at Function.ny [as googFireListener] (FrontEnd.js:123)
>>>>> at ny (FrontEnd.js:250)
>>>>> at HTMLAnchorElement.iy (FrontEnd.js:125)
>>>>> at HTMLAnchorElement.b (FrontEnd.js:121)
>>>>> FrontEnd.js:1649 Uncaught TypeError: M is not a function
>>>>> at sM.J.handleMouseOver (FrontEnd.js:1649)
>>>>> at Function.ny [as googFireListener] (FrontEnd.js:123)
>>>>> at ny (FrontEnd.js:250)
>>>>> at HTMLAnchorElement.iy (FrontEnd.js:125)
>>>>> at HTMLAnchorElement.b (FrontEnd.js:121)
>>>>> J.handleMouseOver @ FrontEnd.js:1649
>>>>> ny @ FrontEnd.js:123
>>>>> ny @ FrontEnd.js:250
>>>>> iy @ FrontEnd.js:125
>>>>> b @ FrontEnd.js:121
>>>>> FrontEnd.js:1649 Uncaught TypeError: M is not a function
>>>>> at sM.J.handleMouseOut (FrontEnd.js:1649)
>>>>> at Function.ny [as googFireListener] (FrontEnd.js:123)
>>>>> at ny (FrontEnd.js:250)
>>>>> at HTMLAnchorElement.iy (FrontEnd.js:125)
>>>>> at HTMLAnchorElement.b (FrontEnd.js:121)
>>>>> J.handleMouseOut @ FrontEnd.js:1649
>>>>> ny @ FrontEnd.js:123
>>>>> ny @ FrontEnd.js:250
>>>>> iy @ FrontEnd.js:125
>>>>> b @ FrontEnd.js:121
>>>>> FrontEnd.js:1649 Uncaught TypeError: M is not a function
>>>>> at sM.J.handleMouseOver (FrontEnd.js:1649)
>>>>> at Function.ny [as googFireListener] (FrontEnd.js:123)
>>>>> at ny (FrontEnd.js:250)
>>>>> at HTMLAnchorElement.iy (FrontEnd.js:125)
>>>>> at HTMLAnchorElement.b (FrontEnd.js:121)
>>>>> J.handleMouseOver @ FrontEnd.js:1649
>>>>> ny @ FrontEnd.js:123
>>>>> ny @ FrontEnd.js:250
>>>>> iy @ FrontEnd.js:125
>>>>> b @ FrontEnd.js:121
>>>>> FrontEnd.js:1649 Uncaught TypeError: M is not a function
>>>>> at sM.J.handleMouseOut (FrontEnd.js:1649)
>>>>> at Function.ny [as googFireListener] (FrontEnd.js:123)
>>>>> at ny (FrontEnd.js:250)
>>>>> at HTMLAnchorElement.iy (FrontEnd.js:125)
>>>>> at HTMLAnchorElement.b (FrontEnd.js:121)
>>>>> J.handleMouseOut @ FrontEnd.js:1649
>>>>> ny @ FrontEnd.js:123
>>>>> ny @ FrontEnd.js:250
>>>>> iy @ FrontEnd.js:125
>>>>> b @ FrontEnd.js:121
>>>>> FrontEnd.js:1649 Uncaught TypeError: M is not a function
>>>>> at sM.J.handleMouseOver (FrontEnd.js:1649)
>>>>> at Function.ny [as googFireListener] (FrontEnd.js:123)
>>>>> at ny (FrontEnd.js:250)
>>>>> at HTMLAnchorElement.iy (FrontEnd.js:125)
>>>>> at HTMLAnchorElement.b (FrontEnd.js:121)
>>>>> J.handleMouseOver @ FrontEnd.js:1649
>>>>> ny @ FrontEnd.js:123
>>>>> ny @ FrontEnd.js:250
>>>>> iy @ FrontEnd.js:125
>>>>> b @ FrontEnd.js:121
>>>>> FrontEnd.js:1649 Uncaught TypeError: M is not a function
>>>>> at sM.J.handleMouseOut (FrontEnd.js:1649)
>>>>> at Function.ny [as googFireListener] (FrontEnd.js:123)
>>>>> at ny (FrontEnd.js:250)
>>>>> at HTMLAnchorElement.iy (FrontEnd.js:125)
>>>>> at HTMLAnchorElement.b (FrontEnd.js:121)
>>>>> J.handleMouseOut @ FrontEnd.js:1649
>>>>> ny @ FrontEnd.js:123
>>>>> ny @ FrontEnd.js:250
>>>>> iy @ FrontEnd.js:125
>>>>> b @ FrontEnd.js:121
>>>>> FrontEnd.js:1649 Uncaught TypeError: M is not a function
>>>>> at sM.J.handleMouseOver (FrontEnd.js:1649)
>>>>> at Function.ny [as googFireListener] (FrontEnd.js:123)
>>>>> at ny (FrontEnd.js:250)
>>>>> at HTMLAnchorElement.iy (FrontEnd.js:125)
>>>>> at HTMLAnchorElement.b (FrontEnd.js:121)
>>>>> J.handleMouseOver @ FrontEnd.js:1649
>>>>> ny @ FrontEnd.js:123
>>>>> ny @ FrontEnd.js:250
>>>>> iy @ FrontEnd.js:125
>>>>> b @ FrontEnd.js:121
>>>>> FrontEnd.js:1649 Uncaught TypeError: M is not a function
>>>>> at sM.J.handleMouseOut (FrontEnd.js:1649)
>>>>> at Function.ny [as googFireListener] (FrontEnd.js:123)
>>>>> at ny (FrontEnd.js:250)
>>>>> at HTMLAnchorElement.iy (FrontEnd.js:125)
>>>>> at HTMLAnchorElement.b (FrontEnd.js:121)
>>>>> J.handleMouseOut @ FrontEnd.js:1649
>>>>> ny @ FrontEnd.js:123
>>>>> ny @ FrontEnd.js:250
>>>>> iy @ FrontEnd.js:125
>>>>> b @ FrontEnd.js:121
>>>>>
>>>>>
>>>>>
>>>>> On Thu, Dec 30, 2021 at 4:32 PM Roman Isitua <ro...@gmail.com>
>>>>> wrote:
>>>>>
>>>>> I get the same error even when I set
>>>>> the -js-dynamic-access-unknown-members=true;
>>>>>
>>>>>
>>>>>
>>>>> On Thu, Dec 30, 2021 at 4:24 PM Roman Isitua <ro...@gmail.com>
>>>>> wrote:
>>>>>
>>>>>
>>>>>
>>>>> Using the below settings,
>>>>>
>>>>> -export-public-symbols=false
>>>>> -prevent-rename-protected-symbols=false
>>>>> -prevent-rename-public-symbols=false
>>>>> -prevent-rename-internal-symbols=false
>>>>> -js-dynamic-access-unknown-members=false;
>>>>>
>>>>> -js-default-initializers=true
>>>>>
>>>>>
>>>>> Debug version runs fine. The release version does not start up
>>>>>
>>>>> <image004.png>
>>>>>
>>>>>
>>>>> I get the below errors
>>>>>
>>>>> Uncaught TypeError: Cannot read properties of undefined (reading
>>>>> 'apply')
>>>>> at KE.hm (FrontEnd.js:1600)
>>>>> at XE.M.Fb (FrontEnd.js:943)
>>>>> at XE.M.uh (FrontEnd.js:937)
>>>>> at FE.M.na <http://fe.m.na/> (FrontEnd.js:497)
>>>>> at FE.M.v (FrontEnd.js:497)
>>>>> at dR.M.S (FrontEnd.js:213)
>>>>> at dR.Nz.S (FrontEnd.js:217)
>>>>> at dR.M.start (FrontEnd.js:1396)
>>>>> at index.html:45
>>>>> :8080/favicon.ico:1 Failed to load resource: the server responded with
>>>>> a status of 404 (Not Found)
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> FrontEnd.js is the start up class for the application. i.e. It
>>>>> implements the Jewel application class.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> On Thu, Dec 30, 2021 at 3:19 PM Roman Isitua <ro...@gmail.com>
>>>>> wrote:
>>>>>
>>>>> Hi Harb,
>>>>>
>>>>>
>>>>>
>>>>> Thanks for your response. I have gone through the documentation. I
>>>>> will do my test again starting with the smallest size option and share my
>>>>> findings.
>>>>>
>>>>>
>>>>>
>>>>> Regards,
>>>>>
>>>>>
>>>>>
>>>>> On Thu, Dec 30, 2021 at 10:59 AM Harbs <ha...@gmail.com> wrote:
>>>>>
>>>>> Sorry for my deal in responding.
>>>>>
>>>>>
>>>>>
>>>>> Let’s take a step back.
>>>>>
>>>>>
>>>>>
>>>>> I’m not sure how you are compiling your modules. I just added some
>>>>> content to the module documentation page which explains what compiler
>>>>> options you need while compiling modules. (It still needs some editing.)
>>>>> https://apache.github.io/royale-docs/features/modules#minification
>>>>>
>>>>>
>>>>>
>>>>> Are you using those options?
>>>>>
>>>>>
>>>>>
>>>>> On Dec 29, 2021, at 2:19 AM, Maria Jose Esteve <mj...@iest.com>
>>>>> wrote:
>>>>>
>>>>>
>>>>>
>>>>> Hi, Let me join you with these tests....
>>>>>
>>>>>
>>>>>
>>>>> @Harb, I have compiled the SDK from this branch, feature/ROYALE_INTERFACE_INFO,
>>>>> and when running in debug I get this error:
>>>>>
>>>>>
>>>>>
>>>>> Message on the PURGE CONSOLE is displayed:
>>>>>
>>>>>
>>>>>
>>>>> Cannot convert org.apache.royale.reflection.beads.ClassAliasBead to
>>>>> IBead
>>>>>
>>>>>
>>>>>
>>>>> Message in the IDE Window:
>>>>>
>>>>>
>>>>>
>>>>> Se produjo una excepción: TypeError: Cannot convert [object Object] to
>>>>> IBead
>>>>>
>>>>> at App.org.apache.royale.core.ElementWrapper.addBead (
>>>>> http://localhost:8080/WNetSuitePlus/org/apache/royale/core/ElementWrapper.js:114:11
>>>>> )
>>>>>
>>>>> at App.org.apache.royale.core.HTMLElementWrapper.addBead (
>>>>> http://localhost:8080/WNetSuitePlus/org/apache/royale/core/HTMLElementWrapper.js:43:65
>>>>> )
>>>>>
>>>>> at App.org.apache.royale.jewel.Application.start (
>>>>> http://localhost:8080/WNetSuitePlus/org/apache/royale/jewel/Application.js:246:10
>>>>> )
>>>>>
>>>>> at App.App_loadXML (
>>>>> http://localhost:8080/WNetSuitePlus/App.js:1681:25)
>>>>>
>>>>> at
>>>>> org.apache.royale.net.URLLoader.org.apache.royale.events.EventDispatcher.fireListeners
>>>>> (
>>>>> http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:97:23
>>>>> )
>>>>>
>>>>> at Function.goog.events.EventTarget.dispatchEventInternal_ (
>>>>> http://localhost:8080/WNetSuitePlus/library/closure/goog/events/eventtarget.js:381:26
>>>>> )
>>>>>
>>>>> at
>>>>> org.apache.royale.net.URLLoader.org.apache.royale.events.EventDispatcher.dispatchEvent
>>>>> (
>>>>> http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:72:37
>>>>> )
>>>>>
>>>>> at org.apache.royale.net.URLLoader.jsEventHandler (
>>>>> http://localhost:8080/WNetSuitePlus/org/apache/royale/net/URLLoader.js:169:12
>>>>> )
>>>>>
>>>>>
>>>>>
>>>>> Call stack:
>>>>>
>>>>>
>>>>>
>>>>> <image003.png>
>>>>>
>>>>>
>>>>>
>>>>> [INFO] Executing MXMLC in tool group Royale with args: [
>>>>>
>>>>>
>>>>> -load-config=D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\compile-app-config.xml,
>>>>>
>>>>> -js-default-initializers=true,
>>>>>
>>>>> -source-map=true,
>>>>>
>>>>> -js-dynamic-access-unknown-members=true,
>>>>>
>>>>>
>>>>> -keep-as3-metadata+=Inject,Dispatcher,EventHandler,Event,PostConstruct,PreDestroy,ViewAdded,ViewRemoved,Bindable,Transient,
>>>>>
>>>>> -keep-code-with-metadata=Inject,
>>>>>
>>>>> -show-binding-warnings=false,
>>>>>
>>>>> -export-public-symbols=false,
>>>>>
>>>>> -prevent-rename-protected-symbols=false,
>>>>>
>>>>> -prevent-rename-internal-symbols=false,
>>>>>
>>>>>
>>>>> -js-output=D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\javascript,
>>>>>
>>>>> -compiler.targets=JSRoyale,
>>>>>
>>>>>
>>>>> D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\src\main\royale\App.mxml
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> The release execution does not change, the error is the same as before
>>>>> (SDK compilation from the develop branch):
>>>>>
>>>>>
>>>>>
>>>>> Se produjo una excepción: ReferenceError: Error #1065: Variable
>>>>> com.iest.winplusweb.models.MasterConfigSystemModel is not defined.
>>>>>
>>>>> at yR (http://localhost:8080/WPWebRelease/App.js:3605:1771)
>>>>>
>>>>> at Mya (http://localhost:8080/WPWebRelease/App.js:3343:365)
>>>>>
>>>>> at AR.J.usa (http://localhost:8080/WPWebRelease/App.js:434:441)
>>>>>
>>>>> at GFa.J.fromTypeDefinition (
>>>>> http://localhost:8080/WPWebRelease/App.js:5706:139)
>>>>>
>>>>> at Function.YT.getTypeDescriptor (
>>>>> http://localhost:8080/WPWebRelease/App.js:4570:820)
>>>>>
>>>>> at Function.fX.constructBean (
>>>>> http://localhost:8080/WPWebRelease/App.js:2336:472)
>>>>>
>>>>> at r$.J.initialize (
>>>>> http://localhost:8080/WPWebRelease/App.js:5041:66)
>>>>>
>>>>> at OW.J.init (http://localhost:8080/WPWebRelease/App.js:950:452)
>>>>>
>>>>> at OW.J.u (http://localhost:8080/WPWebRelease/App.js:951:454)
>>>>>
>>>>> at $$.J.addBead (http://localhost:8080/WPWebRelease/App.js:357:549
>>>>> )
>>>>>
>>>>>
>>>>>
>>>>> The main difference:
>>>>>
>>>>> project compiled from "SDK-develop" runs fine in js-debug and gives
>>>>> error in js-release and, compiled from "SDK-ROYALE_INTERFACE_INFO" does not
>>>>> launch because of conversion error.
>>>>>
>>>>>
>>>>>
>>>>> Hiedra
>>>>>
>>>>>
>>>>>
>>>>> *De:* Roman Isitua <ro...@gmail.com>
>>>>> *Enviado el:* martes, 28 de diciembre de 2021 15:55
>>>>> *Para:* users@royale.apache.org
>>>>> *Asunto:* Re: Load time is very slow
>>>>>
>>>>>
>>>>>
>>>>> @Harb
>>>>>
>>>>>
>>>>>
>>>>> I have checked out the feature/ROYALE_INTERFACE_INFO branch and
>>>>> compiled asjs and compiler. I have rebuilt my application with modules in
>>>>> release mode.
>>>>>
>>>>>
>>>>>
>>>>> I get the following error when I attempt to launch a module
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> <image001.png>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> The module loads fine in debug mode
>>>>>
>>>>>
>>>>>
>>>>> <image002.png>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> Snippets of the log
>>>>>
>>>>>
>>>>>
>>>>> Overview.js:786 Uncaught TypeError: cm.valuesImpl.init is not a
>>>>> function
>>>>> at Rr.Mr.yl (Overview.js:786)
>>>>> at Function.iq.generateMXMLProperties (Overview.js:736)
>>>>> at Rr.hq.generateMXMLAttributes (Overview.js:546)
>>>>> at new Rr (Overview.js:804)
>>>>> at LN.J.loadHandler (FrontEnd.js:1967)
>>>>> Mr.yl @ Overview.js:786
>>>>> iq.generateMXMLProperties @ Overview.js:736
>>>>> hq.generateMXMLAttributes @ Overview.js:546
>>>>> Rr @ Overview.js:804
>>>>> J.loadHandler @ FrontEnd.js:1967
>>>>> load (async)
>>>>> LN.loadModule @ FrontEnd.js:1965
>>>>> dN.loadModule @ FrontEnd.js:2406
>>>>> LD.Un @ FrontEnd.js:1809
>>>>> ny @ FrontEnd.js:123
>>>>> ny @ FrontEnd.js:248
>>>>> iy @ FrontEnd.js:125
>>>>> b @ FrontEnd.js:121
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> I have attached the full log to this email.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> On Tue, Dec 28, 2021 at 2:51 PM Roman Isitua <ro...@gmail.com>
>>>>> wrote:
>>>>>
>>>>> Hi Maria,
>>>>>
>>>>>
>>>>>
>>>>> Prior to starting this mail discussion "Load time is very slow". I can
>>>>> confirm I have only been compiling in debug mode. My target\javascript\bin\
>>>>> only had js-debug. It was after I upgraded my royale sdk from 0.9.7
>>>>> to 0.9.8 that I compiled in release mode.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> On Tue, Dec 28, 2021 at 2:24 PM Maria Jose Esteve <mj...@iest.com>
>>>>> wrote:
>>>>>
>>>>> Hi, @Roman, I think you are doing a double compile can it be? My times
>>>>> are the same as yours and I always compile in debug and release.
>>>>>
>>>>>
>>>>>
>>>>> Look at your target folder " target\javascript\bin\" and if you have
>>>>> two folders: js-debug and js-release you are compiling always double.
>>>>>
>>>>>
>>>>>
>>>>> In my case, the architecture of my project as well as the Maven
>>>>> compilation files (pom.xml) were provided by an external company (we didn't
>>>>> know anything about Maven or Royale at that time) and I understand that
>>>>> this formula was chosen to show us the options we had.
>>>>>
>>>>>
>>>>>
>>>>> A priori and without doing any test as Harb has done, I think that
>>>>> modularity gives us the advantage of compiling parts of the code once and
>>>>> not compiling them again if they are not modified. So far WITH MY
>>>>> COMPILATION TIMES, sometimes more than 1 minute, this is fundamental. But
>>>>> of course, now we have the problem of minification of the modules and it is
>>>>> really a serious problem because it is impossible for us to deploy in
>>>>> production.
>>>>>
>>>>>
>>>>>
>>>>> I will try to separate the compiación realese with a profile and if I
>>>>> succeed I will pass it to you @Roman.
>>>>>
>>>>>
>>>>>
>>>>> @Harb what do you mean by compiling the ROYALE_INTERFACE_INFO branch?
>>>>>
>>>>>
>>>>>
>>>>> Hiedra
>>>>>
>>>>>
>>>>>
>>>>> *De:* Harbs <ha...@gmail.com>
>>>>> *Enviado el:* lunes, 27 de diciembre de 2021 18:32
>>>>> *Para:* users@royale.apache.org
>>>>> *Asunto:* Re: Load time is very slow
>>>>>
>>>>>
>>>>>
>>>>> That doesn’t sound right.
>>>>>
>>>>>
>>>>>
>>>>> Are you sure you’re compiling debug and not release? That sounds like
>>>>> release build times.
>>>>>
>>>>>
>>>>>
>>>>> On Dec 27, 2021, at 3:31 PM, Roman Isitua <ro...@gmail.com>
>>>>> wrote:
>>>>>
>>>>>
>>>>>
>>>>> Wow ! You are using a workstation with a bleeding edge processor.
>>>>>
>>>>>
>>>>>
>>>>> I just compiled my app now. It took 44 seconds. (First compilation
>>>>> after ide start up.) Subsequently compilations are usually 19s to 20s.
>>>>>
>>>>>
>>>>>
>>>>> My application code base is very very small compared to yours. As we
>>>>> continue to add functionality, I expect the compile times to rise.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>> <MainApp_pom.xml><Overview_pom.xml><fm_client2_pom.xml>
>>>
>>>
>>>
>>
Re: Compiling Modules (was Re: Load time is very slow)
Posted by Roman Isitua <ro...@gmail.com>.
Yes.
On Thu, 30 Dec 2021, 23:03 Harbs, <ha...@gmail.com> wrote:
> Did you apply the input_file options to the module?
>
> On Dec 30, 2021, at 11:42 PM, Roman Isitua <ro...@gmail.com> wrote:
>
>
> I have applied the js compiler option as follows
>
>
> <additionalCompilerOptions>-source-map=false;-compiler.show-binding-warnings=false;-js-default-initializers=true;-js-dynamic-access-unknown-members=true;
> -js-compiler-option=--variable_map_output_file
> gccvars.txt;-js-compiler-option+=--property_map_output_file gccprops.txt
> </additionalCompilerOptions>
>
>
> I get the same error as before when attempting to launch the jewel module.
>
> <image.png>
>
>
> Same error trace.
>
> Uncaught TypeError: cm.valuesImpl.init is not a function
> at Rr.Mr.yl (Overview.js:786)
> at Function.iq.generateMXMLProperties (Overview.js:736)
> at Rr.hq.generateMXMLAttributes (Overview.js:546)
> at new Rr (Overview.js:804)
> at LN.J.loadHandler (FrontEnd.js:1967)
> FrontEnd.js:1640 Uncaught TypeError: M is not a function
> at oM.J.handleMouseOut (FrontEnd.js:1640)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:248)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> FrontEnd.js:1640 Uncaught TypeError: M is not a function
> at oM.J.handleMouseOver (FrontEnd.js:1640)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:248)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> FrontEnd.js:1640 Uncaught TypeError: M is not a function
> at oM.J.handleMouseOut (FrontEnd.js:1640)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:248)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> FrontEnd.js:1640 Uncaught TypeError: M is not a function
> at oM.J.handleMouseOver (FrontEnd.js:1640)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:248)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> FrontEnd.js:1640 Uncaught TypeError: M is not a function
> at oM.J.handleMouseOut (FrontEnd.js:1640)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:248)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> FrontEnd.js:1640 Uncaught TypeError: M is not a function
> at oM.J.handleMouseOver (FrontEnd.js:1640)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:248)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> FrontEnd.js:1640 Uncaught TypeError: M is not a function
> at oM.J.handleMouseOut (FrontEnd.js:1640)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:248)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> 3Overview.js:56 Uncaught TypeError: Cannot read properties of undefined
> (reading 'prototype')
> at P (Overview.js:56)
> at SG.convert (FrontEnd.js:904)
> at ny (FrontEnd.js:248)
> at HTMLElement.iy (FrontEnd.js:125)
> at HTMLElement.b (FrontEnd.js:121)
>
> On Thu, Dec 30, 2021 at 6:56 PM Harbs <ha...@gmail.com> wrote:
>
>> 1. I’d get rid of the agressive minification options. It will likely
>> cause issues. If you get it to work without those options, you can try to
>> add them back in and see if it still works.
>> 2. You seem to be missing the compiler options explained here:
>> https://apache.github.io/royale-docs/features/modules#minification
>>
>> For a pom, it would look something like this (adjust your paths to match
>> your setup):
>>
>> Main app:
>> <additionalCompilerOptions>-source-map=true;-js-compiler-option=--variable_map_output_file
>> gccvars.txt;-js-compiler-option+=--property_map_output_file
>> gccprops.txt</additionalCompilerOptions>
>>
>> Module:
>> <additionalCompilerOptions>-source-map=true;-js-compiler-option=--variable_map_input_file
>> ../../../../../MainApp/bin/js-release/gccvars.txt;-js-compiler-option+=--property_map_input_file
>> ../../../../../MainApp/bin/js-release/gccprops.txt</additionalCompilerOptions>
>>
>> On Dec 30, 2021, at 7:43 PM, Roman Isitua <ro...@gmail.com> wrote:
>>
>> I think it will be better for me to share my pom's that way you can see
>> all the compilation options used. The pom for the parent (FmClient2), the
>> MainApp and one module (Overview) have been attached to this email.
>>
>>
>> On Thu, Dec 30, 2021 at 6:22 PM Harbs <ha...@gmail.com> wrote:
>>
>>> Roman, can you share your full compiler options?
>>>
>>> I decided to remove the below settings completely
>>>> -export-public-symbols=false
>>>> -prevent-rename-protected-symbols=false
>>>> -prevent-rename-public-symbols=false
>>>> -prevent-rename-internal-symbols=false
>>>>
>>>>
>>>> I enabled the below settings
>>>>
>>>> -js-dynamic-access-unknown-members=true;
>>>> -js-default-initializers=true
>>>>
>>>>
>>>> The release version starts up
>>>>
>>>>
>>>>
>>> Hiedra, that’s great!
>>>
>>> On Dec 30, 2021, at 7:15 PM, Roman Isitua <ro...@gmail.com> wrote:
>>>
>>>
>>> Yes. I am testing with the sdk compiled on branch ROYALE_INTERFACE_INFO
>>>
>>> On Thu, Dec 30, 2021 at 6:10 PM Maria Jose Esteve <mj...@iest.com>
>>> wrote:
>>>
>>>> Roman, are you testing with the SDK compiled from the Harb branches,
>>>> ROYALE_INTERFACE_INFO, or from develop?
>>>>
>>>>
>>>>
>>>> Hiedra
>>>>
>>>>
>>>>
>>>> *De:* Roman Isitua <ro...@gmail.com>
>>>> *Enviado el:* jueves, 30 de diciembre de 2021 16:52
>>>> *Para:* users@royale.apache.org
>>>> *Asunto:* Re: Compiling Modules (was Re: Load time is very slow)
>>>>
>>>>
>>>>
>>>> I decided to remove the below settings completely
>>>> -export-public-symbols=false
>>>> -prevent-rename-protected-symbols=false
>>>> -prevent-rename-public-symbols=false
>>>> -prevent-rename-internal-symbols=false
>>>>
>>>>
>>>> I enabled the below settings
>>>>
>>>> -js-dynamic-access-unknown-members=true;
>>>> -js-default-initializers=true
>>>>
>>>>
>>>> The release version starts up
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> <image001.png>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> <image002.png>
>>>>
>>>>
>>>>
>>>> However, the moment I launch a module. I get the below error
>>>>
>>>>
>>>>
>>>> <image003.png>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> It appears to be failing when I launch the "*Overview*" module
>>>> (by clicking the Overview side menu).
>>>>
>>>>
>>>>
>>>> So my current observation is that by retaining only two settings
>>>>
>>>>
>>>>
>>>> -js-dynamic-access-unknown-members=true;
>>>> -js-default-initializers=true
>>>>
>>>>
>>>>
>>>> The release module starts up but the app fails whenever I launch a
>>>> module.
>>>>
>>>>
>>>>
>>>> The smallest size settings in the documentation do not work. The app
>>>> does not start up.
>>>>
>>>>
>>>>
>>>> -export-public-symbols=false
>>>> -prevent-rename-protected-symbols=false
>>>> -prevent-rename-public-symbols=false
>>>> -prevent-rename-internal-symbols=false
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> The error trace is below
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> Uncaught TypeError: cm.valuesImpl.init is not a function
>>>> at Wr.Rr.pl <http://wr.rr.pl/> (Overview.js:792)
>>>> at Function.mq.generateMXMLProperties (Overview.js:743)
>>>> at Wr.lq.generateMXMLAttributes (Overview.js:551)
>>>> at new Wr (Overview.js:810)
>>>> at QN.J.loadHandler (FrontEnd.js:1978)
>>>> 3Overview.js:56 Uncaught TypeError: Cannot read properties of undefined
>>>> (reading 'prototype')
>>>> at P (Overview.js:56)
>>>> at VG.convert (FrontEnd.js:910)
>>>> at ny (FrontEnd.js:250)
>>>> at HTMLElement.iy (FrontEnd.js:125)
>>>> at HTMLElement.b (FrontEnd.js:121)
>>>> FrontEnd.js:1649 Uncaught TypeError: M is not a function
>>>> at sM.J.handleMouseOut (FrontEnd.js:1649)
>>>> at Function.ny [as googFireListener] (FrontEnd.js:123)
>>>> at ny (FrontEnd.js:250)
>>>> at HTMLAnchorElement.iy (FrontEnd.js:125)
>>>> at HTMLAnchorElement.b (FrontEnd.js:121)
>>>> FrontEnd.js:1649 Uncaught TypeError: M is not a function
>>>> at sM.J.handleMouseOver (FrontEnd.js:1649)
>>>> at Function.ny [as googFireListener] (FrontEnd.js:123)
>>>> at ny (FrontEnd.js:250)
>>>> at HTMLAnchorElement.iy (FrontEnd.js:125)
>>>> at HTMLAnchorElement.b (FrontEnd.js:121)
>>>> J.handleMouseOver @ FrontEnd.js:1649
>>>> ny @ FrontEnd.js:123
>>>> ny @ FrontEnd.js:250
>>>> iy @ FrontEnd.js:125
>>>> b @ FrontEnd.js:121
>>>> FrontEnd.js:1649 Uncaught TypeError: M is not a function
>>>> at sM.J.handleMouseOut (FrontEnd.js:1649)
>>>> at Function.ny [as googFireListener] (FrontEnd.js:123)
>>>> at ny (FrontEnd.js:250)
>>>> at HTMLAnchorElement.iy (FrontEnd.js:125)
>>>> at HTMLAnchorElement.b (FrontEnd.js:121)
>>>> J.handleMouseOut @ FrontEnd.js:1649
>>>> ny @ FrontEnd.js:123
>>>> ny @ FrontEnd.js:250
>>>> iy @ FrontEnd.js:125
>>>> b @ FrontEnd.js:121
>>>> FrontEnd.js:1649 Uncaught TypeError: M is not a function
>>>> at sM.J.handleMouseOver (FrontEnd.js:1649)
>>>> at Function.ny [as googFireListener] (FrontEnd.js:123)
>>>> at ny (FrontEnd.js:250)
>>>> at HTMLAnchorElement.iy (FrontEnd.js:125)
>>>> at HTMLAnchorElement.b (FrontEnd.js:121)
>>>> J.handleMouseOver @ FrontEnd.js:1649
>>>> ny @ FrontEnd.js:123
>>>> ny @ FrontEnd.js:250
>>>> iy @ FrontEnd.js:125
>>>> b @ FrontEnd.js:121
>>>> FrontEnd.js:1649 Uncaught TypeError: M is not a function
>>>> at sM.J.handleMouseOut (FrontEnd.js:1649)
>>>> at Function.ny [as googFireListener] (FrontEnd.js:123)
>>>> at ny (FrontEnd.js:250)
>>>> at HTMLAnchorElement.iy (FrontEnd.js:125)
>>>> at HTMLAnchorElement.b (FrontEnd.js:121)
>>>> J.handleMouseOut @ FrontEnd.js:1649
>>>> ny @ FrontEnd.js:123
>>>> ny @ FrontEnd.js:250
>>>> iy @ FrontEnd.js:125
>>>> b @ FrontEnd.js:121
>>>> FrontEnd.js:1649 Uncaught TypeError: M is not a function
>>>> at sM.J.handleMouseOver (FrontEnd.js:1649)
>>>> at Function.ny [as googFireListener] (FrontEnd.js:123)
>>>> at ny (FrontEnd.js:250)
>>>> at HTMLAnchorElement.iy (FrontEnd.js:125)
>>>> at HTMLAnchorElement.b (FrontEnd.js:121)
>>>> J.handleMouseOver @ FrontEnd.js:1649
>>>> ny @ FrontEnd.js:123
>>>> ny @ FrontEnd.js:250
>>>> iy @ FrontEnd.js:125
>>>> b @ FrontEnd.js:121
>>>> FrontEnd.js:1649 Uncaught TypeError: M is not a function
>>>> at sM.J.handleMouseOut (FrontEnd.js:1649)
>>>> at Function.ny [as googFireListener] (FrontEnd.js:123)
>>>> at ny (FrontEnd.js:250)
>>>> at HTMLAnchorElement.iy (FrontEnd.js:125)
>>>> at HTMLAnchorElement.b (FrontEnd.js:121)
>>>> J.handleMouseOut @ FrontEnd.js:1649
>>>> ny @ FrontEnd.js:123
>>>> ny @ FrontEnd.js:250
>>>> iy @ FrontEnd.js:125
>>>> b @ FrontEnd.js:121
>>>> FrontEnd.js:1649 Uncaught TypeError: M is not a function
>>>> at sM.J.handleMouseOver (FrontEnd.js:1649)
>>>> at Function.ny [as googFireListener] (FrontEnd.js:123)
>>>> at ny (FrontEnd.js:250)
>>>> at HTMLAnchorElement.iy (FrontEnd.js:125)
>>>> at HTMLAnchorElement.b (FrontEnd.js:121)
>>>> J.handleMouseOver @ FrontEnd.js:1649
>>>> ny @ FrontEnd.js:123
>>>> ny @ FrontEnd.js:250
>>>> iy @ FrontEnd.js:125
>>>> b @ FrontEnd.js:121
>>>> FrontEnd.js:1649 Uncaught TypeError: M is not a function
>>>> at sM.J.handleMouseOut (FrontEnd.js:1649)
>>>> at Function.ny [as googFireListener] (FrontEnd.js:123)
>>>> at ny (FrontEnd.js:250)
>>>> at HTMLAnchorElement.iy (FrontEnd.js:125)
>>>> at HTMLAnchorElement.b (FrontEnd.js:121)
>>>> J.handleMouseOut @ FrontEnd.js:1649
>>>> ny @ FrontEnd.js:123
>>>> ny @ FrontEnd.js:250
>>>> iy @ FrontEnd.js:125
>>>> b @ FrontEnd.js:121
>>>>
>>>>
>>>>
>>>> On Thu, Dec 30, 2021 at 4:32 PM Roman Isitua <ro...@gmail.com>
>>>> wrote:
>>>>
>>>> I get the same error even when I set
>>>> the -js-dynamic-access-unknown-members=true;
>>>>
>>>>
>>>>
>>>> On Thu, Dec 30, 2021 at 4:24 PM Roman Isitua <ro...@gmail.com>
>>>> wrote:
>>>>
>>>>
>>>>
>>>> Using the below settings,
>>>>
>>>> -export-public-symbols=false
>>>> -prevent-rename-protected-symbols=false
>>>> -prevent-rename-public-symbols=false
>>>> -prevent-rename-internal-symbols=false
>>>> -js-dynamic-access-unknown-members=false;
>>>>
>>>> -js-default-initializers=true
>>>>
>>>>
>>>> Debug version runs fine. The release version does not start up
>>>>
>>>> <image004.png>
>>>>
>>>>
>>>> I get the below errors
>>>>
>>>> Uncaught TypeError: Cannot read properties of undefined (reading
>>>> 'apply')
>>>> at KE.hm (FrontEnd.js:1600)
>>>> at XE.M.Fb (FrontEnd.js:943)
>>>> at XE.M.uh (FrontEnd.js:937)
>>>> at FE.M.na <http://fe.m.na/> (FrontEnd.js:497)
>>>> at FE.M.v (FrontEnd.js:497)
>>>> at dR.M.S (FrontEnd.js:213)
>>>> at dR.Nz.S (FrontEnd.js:217)
>>>> at dR.M.start (FrontEnd.js:1396)
>>>> at index.html:45
>>>> :8080/favicon.ico:1 Failed to load resource: the server responded with
>>>> a status of 404 (Not Found)
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> FrontEnd.js is the start up class for the application. i.e. It
>>>> implements the Jewel application class.
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> On Thu, Dec 30, 2021 at 3:19 PM Roman Isitua <ro...@gmail.com>
>>>> wrote:
>>>>
>>>> Hi Harb,
>>>>
>>>>
>>>>
>>>> Thanks for your response. I have gone through the documentation. I will
>>>> do my test again starting with the smallest size option and share my
>>>> findings.
>>>>
>>>>
>>>>
>>>> Regards,
>>>>
>>>>
>>>>
>>>> On Thu, Dec 30, 2021 at 10:59 AM Harbs <ha...@gmail.com> wrote:
>>>>
>>>> Sorry for my deal in responding.
>>>>
>>>>
>>>>
>>>> Let’s take a step back.
>>>>
>>>>
>>>>
>>>> I’m not sure how you are compiling your modules. I just added some
>>>> content to the module documentation page which explains what compiler
>>>> options you need while compiling modules. (It still needs some editing.)
>>>> https://apache.github.io/royale-docs/features/modules#minification
>>>>
>>>>
>>>>
>>>> Are you using those options?
>>>>
>>>>
>>>>
>>>> On Dec 29, 2021, at 2:19 AM, Maria Jose Esteve <mj...@iest.com>
>>>> wrote:
>>>>
>>>>
>>>>
>>>> Hi, Let me join you with these tests....
>>>>
>>>>
>>>>
>>>> @Harb, I have compiled the SDK from this branch, feature/ROYALE_INTERFACE_INFO,
>>>> and when running in debug I get this error:
>>>>
>>>>
>>>>
>>>> Message on the PURGE CONSOLE is displayed:
>>>>
>>>>
>>>>
>>>> Cannot convert org.apache.royale.reflection.beads.ClassAliasBead to
>>>> IBead
>>>>
>>>>
>>>>
>>>> Message in the IDE Window:
>>>>
>>>>
>>>>
>>>> Se produjo una excepción: TypeError: Cannot convert [object Object] to
>>>> IBead
>>>>
>>>> at App.org.apache.royale.core.ElementWrapper.addBead (
>>>> http://localhost:8080/WNetSuitePlus/org/apache/royale/core/ElementWrapper.js:114:11
>>>> )
>>>>
>>>> at App.org.apache.royale.core.HTMLElementWrapper.addBead (
>>>> http://localhost:8080/WNetSuitePlus/org/apache/royale/core/HTMLElementWrapper.js:43:65
>>>> )
>>>>
>>>> at App.org.apache.royale.jewel.Application.start (
>>>> http://localhost:8080/WNetSuitePlus/org/apache/royale/jewel/Application.js:246:10
>>>> )
>>>>
>>>> at App.App_loadXML (
>>>> http://localhost:8080/WNetSuitePlus/App.js:1681:25)
>>>>
>>>> at
>>>> org.apache.royale.net.URLLoader.org.apache.royale.events.EventDispatcher.fireListeners
>>>> (
>>>> http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:97:23
>>>> )
>>>>
>>>> at Function.goog.events.EventTarget.dispatchEventInternal_ (
>>>> http://localhost:8080/WNetSuitePlus/library/closure/goog/events/eventtarget.js:381:26
>>>> )
>>>>
>>>> at
>>>> org.apache.royale.net.URLLoader.org.apache.royale.events.EventDispatcher.dispatchEvent
>>>> (
>>>> http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:72:37
>>>> )
>>>>
>>>> at org.apache.royale.net.URLLoader.jsEventHandler (
>>>> http://localhost:8080/WNetSuitePlus/org/apache/royale/net/URLLoader.js:169:12
>>>> )
>>>>
>>>>
>>>>
>>>> Call stack:
>>>>
>>>>
>>>>
>>>> <image003.png>
>>>>
>>>>
>>>>
>>>> [INFO] Executing MXMLC in tool group Royale with args: [
>>>>
>>>>
>>>> -load-config=D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\compile-app-config.xml,
>>>>
>>>> -js-default-initializers=true,
>>>>
>>>> -source-map=true,
>>>>
>>>> -js-dynamic-access-unknown-members=true,
>>>>
>>>>
>>>> -keep-as3-metadata+=Inject,Dispatcher,EventHandler,Event,PostConstruct,PreDestroy,ViewAdded,ViewRemoved,Bindable,Transient,
>>>>
>>>> -keep-code-with-metadata=Inject,
>>>>
>>>> -show-binding-warnings=false,
>>>>
>>>> -export-public-symbols=false,
>>>>
>>>> -prevent-rename-protected-symbols=false,
>>>>
>>>> -prevent-rename-internal-symbols=false,
>>>>
>>>>
>>>> -js-output=D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\javascript,
>>>>
>>>> -compiler.targets=JSRoyale,
>>>>
>>>>
>>>> D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\src\main\royale\App.mxml
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> The release execution does not change, the error is the same as before
>>>> (SDK compilation from the develop branch):
>>>>
>>>>
>>>>
>>>> Se produjo una excepción: ReferenceError: Error #1065: Variable
>>>> com.iest.winplusweb.models.MasterConfigSystemModel is not defined.
>>>>
>>>> at yR (http://localhost:8080/WPWebRelease/App.js:3605:1771)
>>>>
>>>> at Mya (http://localhost:8080/WPWebRelease/App.js:3343:365)
>>>>
>>>> at AR.J.usa (http://localhost:8080/WPWebRelease/App.js:434:441)
>>>>
>>>> at GFa.J.fromTypeDefinition (
>>>> http://localhost:8080/WPWebRelease/App.js:5706:139)
>>>>
>>>> at Function.YT.getTypeDescriptor (
>>>> http://localhost:8080/WPWebRelease/App.js:4570:820)
>>>>
>>>> at Function.fX.constructBean (
>>>> http://localhost:8080/WPWebRelease/App.js:2336:472)
>>>>
>>>> at r$.J.initialize (
>>>> http://localhost:8080/WPWebRelease/App.js:5041:66)
>>>>
>>>> at OW.J.init (http://localhost:8080/WPWebRelease/App.js:950:452)
>>>>
>>>> at OW.J.u (http://localhost:8080/WPWebRelease/App.js:951:454)
>>>>
>>>> at $$.J.addBead (http://localhost:8080/WPWebRelease/App.js:357:549)
>>>>
>>>>
>>>>
>>>> The main difference:
>>>>
>>>> project compiled from "SDK-develop" runs fine in js-debug and gives
>>>> error in js-release and, compiled from "SDK-ROYALE_INTERFACE_INFO" does not
>>>> launch because of conversion error.
>>>>
>>>>
>>>>
>>>> Hiedra
>>>>
>>>>
>>>>
>>>> *De:* Roman Isitua <ro...@gmail.com>
>>>> *Enviado el:* martes, 28 de diciembre de 2021 15:55
>>>> *Para:* users@royale.apache.org
>>>> *Asunto:* Re: Load time is very slow
>>>>
>>>>
>>>>
>>>> @Harb
>>>>
>>>>
>>>>
>>>> I have checked out the feature/ROYALE_INTERFACE_INFO branch and
>>>> compiled asjs and compiler. I have rebuilt my application with modules in
>>>> release mode.
>>>>
>>>>
>>>>
>>>> I get the following error when I attempt to launch a module
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> <image001.png>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> The module loads fine in debug mode
>>>>
>>>>
>>>>
>>>> <image002.png>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> Snippets of the log
>>>>
>>>>
>>>>
>>>> Overview.js:786 Uncaught TypeError: cm.valuesImpl.init is not a function
>>>> at Rr.Mr.yl (Overview.js:786)
>>>> at Function.iq.generateMXMLProperties (Overview.js:736)
>>>> at Rr.hq.generateMXMLAttributes (Overview.js:546)
>>>> at new Rr (Overview.js:804)
>>>> at LN.J.loadHandler (FrontEnd.js:1967)
>>>> Mr.yl @ Overview.js:786
>>>> iq.generateMXMLProperties @ Overview.js:736
>>>> hq.generateMXMLAttributes @ Overview.js:546
>>>> Rr @ Overview.js:804
>>>> J.loadHandler @ FrontEnd.js:1967
>>>> load (async)
>>>> LN.loadModule @ FrontEnd.js:1965
>>>> dN.loadModule @ FrontEnd.js:2406
>>>> LD.Un @ FrontEnd.js:1809
>>>> ny @ FrontEnd.js:123
>>>> ny @ FrontEnd.js:248
>>>> iy @ FrontEnd.js:125
>>>> b @ FrontEnd.js:121
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> I have attached the full log to this email.
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> On Tue, Dec 28, 2021 at 2:51 PM Roman Isitua <ro...@gmail.com>
>>>> wrote:
>>>>
>>>> Hi Maria,
>>>>
>>>>
>>>>
>>>> Prior to starting this mail discussion "Load time is very slow". I can
>>>> confirm I have only been compiling in debug mode. My target\javascript\bin\
>>>> only had js-debug. It was after I upgraded my royale sdk from 0.9.7 to
>>>> 0.9.8 that I compiled in release mode.
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> On Tue, Dec 28, 2021 at 2:24 PM Maria Jose Esteve <mj...@iest.com>
>>>> wrote:
>>>>
>>>> Hi, @Roman, I think you are doing a double compile can it be? My times
>>>> are the same as yours and I always compile in debug and release.
>>>>
>>>>
>>>>
>>>> Look at your target folder " target\javascript\bin\" and if you have
>>>> two folders: js-debug and js-release you are compiling always double.
>>>>
>>>>
>>>>
>>>> In my case, the architecture of my project as well as the Maven
>>>> compilation files (pom.xml) were provided by an external company (we didn't
>>>> know anything about Maven or Royale at that time) and I understand that
>>>> this formula was chosen to show us the options we had.
>>>>
>>>>
>>>>
>>>> A priori and without doing any test as Harb has done, I think that
>>>> modularity gives us the advantage of compiling parts of the code once and
>>>> not compiling them again if they are not modified. So far WITH MY
>>>> COMPILATION TIMES, sometimes more than 1 minute, this is fundamental. But
>>>> of course, now we have the problem of minification of the modules and it is
>>>> really a serious problem because it is impossible for us to deploy in
>>>> production.
>>>>
>>>>
>>>>
>>>> I will try to separate the compiación realese with a profile and if I
>>>> succeed I will pass it to you @Roman.
>>>>
>>>>
>>>>
>>>> @Harb what do you mean by compiling the ROYALE_INTERFACE_INFO branch?
>>>>
>>>>
>>>>
>>>> Hiedra
>>>>
>>>>
>>>>
>>>> *De:* Harbs <ha...@gmail.com>
>>>> *Enviado el:* lunes, 27 de diciembre de 2021 18:32
>>>> *Para:* users@royale.apache.org
>>>> *Asunto:* Re: Load time is very slow
>>>>
>>>>
>>>>
>>>> That doesn’t sound right.
>>>>
>>>>
>>>>
>>>> Are you sure you’re compiling debug and not release? That sounds like
>>>> release build times.
>>>>
>>>>
>>>>
>>>> On Dec 27, 2021, at 3:31 PM, Roman Isitua <ro...@gmail.com>
>>>> wrote:
>>>>
>>>>
>>>>
>>>> Wow ! You are using a workstation with a bleeding edge processor.
>>>>
>>>>
>>>>
>>>> I just compiled my app now. It took 44 seconds. (First compilation
>>>> after ide start up.) Subsequently compilations are usually 19s to 20s.
>>>>
>>>>
>>>>
>>>> My application code base is very very small compared to yours. As we
>>>> continue to add functionality, I expect the compile times to rise.
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>> <MainApp_pom.xml><Overview_pom.xml><fm_client2_pom.xml>
>>
>>
>>
>
Re: Compiling Modules (was Re: Load time is very slow)
Posted by Harbs <ha...@gmail.com>.
Did you apply the input_file options to the module?
> On Dec 30, 2021, at 11:42 PM, Roman Isitua <ro...@gmail.com> wrote:
>
>
> I have applied the js compiler option as follows
>
> <additionalCompilerOptions>-source-map=false;-compiler.show-binding-warnings=false;-js-default-initializers=true;-js-dynamic-access-unknown-members=true;
> -js-compiler-option=--variable_map_output_file gccvars.txt;-js-compiler-option+=--property_map_output_file gccprops.txt
> </additionalCompilerOptions>
>
>
> I get the same error as before when attempting to launch the jewel module.
>
> <image.png>
>
>
> Same error trace.
>
> Uncaught TypeError: cm.valuesImpl.init is not a function
> at Rr.Mr.yl (Overview.js:786)
> at Function.iq.generateMXMLProperties (Overview.js:736)
> at Rr.hq.generateMXMLAttributes (Overview.js:546)
> at new Rr (Overview.js:804)
> at LN.J.loadHandler (FrontEnd.js:1967)
> FrontEnd.js:1640 Uncaught TypeError: M is not a function
> at oM.J.handleMouseOut (FrontEnd.js:1640)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:248)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> FrontEnd.js:1640 Uncaught TypeError: M is not a function
> at oM.J.handleMouseOver (FrontEnd.js:1640)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:248)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> FrontEnd.js:1640 Uncaught TypeError: M is not a function
> at oM.J.handleMouseOut (FrontEnd.js:1640)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:248)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> FrontEnd.js:1640 Uncaught TypeError: M is not a function
> at oM.J.handleMouseOver (FrontEnd.js:1640)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:248)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> FrontEnd.js:1640 Uncaught TypeError: M is not a function
> at oM.J.handleMouseOut (FrontEnd.js:1640)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:248)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> FrontEnd.js:1640 Uncaught TypeError: M is not a function
> at oM.J.handleMouseOver (FrontEnd.js:1640)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:248)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> FrontEnd.js:1640 Uncaught TypeError: M is not a function
> at oM.J.handleMouseOut (FrontEnd.js:1640)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:248)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> 3Overview.js:56 Uncaught TypeError: Cannot read properties of undefined (reading 'prototype')
> at P (Overview.js:56)
> at SG.convert (FrontEnd.js:904)
> at ny (FrontEnd.js:248)
> at HTMLElement.iy (FrontEnd.js:125)
> at HTMLElement.b (FrontEnd.js:121)
>
> On Thu, Dec 30, 2021 at 6:56 PM Harbs <harbs.lists@gmail.com <ma...@gmail.com>> wrote:
> 1. I’d get rid of the agressive minification options. It will likely cause issues. If you get it to work without those options, you can try to add them back in and see if it still works.
> 2. You seem to be missing the compiler options explained here: https://apache.github.io/royale-docs/features/modules#minification <https://apache.github.io/royale-docs/features/modules#minification>
>
> For a pom, it would look something like this (adjust your paths to match your setup):
>
> Main app:
> <additionalCompilerOptions>-source-map=true;-js-compiler-option=--variable_map_output_file gccvars.txt;-js-compiler-option+=--property_map_output_file gccprops.txt</additionalCompilerOptions>
>
> Module:
> <additionalCompilerOptions>-source-map=true;-js-compiler-option=--variable_map_input_file ../../../../../MainApp/bin/js-release/gccvars.txt;-js-compiler-option+=--property_map_input_file ../../../../../MainApp/bin/js-release/gccprops.txt</additionalCompilerOptions>
>
>> On Dec 30, 2021, at 7:43 PM, Roman Isitua <romanisitua@gmail.com <ma...@gmail.com>> wrote:
>>
>> I think it will be better for me to share my pom's that way you can see all the compilation options used. The pom for the parent (FmClient2), the MainApp and one module (Overview) have been attached to this email.
>>
>>
>> On Thu, Dec 30, 2021 at 6:22 PM Harbs <harbs.lists@gmail.com <ma...@gmail.com>> wrote:
>> Roman, can you share your full compiler options?
>>
>>> I decided to remove the below settings completely
>>> -export-public-symbols=false
>>> -prevent-rename-protected-symbols=false
>>> -prevent-rename-public-symbols=false
>>> -prevent-rename-internal-symbols=false
>>>
>>>
>>> I enabled the below settings
>>>
>>> -js-dynamic-access-unknown-members=true;
>>> -js-default-initializers=true
>>>
>>>
>>> The release version starts up
>>>
>>>
>>>
>>
>> Hiedra, that’s great!
>>
>>> On Dec 30, 2021, at 7:15 PM, Roman Isitua <romanisitua@gmail.com <ma...@gmail.com>> wrote:
>>>
>>>
>>> Yes. I am testing with the sdk compiled on branch ROYALE_INTERFACE_INFO
>>>
>>> On Thu, Dec 30, 2021 at 6:10 PM Maria Jose Esteve <mjesteve@iest.com <ma...@iest.com>> wrote:
>>> Roman, are you testing with the SDK compiled from the Harb branches, ROYALE_INTERFACE_INFO, or from develop?
>>>
>>>
>>>
>>> Hiedra
>>>
>>>
>>>
>>> De: Roman Isitua <romanisitua@gmail.com <ma...@gmail.com>>
>>> Enviado el: jueves, 30 de diciembre de 2021 16:52
>>> Para: users@royale.apache.org <ma...@royale.apache.org>
>>> Asunto: Re: Compiling Modules (was Re: Load time is very slow)
>>>
>>>
>>>
>>> I decided to remove the below settings completely
>>> -export-public-symbols=false
>>> -prevent-rename-protected-symbols=false
>>> -prevent-rename-public-symbols=false
>>> -prevent-rename-internal-symbols=false
>>>
>>>
>>> I enabled the below settings
>>>
>>> -js-dynamic-access-unknown-members=true;
>>> -js-default-initializers=true
>>>
>>>
>>> The release version starts up
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> <image001.png>
>>>
>>>
>>>
>>>
>>>
>>> <image002.png>
>>>
>>>
>>>
>>> However, the moment I launch a module. I get the below error
>>>
>>>
>>>
>>> <image003.png>
>>>
>>>
>>>
>>>
>>>
>>> It appears to be failing when I launch the "Overview" module (by clicking the Overview side menu).
>>>
>>>
>>>
>>> So my current observation is that by retaining only two settings
>>>
>>>
>>>
>>> -js-dynamic-access-unknown-members=true;
>>> -js-default-initializers=true
>>>
>>>
>>>
>>> The release module starts up but the app fails whenever I launch a module.
>>>
>>>
>>>
>>> The smallest size settings in the documentation do not work. The app does not start up.
>>>
>>>
>>>
>>> -export-public-symbols=false
>>> -prevent-rename-protected-symbols=false
>>> -prevent-rename-public-symbols=false
>>> -prevent-rename-internal-symbols=false
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> The error trace is below
>>>
>>>
>>>
>>>
>>>
>>> Uncaught TypeError: cm.valuesImpl.init is not a function
>>> at Wr.Rr.pl <http://wr.rr.pl/> (Overview.js:792)
>>> at Function.mq.generateMXMLProperties (Overview.js:743)
>>> at Wr.lq.generateMXMLAttributes (Overview.js:551)
>>> at new Wr (Overview.js:810)
>>> at QN.J.loadHandler (FrontEnd.js:1978)
>>> 3Overview.js:56 Uncaught TypeError: Cannot read properties of undefined (reading 'prototype')
>>> at P (Overview.js:56)
>>> at VG.convert (FrontEnd.js:910)
>>> at ny (FrontEnd.js:250)
>>> at HTMLElement.iy (FrontEnd.js:125)
>>> at HTMLElement.b (FrontEnd.js:121)
>>> FrontEnd.js:1649 Uncaught TypeError: M is not a function
>>> at sM.J.handleMouseOut (FrontEnd.js:1649)
>>> at Function.ny [as googFireListener] (FrontEnd.js:123)
>>> at ny (FrontEnd.js:250)
>>> at HTMLAnchorElement.iy (FrontEnd.js:125)
>>> at HTMLAnchorElement.b (FrontEnd.js:121)
>>> FrontEnd.js:1649 Uncaught TypeError: M is not a function
>>> at sM.J.handleMouseOver (FrontEnd.js:1649)
>>> at Function.ny [as googFireListener] (FrontEnd.js:123)
>>> at ny (FrontEnd.js:250)
>>> at HTMLAnchorElement.iy (FrontEnd.js:125)
>>> at HTMLAnchorElement.b (FrontEnd.js:121)
>>> J.handleMouseOver @ FrontEnd.js:1649
>>> ny @ FrontEnd.js:123
>>> ny @ FrontEnd.js:250
>>> iy @ FrontEnd.js:125
>>> b @ FrontEnd.js:121
>>> FrontEnd.js:1649 Uncaught TypeError: M is not a function
>>> at sM.J.handleMouseOut (FrontEnd.js:1649)
>>> at Function.ny [as googFireListener] (FrontEnd.js:123)
>>> at ny (FrontEnd.js:250)
>>> at HTMLAnchorElement.iy (FrontEnd.js:125)
>>> at HTMLAnchorElement.b (FrontEnd.js:121)
>>> J.handleMouseOut @ FrontEnd.js:1649
>>> ny @ FrontEnd.js:123
>>> ny @ FrontEnd.js:250
>>> iy @ FrontEnd.js:125
>>> b @ FrontEnd.js:121
>>> FrontEnd.js:1649 Uncaught TypeError: M is not a function
>>> at sM.J.handleMouseOver (FrontEnd.js:1649)
>>> at Function.ny [as googFireListener] (FrontEnd.js:123)
>>> at ny (FrontEnd.js:250)
>>> at HTMLAnchorElement.iy (FrontEnd.js:125)
>>> at HTMLAnchorElement.b (FrontEnd.js:121)
>>> J.handleMouseOver @ FrontEnd.js:1649
>>> ny @ FrontEnd.js:123
>>> ny @ FrontEnd.js:250
>>> iy @ FrontEnd.js:125
>>> b @ FrontEnd.js:121
>>> FrontEnd.js:1649 Uncaught TypeError: M is not a function
>>> at sM.J.handleMouseOut (FrontEnd.js:1649)
>>> at Function.ny [as googFireListener] (FrontEnd.js:123)
>>> at ny (FrontEnd.js:250)
>>> at HTMLAnchorElement.iy (FrontEnd.js:125)
>>> at HTMLAnchorElement.b (FrontEnd.js:121)
>>> J.handleMouseOut @ FrontEnd.js:1649
>>> ny @ FrontEnd.js:123
>>> ny @ FrontEnd.js:250
>>> iy @ FrontEnd.js:125
>>> b @ FrontEnd.js:121
>>> FrontEnd.js:1649 Uncaught TypeError: M is not a function
>>> at sM.J.handleMouseOver (FrontEnd.js:1649)
>>> at Function.ny [as googFireListener] (FrontEnd.js:123)
>>> at ny (FrontEnd.js:250)
>>> at HTMLAnchorElement.iy (FrontEnd.js:125)
>>> at HTMLAnchorElement.b (FrontEnd.js:121)
>>> J.handleMouseOver @ FrontEnd.js:1649
>>> ny @ FrontEnd.js:123
>>> ny @ FrontEnd.js:250
>>> iy @ FrontEnd.js:125
>>> b @ FrontEnd.js:121
>>> FrontEnd.js:1649 Uncaught TypeError: M is not a function
>>> at sM.J.handleMouseOut (FrontEnd.js:1649)
>>> at Function.ny [as googFireListener] (FrontEnd.js:123)
>>> at ny (FrontEnd.js:250)
>>> at HTMLAnchorElement.iy (FrontEnd.js:125)
>>> at HTMLAnchorElement.b (FrontEnd.js:121)
>>> J.handleMouseOut @ FrontEnd.js:1649
>>> ny @ FrontEnd.js:123
>>> ny @ FrontEnd.js:250
>>> iy @ FrontEnd.js:125
>>> b @ FrontEnd.js:121
>>> FrontEnd.js:1649 Uncaught TypeError: M is not a function
>>> at sM.J.handleMouseOver (FrontEnd.js:1649)
>>> at Function.ny [as googFireListener] (FrontEnd.js:123)
>>> at ny (FrontEnd.js:250)
>>> at HTMLAnchorElement.iy (FrontEnd.js:125)
>>> at HTMLAnchorElement.b (FrontEnd.js:121)
>>> J.handleMouseOver @ FrontEnd.js:1649
>>> ny @ FrontEnd.js:123
>>> ny @ FrontEnd.js:250
>>> iy @ FrontEnd.js:125
>>> b @ FrontEnd.js:121
>>> FrontEnd.js:1649 Uncaught TypeError: M is not a function
>>> at sM.J.handleMouseOut (FrontEnd.js:1649)
>>> at Function.ny [as googFireListener] (FrontEnd.js:123)
>>> at ny (FrontEnd.js:250)
>>> at HTMLAnchorElement.iy (FrontEnd.js:125)
>>> at HTMLAnchorElement.b (FrontEnd.js:121)
>>> J.handleMouseOut @ FrontEnd.js:1649
>>> ny @ FrontEnd.js:123
>>> ny @ FrontEnd.js:250
>>> iy @ FrontEnd.js:125
>>> b @ FrontEnd.js:121
>>>
>>>
>>>
>>> On Thu, Dec 30, 2021 at 4:32 PM Roman Isitua <romanisitua@gmail.com <ma...@gmail.com>> wrote:
>>>
>>> I get the same error even when I set the -js-dynamic-access-unknown-members=true;
>>>
>>>
>>>
>>> On Thu, Dec 30, 2021 at 4:24 PM Roman Isitua <romanisitua@gmail.com <ma...@gmail.com>> wrote:
>>>
>>>
>>>
>>> Using the below settings,
>>>
>>> -export-public-symbols=false
>>> -prevent-rename-protected-symbols=false
>>> -prevent-rename-public-symbols=false
>>> -prevent-rename-internal-symbols=false
>>> -js-dynamic-access-unknown-members=false;
>>>
>>> -js-default-initializers=true
>>>
>>>
>>> Debug version runs fine. The release version does not start up
>>>
>>> <image004.png>
>>>
>>>
>>> I get the below errors
>>>
>>> Uncaught TypeError: Cannot read properties of undefined (reading 'apply')
>>> at KE.hm (FrontEnd.js:1600)
>>> at XE.M.Fb (FrontEnd.js:943)
>>> at XE.M.uh (FrontEnd.js:937)
>>> at FE.M.na <http://fe.m.na/> (FrontEnd.js:497)
>>> at FE.M.v (FrontEnd.js:497)
>>> at dR.M.S (FrontEnd.js:213)
>>> at dR.Nz.S (FrontEnd.js:217)
>>> at dR.M.start (FrontEnd.js:1396)
>>> at index.html:45
>>> :8080/favicon.ico:1 Failed to load resource: the server responded with a status of 404 (Not Found)
>>>
>>>
>>>
>>>
>>>
>>> FrontEnd.js is the start up class for the application. i.e. It implements the Jewel application class.
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> On Thu, Dec 30, 2021 at 3:19 PM Roman Isitua <romanisitua@gmail.com <ma...@gmail.com>> wrote:
>>>
>>> Hi Harb,
>>>
>>>
>>>
>>> Thanks for your response. I have gone through the documentation. I will do my test again starting with the smallest size option and share my findings.
>>>
>>>
>>>
>>> Regards,
>>>
>>>
>>>
>>> On Thu, Dec 30, 2021 at 10:59 AM Harbs <harbs.lists@gmail.com <ma...@gmail.com>> wrote:
>>>
>>> Sorry for my deal in responding.
>>>
>>>
>>>
>>> Let’s take a step back.
>>>
>>>
>>>
>>> I’m not sure how you are compiling your modules. I just added some content to the module documentation page which explains what compiler options you need while compiling modules. (It still needs some editing.) https://apache.github.io/royale-docs/features/modules#minification <https://apache.github.io/royale-docs/features/modules#minification>
>>>
>>>
>>> Are you using those options?
>>>
>>>
>>>
>>>
>>> On Dec 29, 2021, at 2:19 AM, Maria Jose Esteve <mjesteve@iest.com <ma...@iest.com>> wrote:
>>>
>>>
>>>
>>> Hi, Let me join you with these tests....
>>>
>>>
>>>
>>> @Harb, I have compiled the SDK from this branch, feature/ROYALE_INTERFACE_INFO, and when running in debug I get this error:
>>>
>>>
>>>
>>> Message on the PURGE CONSOLE is displayed:
>>>
>>>
>>>
>>> Cannot convert org.apache.royale.reflection.beads.ClassAliasBead to IBead
>>>
>>>
>>>
>>> Message in the IDE Window:
>>>
>>>
>>>
>>> Se produjo una excepción: TypeError: Cannot convert [object Object] to IBead
>>>
>>> at App.org.apache.royale.core.ElementWrapper.addBead (http://localhost:8080/WNetSuitePlus/org/apache/royale/core/ElementWrapper.js:114:11 <http://localhost:8080/WNetSuitePlus/org/apache/royale/core/ElementWrapper.js:114:11>)
>>>
>>> at App.org.apache.royale.core.HTMLElementWrapper.addBead (http://localhost:8080/WNetSuitePlus/org/apache/royale/core/HTMLElementWrapper.js:43:65 <http://localhost:8080/WNetSuitePlus/org/apache/royale/core/HTMLElementWrapper.js:43:65>)
>>>
>>> at App.org.apache.royale.jewel.Application.start (http://localhost:8080/WNetSuitePlus/org/apache/royale/jewel/Application.js:246:10 <http://localhost:8080/WNetSuitePlus/org/apache/royale/jewel/Application.js:246:10>)
>>>
>>> at App.App_loadXML (http://localhost:8080/WNetSuitePlus/App.js:1681:25 <http://localhost:8080/WNetSuitePlus/App.js:1681:25>)
>>>
>>> at org.apache.royale.net.URLLoader.org.apache.royale.events.EventDispatcher.fireListeners (http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:97:23 <http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:97:23>)
>>>
>>> at Function.goog.events.EventTarget.dispatchEventInternal_ (http://localhost:8080/WNetSuitePlus/library/closure/goog/events/eventtarget.js:381:26 <http://localhost:8080/WNetSuitePlus/library/closure/goog/events/eventtarget.js:381:26>)
>>>
>>> at org.apache.royale.net.URLLoader.org.apache.royale.events.EventDispatcher.dispatchEvent (http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:72:37 <http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:72:37>)
>>>
>>> at org.apache.royale.net.URLLoader.jsEventHandler (http://localhost:8080/WNetSuitePlus/org/apache/royale/net/URLLoader.js:169:12 <http://localhost:8080/WNetSuitePlus/org/apache/royale/net/URLLoader.js:169:12>)
>>>
>>>
>>>
>>> Call stack:
>>>
>>>
>>>
>>> <image003.png>
>>>
>>>
>>>
>>> [INFO] Executing MXMLC in tool group Royale with args: [
>>>
>>> -load-config=D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\compile-app-config.xml,
>>>
>>> -js-default-initializers=true,
>>>
>>> -source-map=true,
>>>
>>> -js-dynamic-access-unknown-members=true,
>>>
>>> -keep-as3-metadata+=Inject,Dispatcher,EventHandler,Event,PostConstruct,PreDestroy,ViewAdded,ViewRemoved,Bindable,Transient,
>>>
>>> -keep-code-with-metadata=Inject,
>>>
>>> -show-binding-warnings=false,
>>>
>>> -export-public-symbols=false,
>>>
>>> -prevent-rename-protected-symbols=false,
>>>
>>> -prevent-rename-internal-symbols=false,
>>>
>>> -js-output=D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\javascript,
>>>
>>> -compiler.targets=JSRoyale,
>>>
>>> D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\src\main\royale\App.mxml
>>>
>>>
>>>
>>>
>>>
>>> The release execution does not change, the error is the same as before (SDK compilation from the develop branch):
>>>
>>>
>>>
>>> Se produjo una excepción: ReferenceError: Error #1065: Variable com.iest.winplusweb.models.MasterConfigSystemModel is not defined.
>>>
>>> at yR (http://localhost:8080/WPWebRelease/App.js:3605:1771 <http://localhost:8080/WPWebRelease/App.js:3605:1771>)
>>>
>>> at Mya (http://localhost:8080/WPWebRelease/App.js:3343:365 <http://localhost:8080/WPWebRelease/App.js:3343:365>)
>>>
>>> at AR.J.usa (http://localhost:8080/WPWebRelease/App.js:434:441 <http://localhost:8080/WPWebRelease/App.js:434:441>)
>>>
>>> at GFa.J.fromTypeDefinition (http://localhost:8080/WPWebRelease/App.js:5706:139 <http://localhost:8080/WPWebRelease/App.js:5706:139>)
>>>
>>> at Function.YT.getTypeDescriptor (http://localhost:8080/WPWebRelease/App.js:4570:820 <http://localhost:8080/WPWebRelease/App.js:4570:820>)
>>>
>>> at Function.fX.constructBean (http://localhost:8080/WPWebRelease/App.js:2336:472 <http://localhost:8080/WPWebRelease/App.js:2336:472>)
>>>
>>> at r$.J.initialize (http://localhost:8080/WPWebRelease/App.js:5041:66 <http://localhost:8080/WPWebRelease/App.js:5041:66>)
>>>
>>> at OW.J.init (http://localhost:8080/WPWebRelease/App.js:950:452 <http://localhost:8080/WPWebRelease/App.js:950:452>)
>>>
>>> at OW.J.u (http://localhost:8080/WPWebRelease/App.js:951:454 <http://localhost:8080/WPWebRelease/App.js:951:454>)
>>>
>>> at $$.J.addBead (http://localhost:8080/WPWebRelease/App.js:357:549 <http://localhost:8080/WPWebRelease/App.js:357:549>)
>>>
>>>
>>>
>>> The main difference:
>>>
>>> project compiled from "SDK-develop" runs fine in js-debug and gives error in js-release and, compiled from "SDK-ROYALE_INTERFACE_INFO" does not launch because of conversion error.
>>>
>>>
>>>
>>> Hiedra
>>>
>>>
>>>
>>> De: Roman Isitua <romanisitua@gmail.com <ma...@gmail.com>>
>>> Enviado el: martes, 28 de diciembre de 2021 15:55
>>> Para: users@royale.apache.org <ma...@royale.apache.org>
>>> Asunto: Re: Load time is very slow
>>>
>>>
>>>
>>> @Harb
>>>
>>>
>>>
>>> I have checked out the feature/ROYALE_INTERFACE_INFO branch and compiled asjs and compiler. I have rebuilt my application with modules in release mode.
>>>
>>>
>>>
>>> I get the following error when I attempt to launch a module
>>>
>>>
>>>
>>>
>>>
>>> <image001.png>
>>>
>>>
>>>
>>>
>>>
>>> The module loads fine in debug mode
>>>
>>>
>>>
>>> <image002.png>
>>>
>>>
>>>
>>>
>>>
>>> Snippets of the log
>>>
>>>
>>>
>>> Overview.js:786 Uncaught TypeError: cm.valuesImpl.init is not a function
>>> at Rr.Mr.yl (Overview.js:786)
>>> at Function.iq.generateMXMLProperties (Overview.js:736)
>>> at Rr.hq.generateMXMLAttributes (Overview.js:546)
>>> at new Rr (Overview.js:804)
>>> at LN.J.loadHandler (FrontEnd.js:1967)
>>> Mr.yl @ Overview.js:786
>>> iq.generateMXMLProperties @ Overview.js:736
>>> hq.generateMXMLAttributes @ Overview.js:546
>>> Rr @ Overview.js:804
>>> J.loadHandler @ FrontEnd.js:1967
>>> load (async)
>>> LN.loadModule @ FrontEnd.js:1965
>>> dN.loadModule @ FrontEnd.js:2406
>>> LD.Un @ FrontEnd.js:1809
>>> ny @ FrontEnd.js:123
>>> ny @ FrontEnd.js:248
>>> iy @ FrontEnd.js:125
>>> b @ FrontEnd.js:121
>>>
>>>
>>>
>>>
>>>
>>> I have attached the full log to this email.
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> On Tue, Dec 28, 2021 at 2:51 PM Roman Isitua <romanisitua@gmail.com <ma...@gmail.com>> wrote:
>>>
>>> Hi Maria,
>>>
>>>
>>>
>>> Prior to starting this mail discussion "Load time is very slow". I can confirm I have only been compiling in debug mode. My target\javascript\bin\ only had js-debug. It was after I upgraded my royale sdk from 0.9.7 to 0.9.8 that I compiled in release mode.
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> On Tue, Dec 28, 2021 at 2:24 PM Maria Jose Esteve <mjesteve@iest.com <ma...@iest.com>> wrote:
>>>
>>> Hi, @Roman, I think you are doing a double compile can it be? My times are the same as yours and I always compile in debug and release.
>>>
>>>
>>>
>>> Look at your target folder " target\javascript\bin\" and if you have two folders: js-debug and js-release you are compiling always double.
>>>
>>>
>>>
>>> In my case, the architecture of my project as well as the Maven compilation files (pom.xml) were provided by an external company (we didn't know anything about Maven or Royale at that time) and I understand that this formula was chosen to show us the options we had.
>>>
>>>
>>>
>>> A priori and without doing any test as Harb has done, I think that modularity gives us the advantage of compiling parts of the code once and not compiling them again if they are not modified. So far WITH MY COMPILATION TIMES, sometimes more than 1 minute, this is fundamental. But of course, now we have the problem of minification of the modules and it is really a serious problem because it is impossible for us to deploy in production.
>>>
>>>
>>>
>>> I will try to separate the compiación realese with a profile and if I succeed I will pass it to you @Roman.
>>>
>>>
>>>
>>> @Harb what do you mean by compiling the ROYALE_INTERFACE_INFO branch?
>>>
>>>
>>>
>>> Hiedra
>>>
>>>
>>>
>>> De: Harbs <harbs.lists@gmail.com <ma...@gmail.com>>
>>> Enviado el: lunes, 27 de diciembre de 2021 18:32
>>> Para: users@royale.apache.org <ma...@royale.apache.org>
>>> Asunto: Re: Load time is very slow
>>>
>>>
>>>
>>> That doesn’t sound right.
>>>
>>>
>>>
>>> Are you sure you’re compiling debug and not release? That sounds like release build times.
>>>
>>>
>>>
>>> On Dec 27, 2021, at 3:31 PM, Roman Isitua <romanisitua@gmail.com <ma...@gmail.com>> wrote:
>>>
>>>
>>>
>>> Wow ! You are using a workstation with a bleeding edge processor.
>>>
>>>
>>>
>>> I just compiled my app now. It took 44 seconds. (First compilation after ide start up.) Subsequently compilations are usually 19s to 20s.
>>>
>>>
>>>
>>> My application code base is very very small compared to yours. As we continue to add functionality, I expect the compile times to rise.
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>
>> <MainApp_pom.xml><Overview_pom.xml><fm_client2_pom.xml>
>
Re: Compiling Modules (was Re: Load time is very slow)
Posted by Roman Isitua <ro...@gmail.com>.
I have tried tracing where the errors are happening whenever I test the
release version
Uncaught TypeError: Ql.valuesImpl.init is not a function
at Hr.Cr.um (Overview.js:846)
at Function.ep.generateMXMLProperties (Overview.js:795)
at Hr.Sp.generateMXMLAttributes (Overview.js:599)
at new Hr (Overview.js:864)
at PN.M.loadHandler (FrontEnd.js:2042)
9Overview.js:173 Uncaught TypeError: this.createElement is not a function
at $B.V (Overview.js:173)
at new $B (FrontEnd.js:2430)
at EP.convert (FrontEnd.js:2430)
at Zy (FrontEnd.js:261)
at HTMLAnchorElement.Uy (FrontEnd.js:121)
at HTMLAnchorElement.Sy.b (FrontEnd.js:117)
The highlighted code in red is declared as follows in the Overview.mxml
(maven module)
<j:valuesImpl>
<js:SimpleCSSValuesImpl/>
</j:valuesImpl>
The j:valuesImpl points to the following code in jewel Module.js
/**
* @nocollapse
* @export
* @type {org.apache.royale.core.IValuesImpl}
*/
org.apache.royale.jewel.Module.prototype.valuesImpl;
org.apache.royale.jewel.Module.prototype.set__valuesImpl = function(value) {
org.apache.royale.core.ValuesManager.valuesImpl.init(this);
};
it appears this function is improperly renamed and whenever the app tries
to load the module is not able to recognise it as a function.
The same issue of improper function renaming is happening in the second
error as well
9Overview.js:173 Uncaught TypeError: this.createElement is not a function
On Thu, Dec 30, 2021 at 10:42 PM Roman Isitua <ro...@gmail.com> wrote:
>
> I have applied the js compiler option as follows
>
>
> <additionalCompilerOptions>-source-map=false;-compiler.show-binding-warnings=false;-js-default-initializers=true;-js-dynamic-access-unknown-members=true;
> -js-compiler-option=--variable_map_output_file
> gccvars.txt;-js-compiler-option+=--property_map_output_file gccprops.txt
> </additionalCompilerOptions>
>
>
> I get the same error as before when attempting to launch the jewel module.
>
> [image: image.png]
>
>
> Same error trace.
>
> Uncaught TypeError: cm.valuesImpl.init is not a function
> at Rr.Mr.yl (Overview.js:786)
> at Function.iq.generateMXMLProperties (Overview.js:736)
> at Rr.hq.generateMXMLAttributes (Overview.js:546)
> at new Rr (Overview.js:804)
> at LN.J.loadHandler (FrontEnd.js:1967)
> FrontEnd.js:1640 Uncaught TypeError: M is not a function
> at oM.J.handleMouseOut (FrontEnd.js:1640)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:248)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> FrontEnd.js:1640 Uncaught TypeError: M is not a function
> at oM.J.handleMouseOver (FrontEnd.js:1640)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:248)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> FrontEnd.js:1640 Uncaught TypeError: M is not a function
> at oM.J.handleMouseOut (FrontEnd.js:1640)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:248)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> FrontEnd.js:1640 Uncaught TypeError: M is not a function
> at oM.J.handleMouseOver (FrontEnd.js:1640)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:248)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> FrontEnd.js:1640 Uncaught TypeError: M is not a function
> at oM.J.handleMouseOut (FrontEnd.js:1640)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:248)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> FrontEnd.js:1640 Uncaught TypeError: M is not a function
> at oM.J.handleMouseOver (FrontEnd.js:1640)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:248)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> FrontEnd.js:1640 Uncaught TypeError: M is not a function
> at oM.J.handleMouseOut (FrontEnd.js:1640)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:248)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> 3Overview.js:56 Uncaught TypeError: Cannot read properties of undefined
> (reading 'prototype')
> at P (Overview.js:56)
> at SG.convert (FrontEnd.js:904)
> at ny (FrontEnd.js:248)
> at HTMLElement.iy (FrontEnd.js:125)
> at HTMLElement.b (FrontEnd.js:121)
>
> On Thu, Dec 30, 2021 at 6:56 PM Harbs <ha...@gmail.com> wrote:
>
>> 1. I’d get rid of the agressive minification options. It will likely
>> cause issues. If you get it to work without those options, you can try to
>> add them back in and see if it still works.
>> 2. You seem to be missing the compiler options explained here:
>> https://apache.github.io/royale-docs/features/modules#minification
>>
>> For a pom, it would look something like this (adjust your paths to match
>> your setup):
>>
>> Main app:
>> <additionalCompilerOptions>-source-map=true;-js-compiler-option=--variable_map_output_file
>> gccvars.txt;-js-compiler-option+=--property_map_output_file
>> gccprops.txt</additionalCompilerOptions>
>>
>> Module:
>> <additionalCompilerOptions>-source-map=true;-js-compiler-option=--variable_map_input_file
>> ../../../../../MainApp/bin/js-release/gccvars.txt;-js-compiler-option+=--property_map_input_file
>> ../../../../../MainApp/bin/js-release/gccprops.txt</additionalCompilerOptions>
>>
>> On Dec 30, 2021, at 7:43 PM, Roman Isitua <ro...@gmail.com> wrote:
>>
>> I think it will be better for me to share my pom's that way you can see
>> all the compilation options used. The pom for the parent (FmClient2), the
>> MainApp and one module (Overview) have been attached to this email.
>>
>>
>> On Thu, Dec 30, 2021 at 6:22 PM Harbs <ha...@gmail.com> wrote:
>>
>>> Roman, can you share your full compiler options?
>>>
>>> I decided to remove the below settings completely
>>>> -export-public-symbols=false
>>>> -prevent-rename-protected-symbols=false
>>>> -prevent-rename-public-symbols=false
>>>> -prevent-rename-internal-symbols=false
>>>>
>>>>
>>>> I enabled the below settings
>>>>
>>>> -js-dynamic-access-unknown-members=true;
>>>> -js-default-initializers=true
>>>>
>>>>
>>>> The release version starts up
>>>>
>>>>
>>>>
>>> Hiedra, that’s great!
>>>
>>> On Dec 30, 2021, at 7:15 PM, Roman Isitua <ro...@gmail.com> wrote:
>>>
>>>
>>> Yes. I am testing with the sdk compiled on branch ROYALE_INTERFACE_INFO
>>>
>>> On Thu, Dec 30, 2021 at 6:10 PM Maria Jose Esteve <mj...@iest.com>
>>> wrote:
>>>
>>>> Roman, are you testing with the SDK compiled from the Harb branches,
>>>> ROYALE_INTERFACE_INFO, or from develop?
>>>>
>>>>
>>>>
>>>> Hiedra
>>>>
>>>>
>>>>
>>>> *De:* Roman Isitua <ro...@gmail.com>
>>>> *Enviado el:* jueves, 30 de diciembre de 2021 16:52
>>>> *Para:* users@royale.apache.org
>>>> *Asunto:* Re: Compiling Modules (was Re: Load time is very slow)
>>>>
>>>>
>>>>
>>>> I decided to remove the below settings completely
>>>> -export-public-symbols=false
>>>> -prevent-rename-protected-symbols=false
>>>> -prevent-rename-public-symbols=false
>>>> -prevent-rename-internal-symbols=false
>>>>
>>>>
>>>> I enabled the below settings
>>>>
>>>> -js-dynamic-access-unknown-members=true;
>>>> -js-default-initializers=true
>>>>
>>>>
>>>> The release version starts up
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> <image001.png>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> <image002.png>
>>>>
>>>>
>>>>
>>>> However, the moment I launch a module. I get the below error
>>>>
>>>>
>>>>
>>>> <image003.png>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> It appears to be failing when I launch the "*Overview*" module
>>>> (by clicking the Overview side menu).
>>>>
>>>>
>>>>
>>>> So my current observation is that by retaining only two settings
>>>>
>>>>
>>>>
>>>> -js-dynamic-access-unknown-members=true;
>>>> -js-default-initializers=true
>>>>
>>>>
>>>>
>>>> The release module starts up but the app fails whenever I launch a
>>>> module.
>>>>
>>>>
>>>>
>>>> The smallest size settings in the documentation do not work. The app
>>>> does not start up.
>>>>
>>>>
>>>>
>>>> -export-public-symbols=false
>>>> -prevent-rename-protected-symbols=false
>>>> -prevent-rename-public-symbols=false
>>>> -prevent-rename-internal-symbols=false
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> The error trace is below
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> Uncaught TypeError: cm.valuesImpl.init is not a function
>>>> at Wr.Rr.pl <http://wr.rr.pl/> (Overview.js:792)
>>>> at Function.mq.generateMXMLProperties (Overview.js:743)
>>>> at Wr.lq.generateMXMLAttributes (Overview.js:551)
>>>> at new Wr (Overview.js:810)
>>>> at QN.J.loadHandler (FrontEnd.js:1978)
>>>> 3Overview.js:56 Uncaught TypeError: Cannot read properties of undefined
>>>> (reading 'prototype')
>>>> at P (Overview.js:56)
>>>> at VG.convert (FrontEnd.js:910)
>>>> at ny (FrontEnd.js:250)
>>>> at HTMLElement.iy (FrontEnd.js:125)
>>>> at HTMLElement.b (FrontEnd.js:121)
>>>> FrontEnd.js:1649 Uncaught TypeError: M is not a function
>>>> at sM.J.handleMouseOut (FrontEnd.js:1649)
>>>> at Function.ny [as googFireListener] (FrontEnd.js:123)
>>>> at ny (FrontEnd.js:250)
>>>> at HTMLAnchorElement.iy (FrontEnd.js:125)
>>>> at HTMLAnchorElement.b (FrontEnd.js:121)
>>>> FrontEnd.js:1649 Uncaught TypeError: M is not a function
>>>> at sM.J.handleMouseOver (FrontEnd.js:1649)
>>>> at Function.ny [as googFireListener] (FrontEnd.js:123)
>>>> at ny (FrontEnd.js:250)
>>>> at HTMLAnchorElement.iy (FrontEnd.js:125)
>>>> at HTMLAnchorElement.b (FrontEnd.js:121)
>>>> J.handleMouseOver @ FrontEnd.js:1649
>>>> ny @ FrontEnd.js:123
>>>> ny @ FrontEnd.js:250
>>>> iy @ FrontEnd.js:125
>>>> b @ FrontEnd.js:121
>>>> FrontEnd.js:1649 Uncaught TypeError: M is not a function
>>>> at sM.J.handleMouseOut (FrontEnd.js:1649)
>>>> at Function.ny [as googFireListener] (FrontEnd.js:123)
>>>> at ny (FrontEnd.js:250)
>>>> at HTMLAnchorElement.iy (FrontEnd.js:125)
>>>> at HTMLAnchorElement.b (FrontEnd.js:121)
>>>> J.handleMouseOut @ FrontEnd.js:1649
>>>> ny @ FrontEnd.js:123
>>>> ny @ FrontEnd.js:250
>>>> iy @ FrontEnd.js:125
>>>> b @ FrontEnd.js:121
>>>> FrontEnd.js:1649 Uncaught TypeError: M is not a function
>>>> at sM.J.handleMouseOver (FrontEnd.js:1649)
>>>> at Function.ny [as googFireListener] (FrontEnd.js:123)
>>>> at ny (FrontEnd.js:250)
>>>> at HTMLAnchorElement.iy (FrontEnd.js:125)
>>>> at HTMLAnchorElement.b (FrontEnd.js:121)
>>>> J.handleMouseOver @ FrontEnd.js:1649
>>>> ny @ FrontEnd.js:123
>>>> ny @ FrontEnd.js:250
>>>> iy @ FrontEnd.js:125
>>>> b @ FrontEnd.js:121
>>>> FrontEnd.js:1649 Uncaught TypeError: M is not a function
>>>> at sM.J.handleMouseOut (FrontEnd.js:1649)
>>>> at Function.ny [as googFireListener] (FrontEnd.js:123)
>>>> at ny (FrontEnd.js:250)
>>>> at HTMLAnchorElement.iy (FrontEnd.js:125)
>>>> at HTMLAnchorElement.b (FrontEnd.js:121)
>>>> J.handleMouseOut @ FrontEnd.js:1649
>>>> ny @ FrontEnd.js:123
>>>> ny @ FrontEnd.js:250
>>>> iy @ FrontEnd.js:125
>>>> b @ FrontEnd.js:121
>>>> FrontEnd.js:1649 Uncaught TypeError: M is not a function
>>>> at sM.J.handleMouseOver (FrontEnd.js:1649)
>>>> at Function.ny [as googFireListener] (FrontEnd.js:123)
>>>> at ny (FrontEnd.js:250)
>>>> at HTMLAnchorElement.iy (FrontEnd.js:125)
>>>> at HTMLAnchorElement.b (FrontEnd.js:121)
>>>> J.handleMouseOver @ FrontEnd.js:1649
>>>> ny @ FrontEnd.js:123
>>>> ny @ FrontEnd.js:250
>>>> iy @ FrontEnd.js:125
>>>> b @ FrontEnd.js:121
>>>> FrontEnd.js:1649 Uncaught TypeError: M is not a function
>>>> at sM.J.handleMouseOut (FrontEnd.js:1649)
>>>> at Function.ny [as googFireListener] (FrontEnd.js:123)
>>>> at ny (FrontEnd.js:250)
>>>> at HTMLAnchorElement.iy (FrontEnd.js:125)
>>>> at HTMLAnchorElement.b (FrontEnd.js:121)
>>>> J.handleMouseOut @ FrontEnd.js:1649
>>>> ny @ FrontEnd.js:123
>>>> ny @ FrontEnd.js:250
>>>> iy @ FrontEnd.js:125
>>>> b @ FrontEnd.js:121
>>>> FrontEnd.js:1649 Uncaught TypeError: M is not a function
>>>> at sM.J.handleMouseOver (FrontEnd.js:1649)
>>>> at Function.ny [as googFireListener] (FrontEnd.js:123)
>>>> at ny (FrontEnd.js:250)
>>>> at HTMLAnchorElement.iy (FrontEnd.js:125)
>>>> at HTMLAnchorElement.b (FrontEnd.js:121)
>>>> J.handleMouseOver @ FrontEnd.js:1649
>>>> ny @ FrontEnd.js:123
>>>> ny @ FrontEnd.js:250
>>>> iy @ FrontEnd.js:125
>>>> b @ FrontEnd.js:121
>>>> FrontEnd.js:1649 Uncaught TypeError: M is not a function
>>>> at sM.J.handleMouseOut (FrontEnd.js:1649)
>>>> at Function.ny [as googFireListener] (FrontEnd.js:123)
>>>> at ny (FrontEnd.js:250)
>>>> at HTMLAnchorElement.iy (FrontEnd.js:125)
>>>> at HTMLAnchorElement.b (FrontEnd.js:121)
>>>> J.handleMouseOut @ FrontEnd.js:1649
>>>> ny @ FrontEnd.js:123
>>>> ny @ FrontEnd.js:250
>>>> iy @ FrontEnd.js:125
>>>> b @ FrontEnd.js:121
>>>>
>>>>
>>>>
>>>> On Thu, Dec 30, 2021 at 4:32 PM Roman Isitua <ro...@gmail.com>
>>>> wrote:
>>>>
>>>> I get the same error even when I set
>>>> the -js-dynamic-access-unknown-members=true;
>>>>
>>>>
>>>>
>>>> On Thu, Dec 30, 2021 at 4:24 PM Roman Isitua <ro...@gmail.com>
>>>> wrote:
>>>>
>>>>
>>>>
>>>> Using the below settings,
>>>>
>>>> -export-public-symbols=false
>>>> -prevent-rename-protected-symbols=false
>>>> -prevent-rename-public-symbols=false
>>>> -prevent-rename-internal-symbols=false
>>>> -js-dynamic-access-unknown-members=false;
>>>>
>>>> -js-default-initializers=true
>>>>
>>>>
>>>> Debug version runs fine. The release version does not start up
>>>>
>>>> <image004.png>
>>>>
>>>>
>>>> I get the below errors
>>>>
>>>> Uncaught TypeError: Cannot read properties of undefined (reading
>>>> 'apply')
>>>> at KE.hm (FrontEnd.js:1600)
>>>> at XE.M.Fb (FrontEnd.js:943)
>>>> at XE.M.uh (FrontEnd.js:937)
>>>> at FE.M.na <http://fe.m.na/> (FrontEnd.js:497)
>>>> at FE.M.v (FrontEnd.js:497)
>>>> at dR.M.S (FrontEnd.js:213)
>>>> at dR.Nz.S (FrontEnd.js:217)
>>>> at dR.M.start (FrontEnd.js:1396)
>>>> at index.html:45
>>>> :8080/favicon.ico:1 Failed to load resource: the server responded with
>>>> a status of 404 (Not Found)
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> FrontEnd.js is the start up class for the application. i.e. It
>>>> implements the Jewel application class.
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> On Thu, Dec 30, 2021 at 3:19 PM Roman Isitua <ro...@gmail.com>
>>>> wrote:
>>>>
>>>> Hi Harb,
>>>>
>>>>
>>>>
>>>> Thanks for your response. I have gone through the documentation. I will
>>>> do my test again starting with the smallest size option and share my
>>>> findings.
>>>>
>>>>
>>>>
>>>> Regards,
>>>>
>>>>
>>>>
>>>> On Thu, Dec 30, 2021 at 10:59 AM Harbs <ha...@gmail.com> wrote:
>>>>
>>>> Sorry for my deal in responding.
>>>>
>>>>
>>>>
>>>> Let’s take a step back.
>>>>
>>>>
>>>>
>>>> I’m not sure how you are compiling your modules. I just added some
>>>> content to the module documentation page which explains what compiler
>>>> options you need while compiling modules. (It still needs some editing.)
>>>> https://apache.github.io/royale-docs/features/modules#minification
>>>>
>>>>
>>>>
>>>> Are you using those options?
>>>>
>>>>
>>>>
>>>> On Dec 29, 2021, at 2:19 AM, Maria Jose Esteve <mj...@iest.com>
>>>> wrote:
>>>>
>>>>
>>>>
>>>> Hi, Let me join you with these tests....
>>>>
>>>>
>>>>
>>>> @Harb, I have compiled the SDK from this branch, feature/ROYALE_INTERFACE_INFO,
>>>> and when running in debug I get this error:
>>>>
>>>>
>>>>
>>>> Message on the PURGE CONSOLE is displayed:
>>>>
>>>>
>>>>
>>>> Cannot convert org.apache.royale.reflection.beads.ClassAliasBead to
>>>> IBead
>>>>
>>>>
>>>>
>>>> Message in the IDE Window:
>>>>
>>>>
>>>>
>>>> Se produjo una excepción: TypeError: Cannot convert [object Object] to
>>>> IBead
>>>>
>>>> at App.org.apache.royale.core.ElementWrapper.addBead (
>>>> http://localhost:8080/WNetSuitePlus/org/apache/royale/core/ElementWrapper.js:114:11
>>>> )
>>>>
>>>> at App.org.apache.royale.core.HTMLElementWrapper.addBead (
>>>> http://localhost:8080/WNetSuitePlus/org/apache/royale/core/HTMLElementWrapper.js:43:65
>>>> )
>>>>
>>>> at App.org.apache.royale.jewel.Application.start (
>>>> http://localhost:8080/WNetSuitePlus/org/apache/royale/jewel/Application.js:246:10
>>>> )
>>>>
>>>> at App.App_loadXML (
>>>> http://localhost:8080/WNetSuitePlus/App.js:1681:25)
>>>>
>>>> at
>>>> org.apache.royale.net.URLLoader.org.apache.royale.events.EventDispatcher.fireListeners
>>>> (
>>>> http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:97:23
>>>> )
>>>>
>>>> at Function.goog.events.EventTarget.dispatchEventInternal_ (
>>>> http://localhost:8080/WNetSuitePlus/library/closure/goog/events/eventtarget.js:381:26
>>>> )
>>>>
>>>> at
>>>> org.apache.royale.net.URLLoader.org.apache.royale.events.EventDispatcher.dispatchEvent
>>>> (
>>>> http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:72:37
>>>> )
>>>>
>>>> at org.apache.royale.net.URLLoader.jsEventHandler (
>>>> http://localhost:8080/WNetSuitePlus/org/apache/royale/net/URLLoader.js:169:12
>>>> )
>>>>
>>>>
>>>>
>>>> Call stack:
>>>>
>>>>
>>>>
>>>> <image003.png>
>>>>
>>>>
>>>>
>>>> [INFO] Executing MXMLC in tool group Royale with args: [
>>>>
>>>>
>>>> -load-config=D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\compile-app-config.xml,
>>>>
>>>> -js-default-initializers=true,
>>>>
>>>> -source-map=true,
>>>>
>>>> -js-dynamic-access-unknown-members=true,
>>>>
>>>>
>>>> -keep-as3-metadata+=Inject,Dispatcher,EventHandler,Event,PostConstruct,PreDestroy,ViewAdded,ViewRemoved,Bindable,Transient,
>>>>
>>>> -keep-code-with-metadata=Inject,
>>>>
>>>> -show-binding-warnings=false,
>>>>
>>>> -export-public-symbols=false,
>>>>
>>>> -prevent-rename-protected-symbols=false,
>>>>
>>>> -prevent-rename-internal-symbols=false,
>>>>
>>>>
>>>> -js-output=D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\javascript,
>>>>
>>>> -compiler.targets=JSRoyale,
>>>>
>>>>
>>>> D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\src\main\royale\App.mxml
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> The release execution does not change, the error is the same as before
>>>> (SDK compilation from the develop branch):
>>>>
>>>>
>>>>
>>>> Se produjo una excepción: ReferenceError: Error #1065: Variable
>>>> com.iest.winplusweb.models.MasterConfigSystemModel is not defined.
>>>>
>>>> at yR (http://localhost:8080/WPWebRelease/App.js:3605:1771)
>>>>
>>>> at Mya (http://localhost:8080/WPWebRelease/App.js:3343:365)
>>>>
>>>> at AR.J.usa (http://localhost:8080/WPWebRelease/App.js:434:441)
>>>>
>>>> at GFa.J.fromTypeDefinition (
>>>> http://localhost:8080/WPWebRelease/App.js:5706:139)
>>>>
>>>> at Function.YT.getTypeDescriptor (
>>>> http://localhost:8080/WPWebRelease/App.js:4570:820)
>>>>
>>>> at Function.fX.constructBean (
>>>> http://localhost:8080/WPWebRelease/App.js:2336:472)
>>>>
>>>> at r$.J.initialize (
>>>> http://localhost:8080/WPWebRelease/App.js:5041:66)
>>>>
>>>> at OW.J.init (http://localhost:8080/WPWebRelease/App.js:950:452)
>>>>
>>>> at OW.J.u (http://localhost:8080/WPWebRelease/App.js:951:454)
>>>>
>>>> at $$.J.addBead (http://localhost:8080/WPWebRelease/App.js:357:549)
>>>>
>>>>
>>>>
>>>> The main difference:
>>>>
>>>> project compiled from "SDK-develop" runs fine in js-debug and gives
>>>> error in js-release and, compiled from "SDK-ROYALE_INTERFACE_INFO" does not
>>>> launch because of conversion error.
>>>>
>>>>
>>>>
>>>> Hiedra
>>>>
>>>>
>>>>
>>>> *De:* Roman Isitua <ro...@gmail.com>
>>>> *Enviado el:* martes, 28 de diciembre de 2021 15:55
>>>> *Para:* users@royale.apache.org
>>>> *Asunto:* Re: Load time is very slow
>>>>
>>>>
>>>>
>>>> @Harb
>>>>
>>>>
>>>>
>>>> I have checked out the feature/ROYALE_INTERFACE_INFO branch and
>>>> compiled asjs and compiler. I have rebuilt my application with modules in
>>>> release mode.
>>>>
>>>>
>>>>
>>>> I get the following error when I attempt to launch a module
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> <image001.png>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> The module loads fine in debug mode
>>>>
>>>>
>>>>
>>>> <image002.png>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> Snippets of the log
>>>>
>>>>
>>>>
>>>> Overview.js:786 Uncaught TypeError: cm.valuesImpl.init is not a function
>>>> at Rr.Mr.yl (Overview.js:786)
>>>> at Function.iq.generateMXMLProperties (Overview.js:736)
>>>> at Rr.hq.generateMXMLAttributes (Overview.js:546)
>>>> at new Rr (Overview.js:804)
>>>> at LN.J.loadHandler (FrontEnd.js:1967)
>>>> Mr.yl @ Overview.js:786
>>>> iq.generateMXMLProperties @ Overview.js:736
>>>> hq.generateMXMLAttributes @ Overview.js:546
>>>> Rr @ Overview.js:804
>>>> J.loadHandler @ FrontEnd.js:1967
>>>> load (async)
>>>> LN.loadModule @ FrontEnd.js:1965
>>>> dN.loadModule @ FrontEnd.js:2406
>>>> LD.Un @ FrontEnd.js:1809
>>>> ny @ FrontEnd.js:123
>>>> ny @ FrontEnd.js:248
>>>> iy @ FrontEnd.js:125
>>>> b @ FrontEnd.js:121
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> I have attached the full log to this email.
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> On Tue, Dec 28, 2021 at 2:51 PM Roman Isitua <ro...@gmail.com>
>>>> wrote:
>>>>
>>>> Hi Maria,
>>>>
>>>>
>>>>
>>>> Prior to starting this mail discussion "Load time is very slow". I can
>>>> confirm I have only been compiling in debug mode. My target\javascript\bin\
>>>> only had js-debug. It was after I upgraded my royale sdk from 0.9.7 to
>>>> 0.9.8 that I compiled in release mode.
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> On Tue, Dec 28, 2021 at 2:24 PM Maria Jose Esteve <mj...@iest.com>
>>>> wrote:
>>>>
>>>> Hi, @Roman, I think you are doing a double compile can it be? My times
>>>> are the same as yours and I always compile in debug and release.
>>>>
>>>>
>>>>
>>>> Look at your target folder " target\javascript\bin\" and if you have
>>>> two folders: js-debug and js-release you are compiling always double.
>>>>
>>>>
>>>>
>>>> In my case, the architecture of my project as well as the Maven
>>>> compilation files (pom.xml) were provided by an external company (we didn't
>>>> know anything about Maven or Royale at that time) and I understand that
>>>> this formula was chosen to show us the options we had.
>>>>
>>>>
>>>>
>>>> A priori and without doing any test as Harb has done, I think that
>>>> modularity gives us the advantage of compiling parts of the code once and
>>>> not compiling them again if they are not modified. So far WITH MY
>>>> COMPILATION TIMES, sometimes more than 1 minute, this is fundamental. But
>>>> of course, now we have the problem of minification of the modules and it is
>>>> really a serious problem because it is impossible for us to deploy in
>>>> production.
>>>>
>>>>
>>>>
>>>> I will try to separate the compiación realese with a profile and if I
>>>> succeed I will pass it to you @Roman.
>>>>
>>>>
>>>>
>>>> @Harb what do you mean by compiling the ROYALE_INTERFACE_INFO branch?
>>>>
>>>>
>>>>
>>>> Hiedra
>>>>
>>>>
>>>>
>>>> *De:* Harbs <ha...@gmail.com>
>>>> *Enviado el:* lunes, 27 de diciembre de 2021 18:32
>>>> *Para:* users@royale.apache.org
>>>> *Asunto:* Re: Load time is very slow
>>>>
>>>>
>>>>
>>>> That doesn’t sound right.
>>>>
>>>>
>>>>
>>>> Are you sure you’re compiling debug and not release? That sounds like
>>>> release build times.
>>>>
>>>>
>>>>
>>>> On Dec 27, 2021, at 3:31 PM, Roman Isitua <ro...@gmail.com>
>>>> wrote:
>>>>
>>>>
>>>>
>>>> Wow ! You are using a workstation with a bleeding edge processor.
>>>>
>>>>
>>>>
>>>> I just compiled my app now. It took 44 seconds. (First compilation
>>>> after ide start up.) Subsequently compilations are usually 19s to 20s.
>>>>
>>>>
>>>>
>>>> My application code base is very very small compared to yours. As we
>>>> continue to add functionality, I expect the compile times to rise.
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>> <MainApp_pom.xml><Overview_pom.xml><fm_client2_pom.xml>
>>
>>
>>
Re: Compiling Modules (was Re: Load time is very slow)
Posted by Roman Isitua <ro...@gmail.com>.
I have applied the js compiler option as follows
<additionalCompilerOptions>-source-map=false;-compiler.show-binding-warnings=false;-js-default-initializers=true;-js-dynamic-access-unknown-members=true;
-js-compiler-option=--variable_map_output_file
gccvars.txt;-js-compiler-option+=--property_map_output_file gccprops.txt
</additionalCompilerOptions>
I get the same error as before when attempting to launch the jewel module.
[image: image.png]
Same error trace.
Uncaught TypeError: cm.valuesImpl.init is not a function
at Rr.Mr.yl (Overview.js:786)
at Function.iq.generateMXMLProperties (Overview.js:736)
at Rr.hq.generateMXMLAttributes (Overview.js:546)
at new Rr (Overview.js:804)
at LN.J.loadHandler (FrontEnd.js:1967)
FrontEnd.js:1640 Uncaught TypeError: M is not a function
at oM.J.handleMouseOut (FrontEnd.js:1640)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:248)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
FrontEnd.js:1640 Uncaught TypeError: M is not a function
at oM.J.handleMouseOver (FrontEnd.js:1640)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:248)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
FrontEnd.js:1640 Uncaught TypeError: M is not a function
at oM.J.handleMouseOut (FrontEnd.js:1640)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:248)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
FrontEnd.js:1640 Uncaught TypeError: M is not a function
at oM.J.handleMouseOver (FrontEnd.js:1640)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:248)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
FrontEnd.js:1640 Uncaught TypeError: M is not a function
at oM.J.handleMouseOut (FrontEnd.js:1640)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:248)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
FrontEnd.js:1640 Uncaught TypeError: M is not a function
at oM.J.handleMouseOver (FrontEnd.js:1640)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:248)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
FrontEnd.js:1640 Uncaught TypeError: M is not a function
at oM.J.handleMouseOut (FrontEnd.js:1640)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:248)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
3Overview.js:56 Uncaught TypeError: Cannot read properties of undefined
(reading 'prototype')
at P (Overview.js:56)
at SG.convert (FrontEnd.js:904)
at ny (FrontEnd.js:248)
at HTMLElement.iy (FrontEnd.js:125)
at HTMLElement.b (FrontEnd.js:121)
On Thu, Dec 30, 2021 at 6:56 PM Harbs <ha...@gmail.com> wrote:
> 1. I’d get rid of the agressive minification options. It will likely cause
> issues. If you get it to work without those options, you can try to add
> them back in and see if it still works.
> 2. You seem to be missing the compiler options explained here:
> https://apache.github.io/royale-docs/features/modules#minification
>
> For a pom, it would look something like this (adjust your paths to match
> your setup):
>
> Main app:
> <additionalCompilerOptions>-source-map=true;-js-compiler-option=--variable_map_output_file
> gccvars.txt;-js-compiler-option+=--property_map_output_file
> gccprops.txt</additionalCompilerOptions>
>
> Module:
> <additionalCompilerOptions>-source-map=true;-js-compiler-option=--variable_map_input_file
> ../../../../../MainApp/bin/js-release/gccvars.txt;-js-compiler-option+=--property_map_input_file
> ../../../../../MainApp/bin/js-release/gccprops.txt</additionalCompilerOptions>
>
> On Dec 30, 2021, at 7:43 PM, Roman Isitua <ro...@gmail.com> wrote:
>
> I think it will be better for me to share my pom's that way you can see
> all the compilation options used. The pom for the parent (FmClient2), the
> MainApp and one module (Overview) have been attached to this email.
>
>
> On Thu, Dec 30, 2021 at 6:22 PM Harbs <ha...@gmail.com> wrote:
>
>> Roman, can you share your full compiler options?
>>
>> I decided to remove the below settings completely
>>> -export-public-symbols=false
>>> -prevent-rename-protected-symbols=false
>>> -prevent-rename-public-symbols=false
>>> -prevent-rename-internal-symbols=false
>>>
>>>
>>> I enabled the below settings
>>>
>>> -js-dynamic-access-unknown-members=true;
>>> -js-default-initializers=true
>>>
>>>
>>> The release version starts up
>>>
>>>
>>>
>> Hiedra, that’s great!
>>
>> On Dec 30, 2021, at 7:15 PM, Roman Isitua <ro...@gmail.com> wrote:
>>
>>
>> Yes. I am testing with the sdk compiled on branch ROYALE_INTERFACE_INFO
>>
>> On Thu, Dec 30, 2021 at 6:10 PM Maria Jose Esteve <mj...@iest.com>
>> wrote:
>>
>>> Roman, are you testing with the SDK compiled from the Harb branches,
>>> ROYALE_INTERFACE_INFO, or from develop?
>>>
>>>
>>>
>>> Hiedra
>>>
>>>
>>>
>>> *De:* Roman Isitua <ro...@gmail.com>
>>> *Enviado el:* jueves, 30 de diciembre de 2021 16:52
>>> *Para:* users@royale.apache.org
>>> *Asunto:* Re: Compiling Modules (was Re: Load time is very slow)
>>>
>>>
>>>
>>> I decided to remove the below settings completely
>>> -export-public-symbols=false
>>> -prevent-rename-protected-symbols=false
>>> -prevent-rename-public-symbols=false
>>> -prevent-rename-internal-symbols=false
>>>
>>>
>>> I enabled the below settings
>>>
>>> -js-dynamic-access-unknown-members=true;
>>> -js-default-initializers=true
>>>
>>>
>>> The release version starts up
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> <image001.png>
>>>
>>>
>>>
>>>
>>>
>>> <image002.png>
>>>
>>>
>>>
>>> However, the moment I launch a module. I get the below error
>>>
>>>
>>>
>>> <image003.png>
>>>
>>>
>>>
>>>
>>>
>>> It appears to be failing when I launch the "*Overview*" module
>>> (by clicking the Overview side menu).
>>>
>>>
>>>
>>> So my current observation is that by retaining only two settings
>>>
>>>
>>>
>>> -js-dynamic-access-unknown-members=true;
>>> -js-default-initializers=true
>>>
>>>
>>>
>>> The release module starts up but the app fails whenever I launch a
>>> module.
>>>
>>>
>>>
>>> The smallest size settings in the documentation do not work. The app
>>> does not start up.
>>>
>>>
>>>
>>> -export-public-symbols=false
>>> -prevent-rename-protected-symbols=false
>>> -prevent-rename-public-symbols=false
>>> -prevent-rename-internal-symbols=false
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> The error trace is below
>>>
>>>
>>>
>>>
>>>
>>> Uncaught TypeError: cm.valuesImpl.init is not a function
>>> at Wr.Rr.pl <http://wr.rr.pl/> (Overview.js:792)
>>> at Function.mq.generateMXMLProperties (Overview.js:743)
>>> at Wr.lq.generateMXMLAttributes (Overview.js:551)
>>> at new Wr (Overview.js:810)
>>> at QN.J.loadHandler (FrontEnd.js:1978)
>>> 3Overview.js:56 Uncaught TypeError: Cannot read properties of undefined
>>> (reading 'prototype')
>>> at P (Overview.js:56)
>>> at VG.convert (FrontEnd.js:910)
>>> at ny (FrontEnd.js:250)
>>> at HTMLElement.iy (FrontEnd.js:125)
>>> at HTMLElement.b (FrontEnd.js:121)
>>> FrontEnd.js:1649 Uncaught TypeError: M is not a function
>>> at sM.J.handleMouseOut (FrontEnd.js:1649)
>>> at Function.ny [as googFireListener] (FrontEnd.js:123)
>>> at ny (FrontEnd.js:250)
>>> at HTMLAnchorElement.iy (FrontEnd.js:125)
>>> at HTMLAnchorElement.b (FrontEnd.js:121)
>>> FrontEnd.js:1649 Uncaught TypeError: M is not a function
>>> at sM.J.handleMouseOver (FrontEnd.js:1649)
>>> at Function.ny [as googFireListener] (FrontEnd.js:123)
>>> at ny (FrontEnd.js:250)
>>> at HTMLAnchorElement.iy (FrontEnd.js:125)
>>> at HTMLAnchorElement.b (FrontEnd.js:121)
>>> J.handleMouseOver @ FrontEnd.js:1649
>>> ny @ FrontEnd.js:123
>>> ny @ FrontEnd.js:250
>>> iy @ FrontEnd.js:125
>>> b @ FrontEnd.js:121
>>> FrontEnd.js:1649 Uncaught TypeError: M is not a function
>>> at sM.J.handleMouseOut (FrontEnd.js:1649)
>>> at Function.ny [as googFireListener] (FrontEnd.js:123)
>>> at ny (FrontEnd.js:250)
>>> at HTMLAnchorElement.iy (FrontEnd.js:125)
>>> at HTMLAnchorElement.b (FrontEnd.js:121)
>>> J.handleMouseOut @ FrontEnd.js:1649
>>> ny @ FrontEnd.js:123
>>> ny @ FrontEnd.js:250
>>> iy @ FrontEnd.js:125
>>> b @ FrontEnd.js:121
>>> FrontEnd.js:1649 Uncaught TypeError: M is not a function
>>> at sM.J.handleMouseOver (FrontEnd.js:1649)
>>> at Function.ny [as googFireListener] (FrontEnd.js:123)
>>> at ny (FrontEnd.js:250)
>>> at HTMLAnchorElement.iy (FrontEnd.js:125)
>>> at HTMLAnchorElement.b (FrontEnd.js:121)
>>> J.handleMouseOver @ FrontEnd.js:1649
>>> ny @ FrontEnd.js:123
>>> ny @ FrontEnd.js:250
>>> iy @ FrontEnd.js:125
>>> b @ FrontEnd.js:121
>>> FrontEnd.js:1649 Uncaught TypeError: M is not a function
>>> at sM.J.handleMouseOut (FrontEnd.js:1649)
>>> at Function.ny [as googFireListener] (FrontEnd.js:123)
>>> at ny (FrontEnd.js:250)
>>> at HTMLAnchorElement.iy (FrontEnd.js:125)
>>> at HTMLAnchorElement.b (FrontEnd.js:121)
>>> J.handleMouseOut @ FrontEnd.js:1649
>>> ny @ FrontEnd.js:123
>>> ny @ FrontEnd.js:250
>>> iy @ FrontEnd.js:125
>>> b @ FrontEnd.js:121
>>> FrontEnd.js:1649 Uncaught TypeError: M is not a function
>>> at sM.J.handleMouseOver (FrontEnd.js:1649)
>>> at Function.ny [as googFireListener] (FrontEnd.js:123)
>>> at ny (FrontEnd.js:250)
>>> at HTMLAnchorElement.iy (FrontEnd.js:125)
>>> at HTMLAnchorElement.b (FrontEnd.js:121)
>>> J.handleMouseOver @ FrontEnd.js:1649
>>> ny @ FrontEnd.js:123
>>> ny @ FrontEnd.js:250
>>> iy @ FrontEnd.js:125
>>> b @ FrontEnd.js:121
>>> FrontEnd.js:1649 Uncaught TypeError: M is not a function
>>> at sM.J.handleMouseOut (FrontEnd.js:1649)
>>> at Function.ny [as googFireListener] (FrontEnd.js:123)
>>> at ny (FrontEnd.js:250)
>>> at HTMLAnchorElement.iy (FrontEnd.js:125)
>>> at HTMLAnchorElement.b (FrontEnd.js:121)
>>> J.handleMouseOut @ FrontEnd.js:1649
>>> ny @ FrontEnd.js:123
>>> ny @ FrontEnd.js:250
>>> iy @ FrontEnd.js:125
>>> b @ FrontEnd.js:121
>>> FrontEnd.js:1649 Uncaught TypeError: M is not a function
>>> at sM.J.handleMouseOver (FrontEnd.js:1649)
>>> at Function.ny [as googFireListener] (FrontEnd.js:123)
>>> at ny (FrontEnd.js:250)
>>> at HTMLAnchorElement.iy (FrontEnd.js:125)
>>> at HTMLAnchorElement.b (FrontEnd.js:121)
>>> J.handleMouseOver @ FrontEnd.js:1649
>>> ny @ FrontEnd.js:123
>>> ny @ FrontEnd.js:250
>>> iy @ FrontEnd.js:125
>>> b @ FrontEnd.js:121
>>> FrontEnd.js:1649 Uncaught TypeError: M is not a function
>>> at sM.J.handleMouseOut (FrontEnd.js:1649)
>>> at Function.ny [as googFireListener] (FrontEnd.js:123)
>>> at ny (FrontEnd.js:250)
>>> at HTMLAnchorElement.iy (FrontEnd.js:125)
>>> at HTMLAnchorElement.b (FrontEnd.js:121)
>>> J.handleMouseOut @ FrontEnd.js:1649
>>> ny @ FrontEnd.js:123
>>> ny @ FrontEnd.js:250
>>> iy @ FrontEnd.js:125
>>> b @ FrontEnd.js:121
>>>
>>>
>>>
>>> On Thu, Dec 30, 2021 at 4:32 PM Roman Isitua <ro...@gmail.com>
>>> wrote:
>>>
>>> I get the same error even when I set
>>> the -js-dynamic-access-unknown-members=true;
>>>
>>>
>>>
>>> On Thu, Dec 30, 2021 at 4:24 PM Roman Isitua <ro...@gmail.com>
>>> wrote:
>>>
>>>
>>>
>>> Using the below settings,
>>>
>>> -export-public-symbols=false
>>> -prevent-rename-protected-symbols=false
>>> -prevent-rename-public-symbols=false
>>> -prevent-rename-internal-symbols=false
>>> -js-dynamic-access-unknown-members=false;
>>>
>>> -js-default-initializers=true
>>>
>>>
>>> Debug version runs fine. The release version does not start up
>>>
>>> <image004.png>
>>>
>>>
>>> I get the below errors
>>>
>>> Uncaught TypeError: Cannot read properties of undefined (reading 'apply')
>>> at KE.hm (FrontEnd.js:1600)
>>> at XE.M.Fb (FrontEnd.js:943)
>>> at XE.M.uh (FrontEnd.js:937)
>>> at FE.M.na <http://fe.m.na/> (FrontEnd.js:497)
>>> at FE.M.v (FrontEnd.js:497)
>>> at dR.M.S (FrontEnd.js:213)
>>> at dR.Nz.S (FrontEnd.js:217)
>>> at dR.M.start (FrontEnd.js:1396)
>>> at index.html:45
>>> :8080/favicon.ico:1 Failed to load resource: the server responded with a
>>> status of 404 (Not Found)
>>>
>>>
>>>
>>>
>>>
>>> FrontEnd.js is the start up class for the application. i.e. It
>>> implements the Jewel application class.
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> On Thu, Dec 30, 2021 at 3:19 PM Roman Isitua <ro...@gmail.com>
>>> wrote:
>>>
>>> Hi Harb,
>>>
>>>
>>>
>>> Thanks for your response. I have gone through the documentation. I will
>>> do my test again starting with the smallest size option and share my
>>> findings.
>>>
>>>
>>>
>>> Regards,
>>>
>>>
>>>
>>> On Thu, Dec 30, 2021 at 10:59 AM Harbs <ha...@gmail.com> wrote:
>>>
>>> Sorry for my deal in responding.
>>>
>>>
>>>
>>> Let’s take a step back.
>>>
>>>
>>>
>>> I’m not sure how you are compiling your modules. I just added some
>>> content to the module documentation page which explains what compiler
>>> options you need while compiling modules. (It still needs some editing.)
>>> https://apache.github.io/royale-docs/features/modules#minification
>>>
>>>
>>>
>>> Are you using those options?
>>>
>>>
>>>
>>> On Dec 29, 2021, at 2:19 AM, Maria Jose Esteve <mj...@iest.com>
>>> wrote:
>>>
>>>
>>>
>>> Hi, Let me join you with these tests....
>>>
>>>
>>>
>>> @Harb, I have compiled the SDK from this branch, feature/ROYALE_INTERFACE_INFO,
>>> and when running in debug I get this error:
>>>
>>>
>>>
>>> Message on the PURGE CONSOLE is displayed:
>>>
>>>
>>>
>>> Cannot convert org.apache.royale.reflection.beads.ClassAliasBead to
>>> IBead
>>>
>>>
>>>
>>> Message in the IDE Window:
>>>
>>>
>>>
>>> Se produjo una excepción: TypeError: Cannot convert [object Object] to
>>> IBead
>>>
>>> at App.org.apache.royale.core.ElementWrapper.addBead (
>>> http://localhost:8080/WNetSuitePlus/org/apache/royale/core/ElementWrapper.js:114:11
>>> )
>>>
>>> at App.org.apache.royale.core.HTMLElementWrapper.addBead (
>>> http://localhost:8080/WNetSuitePlus/org/apache/royale/core/HTMLElementWrapper.js:43:65
>>> )
>>>
>>> at App.org.apache.royale.jewel.Application.start (
>>> http://localhost:8080/WNetSuitePlus/org/apache/royale/jewel/Application.js:246:10
>>> )
>>>
>>> at App.App_loadXML (
>>> http://localhost:8080/WNetSuitePlus/App.js:1681:25)
>>>
>>> at
>>> org.apache.royale.net.URLLoader.org.apache.royale.events.EventDispatcher.fireListeners
>>> (
>>> http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:97:23
>>> )
>>>
>>> at Function.goog.events.EventTarget.dispatchEventInternal_ (
>>> http://localhost:8080/WNetSuitePlus/library/closure/goog/events/eventtarget.js:381:26
>>> )
>>>
>>> at
>>> org.apache.royale.net.URLLoader.org.apache.royale.events.EventDispatcher.dispatchEvent
>>> (
>>> http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:72:37
>>> )
>>>
>>> at org.apache.royale.net.URLLoader.jsEventHandler (
>>> http://localhost:8080/WNetSuitePlus/org/apache/royale/net/URLLoader.js:169:12
>>> )
>>>
>>>
>>>
>>> Call stack:
>>>
>>>
>>>
>>> <image003.png>
>>>
>>>
>>>
>>> [INFO] Executing MXMLC in tool group Royale with args: [
>>>
>>>
>>> -load-config=D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\compile-app-config.xml,
>>>
>>> -js-default-initializers=true,
>>>
>>> -source-map=true,
>>>
>>> -js-dynamic-access-unknown-members=true,
>>>
>>>
>>> -keep-as3-metadata+=Inject,Dispatcher,EventHandler,Event,PostConstruct,PreDestroy,ViewAdded,ViewRemoved,Bindable,Transient,
>>>
>>> -keep-code-with-metadata=Inject,
>>>
>>> -show-binding-warnings=false,
>>>
>>> -export-public-symbols=false,
>>>
>>> -prevent-rename-protected-symbols=false,
>>>
>>> -prevent-rename-internal-symbols=false,
>>>
>>>
>>> -js-output=D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\javascript,
>>>
>>> -compiler.targets=JSRoyale,
>>>
>>>
>>> D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\src\main\royale\App.mxml
>>>
>>>
>>>
>>>
>>>
>>> The release execution does not change, the error is the same as before
>>> (SDK compilation from the develop branch):
>>>
>>>
>>>
>>> Se produjo una excepción: ReferenceError: Error #1065: Variable
>>> com.iest.winplusweb.models.MasterConfigSystemModel is not defined.
>>>
>>> at yR (http://localhost:8080/WPWebRelease/App.js:3605:1771)
>>>
>>> at Mya (http://localhost:8080/WPWebRelease/App.js:3343:365)
>>>
>>> at AR.J.usa (http://localhost:8080/WPWebRelease/App.js:434:441)
>>>
>>> at GFa.J.fromTypeDefinition (
>>> http://localhost:8080/WPWebRelease/App.js:5706:139)
>>>
>>> at Function.YT.getTypeDescriptor (
>>> http://localhost:8080/WPWebRelease/App.js:4570:820)
>>>
>>> at Function.fX.constructBean (
>>> http://localhost:8080/WPWebRelease/App.js:2336:472)
>>>
>>> at r$.J.initialize (
>>> http://localhost:8080/WPWebRelease/App.js:5041:66)
>>>
>>> at OW.J.init (http://localhost:8080/WPWebRelease/App.js:950:452)
>>>
>>> at OW.J.u (http://localhost:8080/WPWebRelease/App.js:951:454)
>>>
>>> at $$.J.addBead (http://localhost:8080/WPWebRelease/App.js:357:549)
>>>
>>>
>>>
>>> The main difference:
>>>
>>> project compiled from "SDK-develop" runs fine in js-debug and gives
>>> error in js-release and, compiled from "SDK-ROYALE_INTERFACE_INFO" does not
>>> launch because of conversion error.
>>>
>>>
>>>
>>> Hiedra
>>>
>>>
>>>
>>> *De:* Roman Isitua <ro...@gmail.com>
>>> *Enviado el:* martes, 28 de diciembre de 2021 15:55
>>> *Para:* users@royale.apache.org
>>> *Asunto:* Re: Load time is very slow
>>>
>>>
>>>
>>> @Harb
>>>
>>>
>>>
>>> I have checked out the feature/ROYALE_INTERFACE_INFO branch and
>>> compiled asjs and compiler. I have rebuilt my application with modules in
>>> release mode.
>>>
>>>
>>>
>>> I get the following error when I attempt to launch a module
>>>
>>>
>>>
>>>
>>>
>>> <image001.png>
>>>
>>>
>>>
>>>
>>>
>>> The module loads fine in debug mode
>>>
>>>
>>>
>>> <image002.png>
>>>
>>>
>>>
>>>
>>>
>>> Snippets of the log
>>>
>>>
>>>
>>> Overview.js:786 Uncaught TypeError: cm.valuesImpl.init is not a function
>>> at Rr.Mr.yl (Overview.js:786)
>>> at Function.iq.generateMXMLProperties (Overview.js:736)
>>> at Rr.hq.generateMXMLAttributes (Overview.js:546)
>>> at new Rr (Overview.js:804)
>>> at LN.J.loadHandler (FrontEnd.js:1967)
>>> Mr.yl @ Overview.js:786
>>> iq.generateMXMLProperties @ Overview.js:736
>>> hq.generateMXMLAttributes @ Overview.js:546
>>> Rr @ Overview.js:804
>>> J.loadHandler @ FrontEnd.js:1967
>>> load (async)
>>> LN.loadModule @ FrontEnd.js:1965
>>> dN.loadModule @ FrontEnd.js:2406
>>> LD.Un @ FrontEnd.js:1809
>>> ny @ FrontEnd.js:123
>>> ny @ FrontEnd.js:248
>>> iy @ FrontEnd.js:125
>>> b @ FrontEnd.js:121
>>>
>>>
>>>
>>>
>>>
>>> I have attached the full log to this email.
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> On Tue, Dec 28, 2021 at 2:51 PM Roman Isitua <ro...@gmail.com>
>>> wrote:
>>>
>>> Hi Maria,
>>>
>>>
>>>
>>> Prior to starting this mail discussion "Load time is very slow". I can
>>> confirm I have only been compiling in debug mode. My target\javascript\bin\
>>> only had js-debug. It was after I upgraded my royale sdk from 0.9.7 to
>>> 0.9.8 that I compiled in release mode.
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> On Tue, Dec 28, 2021 at 2:24 PM Maria Jose Esteve <mj...@iest.com>
>>> wrote:
>>>
>>> Hi, @Roman, I think you are doing a double compile can it be? My times
>>> are the same as yours and I always compile in debug and release.
>>>
>>>
>>>
>>> Look at your target folder " target\javascript\bin\" and if you have
>>> two folders: js-debug and js-release you are compiling always double.
>>>
>>>
>>>
>>> In my case, the architecture of my project as well as the Maven
>>> compilation files (pom.xml) were provided by an external company (we didn't
>>> know anything about Maven or Royale at that time) and I understand that
>>> this formula was chosen to show us the options we had.
>>>
>>>
>>>
>>> A priori and without doing any test as Harb has done, I think that
>>> modularity gives us the advantage of compiling parts of the code once and
>>> not compiling them again if they are not modified. So far WITH MY
>>> COMPILATION TIMES, sometimes more than 1 minute, this is fundamental. But
>>> of course, now we have the problem of minification of the modules and it is
>>> really a serious problem because it is impossible for us to deploy in
>>> production.
>>>
>>>
>>>
>>> I will try to separate the compiación realese with a profile and if I
>>> succeed I will pass it to you @Roman.
>>>
>>>
>>>
>>> @Harb what do you mean by compiling the ROYALE_INTERFACE_INFO branch?
>>>
>>>
>>>
>>> Hiedra
>>>
>>>
>>>
>>> *De:* Harbs <ha...@gmail.com>
>>> *Enviado el:* lunes, 27 de diciembre de 2021 18:32
>>> *Para:* users@royale.apache.org
>>> *Asunto:* Re: Load time is very slow
>>>
>>>
>>>
>>> That doesn’t sound right.
>>>
>>>
>>>
>>> Are you sure you’re compiling debug and not release? That sounds like
>>> release build times.
>>>
>>>
>>>
>>> On Dec 27, 2021, at 3:31 PM, Roman Isitua <ro...@gmail.com> wrote:
>>>
>>>
>>>
>>> Wow ! You are using a workstation with a bleeding edge processor.
>>>
>>>
>>>
>>> I just compiled my app now. It took 44 seconds. (First compilation
>>> after ide start up.) Subsequently compilations are usually 19s to 20s.
>>>
>>>
>>>
>>> My application code base is very very small compared to yours. As we
>>> continue to add functionality, I expect the compile times to rise.
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>> <MainApp_pom.xml><Overview_pom.xml><fm_client2_pom.xml>
>
>
>
Re: Compiling Modules (was Re: Load time is very slow)
Posted by Harbs <ha...@gmail.com>.
I’d try removing these:
-export-public-symbols=false;-prevent-rename-protected-symbols=false;-prevent-rename-public-symbols=false;-prevent-rename-internal-symbols=false;
https://apache.github.io/royale-docs/create-an-application/optimizations/minification#smallest-size
> On Dec 30, 2021, at 8:04 PM, Roman Isitua <ro...@gmail.com> wrote:
>
> Kindly clarify what you mean by "no 1. Get rid of aggressive mimification options " ? Which of the options are aggressive ?
>
>
> I will apply no 2 and revert with my findings.
>
> On Thu, 30 Dec 2021, 18:56 Harbs, <harbs.lists@gmail.com <ma...@gmail.com>> wrote:
> 1. I’d get rid of the agressive minification options. It will likely cause issues. If you get it to work without those options, you can try to add them back in and see if it still works.
> 2. You seem to be missing the compiler options explained here: https://apache.github.io/royale-docs/features/modules#minification <https://apache.github.io/royale-docs/features/modules#minification>
>
> For a pom, it would look something like this (adjust your paths to match your setup):
>
> Main app:
> <additionalCompilerOptions>-source-map=true;-js-compiler-option=--variable_map_output_file gccvars.txt;-js-compiler-option+=--property_map_output_file gccprops.txt</additionalCompilerOptions>
>
> Module:
> <additionalCompilerOptions>-source-map=true;-js-compiler-option=--variable_map_input_file ../../../../../MainApp/bin/js-release/gccvars.txt;-js-compiler-option+=--property_map_input_file ../../../../../MainApp/bin/js-release/gccprops.txt</additionalCompilerOptions>
>
>> On Dec 30, 2021, at 7:43 PM, Roman Isitua <romanisitua@gmail.com <ma...@gmail.com>> wrote:
>>
>> I think it will be better for me to share my pom's that way you can see all the compilation options used. The pom for the parent (FmClient2), the MainApp and one module (Overview) have been attached to this email.
>>
>>
>> On Thu, Dec 30, 2021 at 6:22 PM Harbs <harbs.lists@gmail.com <ma...@gmail.com>> wrote:
>> Roman, can you share your full compiler options?
>>
>>> I decided to remove the below settings completely
>>> -export-public-symbols=false
>>> -prevent-rename-protected-symbols=false
>>> -prevent-rename-public-symbols=false
>>> -prevent-rename-internal-symbols=false
>>>
>>>
>>> I enabled the below settings
>>>
>>> -js-dynamic-access-unknown-members=true;
>>> -js-default-initializers=true
>>>
>>>
>>> The release version starts up
>>>
>>>
>>>
>>
>> Hiedra, that’s great!
>>
>>> On Dec 30, 2021, at 7:15 PM, Roman Isitua <romanisitua@gmail.com <ma...@gmail.com>> wrote:
>>>
>>>
>>> Yes. I am testing with the sdk compiled on branch ROYALE_INTERFACE_INFO
>>>
>>> On Thu, Dec 30, 2021 at 6:10 PM Maria Jose Esteve <mjesteve@iest.com <ma...@iest.com>> wrote:
>>> Roman, are you testing with the SDK compiled from the Harb branches, ROYALE_INTERFACE_INFO, or from develop?
>>>
>>>
>>>
>>> Hiedra
>>>
>>>
>>>
>>> De: Roman Isitua <romanisitua@gmail.com <ma...@gmail.com>>
>>> Enviado el: jueves, 30 de diciembre de 2021 16:52
>>> Para: users@royale.apache.org <ma...@royale.apache.org>
>>> Asunto: Re: Compiling Modules (was Re: Load time is very slow)
>>>
>>>
>>>
>>> I decided to remove the below settings completely
>>> -export-public-symbols=false
>>> -prevent-rename-protected-symbols=false
>>> -prevent-rename-public-symbols=false
>>> -prevent-rename-internal-symbols=false
>>>
>>>
>>> I enabled the below settings
>>>
>>> -js-dynamic-access-unknown-members=true;
>>> -js-default-initializers=true
>>>
>>>
>>> The release version starts up
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> <image001.png>
>>>
>>>
>>>
>>>
>>>
>>> <image002.png>
>>>
>>>
>>>
>>> However, the moment I launch a module. I get the below error
>>>
>>>
>>>
>>> <image003.png>
>>>
>>>
>>>
>>>
>>>
>>> It appears to be failing when I launch the "Overview" module (by clicking the Overview side menu).
>>>
>>>
>>>
>>> So my current observation is that by retaining only two settings
>>>
>>>
>>>
>>> -js-dynamic-access-unknown-members=true;
>>> -js-default-initializers=true
>>>
>>>
>>>
>>> The release module starts up but the app fails whenever I launch a module.
>>>
>>>
>>>
>>> The smallest size settings in the documentation do not work. The app does not start up.
>>>
>>>
>>>
>>> -export-public-symbols=false
>>> -prevent-rename-protected-symbols=false
>>> -prevent-rename-public-symbols=false
>>> -prevent-rename-internal-symbols=false
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> The error trace is below
>>>
>>>
>>>
>>>
>>>
>>> Uncaught TypeError: cm.valuesImpl.init is not a function
>>> at Wr.Rr.pl <http://wr.rr.pl/> (Overview.js:792)
>>> at Function.mq.generateMXMLProperties (Overview.js:743)
>>> at Wr.lq.generateMXMLAttributes (Overview.js:551)
>>> at new Wr (Overview.js:810)
>>> at QN.J.loadHandler (FrontEnd.js:1978)
>>> 3Overview.js:56 Uncaught TypeError: Cannot read properties of undefined (reading 'prototype')
>>> at P (Overview.js:56)
>>> at VG.convert (FrontEnd.js:910)
>>> at ny (FrontEnd.js:250)
>>> at HTMLElement.iy (FrontEnd.js:125)
>>> at HTMLElement.b (FrontEnd.js:121)
>>> FrontEnd.js:1649 Uncaught TypeError: M is not a function
>>> at sM.J.handleMouseOut (FrontEnd.js:1649)
>>> at Function.ny [as googFireListener] (FrontEnd.js:123)
>>> at ny (FrontEnd.js:250)
>>> at HTMLAnchorElement.iy (FrontEnd.js:125)
>>> at HTMLAnchorElement.b (FrontEnd.js:121)
>>> FrontEnd.js:1649 Uncaught TypeError: M is not a function
>>> at sM.J.handleMouseOver (FrontEnd.js:1649)
>>> at Function.ny [as googFireListener] (FrontEnd.js:123)
>>> at ny (FrontEnd.js:250)
>>> at HTMLAnchorElement.iy (FrontEnd.js:125)
>>> at HTMLAnchorElement.b (FrontEnd.js:121)
>>> J.handleMouseOver @ FrontEnd.js:1649
>>> ny @ FrontEnd.js:123
>>> ny @ FrontEnd.js:250
>>> iy @ FrontEnd.js:125
>>> b @ FrontEnd.js:121
>>> FrontEnd.js:1649 Uncaught TypeError: M is not a function
>>> at sM.J.handleMouseOut (FrontEnd.js:1649)
>>> at Function.ny [as googFireListener] (FrontEnd.js:123)
>>> at ny (FrontEnd.js:250)
>>> at HTMLAnchorElement.iy (FrontEnd.js:125)
>>> at HTMLAnchorElement.b (FrontEnd.js:121)
>>> J.handleMouseOut @ FrontEnd.js:1649
>>> ny @ FrontEnd.js:123
>>> ny @ FrontEnd.js:250
>>> iy @ FrontEnd.js:125
>>> b @ FrontEnd.js:121
>>> FrontEnd.js:1649 Uncaught TypeError: M is not a function
>>> at sM.J.handleMouseOver (FrontEnd.js:1649)
>>> at Function.ny [as googFireListener] (FrontEnd.js:123)
>>> at ny (FrontEnd.js:250)
>>> at HTMLAnchorElement.iy (FrontEnd.js:125)
>>> at HTMLAnchorElement.b (FrontEnd.js:121)
>>> J.handleMouseOver @ FrontEnd.js:1649
>>> ny @ FrontEnd.js:123
>>> ny @ FrontEnd.js:250
>>> iy @ FrontEnd.js:125
>>> b @ FrontEnd.js:121
>>> FrontEnd.js:1649 Uncaught TypeError: M is not a function
>>> at sM.J.handleMouseOut (FrontEnd.js:1649)
>>> at Function.ny [as googFireListener] (FrontEnd.js:123)
>>> at ny (FrontEnd.js:250)
>>> at HTMLAnchorElement.iy (FrontEnd.js:125)
>>> at HTMLAnchorElement.b (FrontEnd.js:121)
>>> J.handleMouseOut @ FrontEnd.js:1649
>>> ny @ FrontEnd.js:123
>>> ny @ FrontEnd.js:250
>>> iy @ FrontEnd.js:125
>>> b @ FrontEnd.js:121
>>> FrontEnd.js:1649 Uncaught TypeError: M is not a function
>>> at sM.J.handleMouseOver (FrontEnd.js:1649)
>>> at Function.ny [as googFireListener] (FrontEnd.js:123)
>>> at ny (FrontEnd.js:250)
>>> at HTMLAnchorElement.iy (FrontEnd.js:125)
>>> at HTMLAnchorElement.b (FrontEnd.js:121)
>>> J.handleMouseOver @ FrontEnd.js:1649
>>> ny @ FrontEnd.js:123
>>> ny @ FrontEnd.js:250
>>> iy @ FrontEnd.js:125
>>> b @ FrontEnd.js:121
>>> FrontEnd.js:1649 Uncaught TypeError: M is not a function
>>> at sM.J.handleMouseOut (FrontEnd.js:1649)
>>> at Function.ny [as googFireListener] (FrontEnd.js:123)
>>> at ny (FrontEnd.js:250)
>>> at HTMLAnchorElement.iy (FrontEnd.js:125)
>>> at HTMLAnchorElement.b (FrontEnd.js:121)
>>> J.handleMouseOut @ FrontEnd.js:1649
>>> ny @ FrontEnd.js:123
>>> ny @ FrontEnd.js:250
>>> iy @ FrontEnd.js:125
>>> b @ FrontEnd.js:121
>>> FrontEnd.js:1649 Uncaught TypeError: M is not a function
>>> at sM.J.handleMouseOver (FrontEnd.js:1649)
>>> at Function.ny [as googFireListener] (FrontEnd.js:123)
>>> at ny (FrontEnd.js:250)
>>> at HTMLAnchorElement.iy (FrontEnd.js:125)
>>> at HTMLAnchorElement.b (FrontEnd.js:121)
>>> J.handleMouseOver @ FrontEnd.js:1649
>>> ny @ FrontEnd.js:123
>>> ny @ FrontEnd.js:250
>>> iy @ FrontEnd.js:125
>>> b @ FrontEnd.js:121
>>> FrontEnd.js:1649 Uncaught TypeError: M is not a function
>>> at sM.J.handleMouseOut (FrontEnd.js:1649)
>>> at Function.ny [as googFireListener] (FrontEnd.js:123)
>>> at ny (FrontEnd.js:250)
>>> at HTMLAnchorElement.iy (FrontEnd.js:125)
>>> at HTMLAnchorElement.b (FrontEnd.js:121)
>>> J.handleMouseOut @ FrontEnd.js:1649
>>> ny @ FrontEnd.js:123
>>> ny @ FrontEnd.js:250
>>> iy @ FrontEnd.js:125
>>> b @ FrontEnd.js:121
>>>
>>>
>>>
>>> On Thu, Dec 30, 2021 at 4:32 PM Roman Isitua <romanisitua@gmail.com <ma...@gmail.com>> wrote:
>>>
>>> I get the same error even when I set the -js-dynamic-access-unknown-members=true;
>>>
>>>
>>>
>>> On Thu, Dec 30, 2021 at 4:24 PM Roman Isitua <romanisitua@gmail.com <ma...@gmail.com>> wrote:
>>>
>>>
>>>
>>> Using the below settings,
>>>
>>> -export-public-symbols=false
>>> -prevent-rename-protected-symbols=false
>>> -prevent-rename-public-symbols=false
>>> -prevent-rename-internal-symbols=false
>>> -js-dynamic-access-unknown-members=false;
>>>
>>> -js-default-initializers=true
>>>
>>>
>>> Debug version runs fine. The release version does not start up
>>>
>>> <image004.png>
>>>
>>>
>>> I get the below errors
>>>
>>> Uncaught TypeError: Cannot read properties of undefined (reading 'apply')
>>> at KE.hm (FrontEnd.js:1600)
>>> at XE.M.Fb (FrontEnd.js:943)
>>> at XE.M.uh (FrontEnd.js:937)
>>> at FE.M.na <http://fe.m.na/> (FrontEnd.js:497)
>>> at FE.M.v (FrontEnd.js:497)
>>> at dR.M.S (FrontEnd.js:213)
>>> at dR.Nz.S (FrontEnd.js:217)
>>> at dR.M.start (FrontEnd.js:1396)
>>> at index.html:45
>>> :8080/favicon.ico:1 Failed to load resource: the server responded with a status of 404 (Not Found)
>>>
>>>
>>>
>>>
>>>
>>> FrontEnd.js is the start up class for the application. i.e. It implements the Jewel application class.
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> On Thu, Dec 30, 2021 at 3:19 PM Roman Isitua <romanisitua@gmail.com <ma...@gmail.com>> wrote:
>>>
>>> Hi Harb,
>>>
>>>
>>>
>>> Thanks for your response. I have gone through the documentation. I will do my test again starting with the smallest size option and share my findings.
>>>
>>>
>>>
>>> Regards,
>>>
>>>
>>>
>>> On Thu, Dec 30, 2021 at 10:59 AM Harbs <harbs.lists@gmail.com <ma...@gmail.com>> wrote:
>>>
>>> Sorry for my deal in responding.
>>>
>>>
>>>
>>> Let’s take a step back.
>>>
>>>
>>>
>>> I’m not sure how you are compiling your modules. I just added some content to the module documentation page which explains what compiler options you need while compiling modules. (It still needs some editing.) https://apache.github.io/royale-docs/features/modules#minification <https://apache.github.io/royale-docs/features/modules#minification>
>>>
>>>
>>> Are you using those options?
>>>
>>>
>>>
>>>
>>> On Dec 29, 2021, at 2:19 AM, Maria Jose Esteve <mjesteve@iest.com <ma...@iest.com>> wrote:
>>>
>>>
>>>
>>> Hi, Let me join you with these tests....
>>>
>>>
>>>
>>> @Harb, I have compiled the SDK from this branch, feature/ROYALE_INTERFACE_INFO, and when running in debug I get this error:
>>>
>>>
>>>
>>> Message on the PURGE CONSOLE is displayed:
>>>
>>>
>>>
>>> Cannot convert org.apache.royale.reflection.beads.ClassAliasBead to IBead
>>>
>>>
>>>
>>> Message in the IDE Window:
>>>
>>>
>>>
>>> Se produjo una excepción: TypeError: Cannot convert [object Object] to IBead
>>>
>>> at App.org.apache.royale.core.ElementWrapper.addBead (http://localhost:8080/WNetSuitePlus/org/apache/royale/core/ElementWrapper.js:114:11 <http://localhost:8080/WNetSuitePlus/org/apache/royale/core/ElementWrapper.js:114:11>)
>>>
>>> at App.org.apache.royale.core.HTMLElementWrapper.addBead (http://localhost:8080/WNetSuitePlus/org/apache/royale/core/HTMLElementWrapper.js:43:65 <http://localhost:8080/WNetSuitePlus/org/apache/royale/core/HTMLElementWrapper.js:43:65>)
>>>
>>> at App.org.apache.royale.jewel.Application.start (http://localhost:8080/WNetSuitePlus/org/apache/royale/jewel/Application.js:246:10 <http://localhost:8080/WNetSuitePlus/org/apache/royale/jewel/Application.js:246:10>)
>>>
>>> at App.App_loadXML (http://localhost:8080/WNetSuitePlus/App.js:1681:25 <http://localhost:8080/WNetSuitePlus/App.js:1681:25>)
>>>
>>> at org.apache.royale.net.URLLoader.org.apache.royale.events.EventDispatcher.fireListeners (http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:97:23 <http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:97:23>)
>>>
>>> at Function.goog.events.EventTarget.dispatchEventInternal_ (http://localhost:8080/WNetSuitePlus/library/closure/goog/events/eventtarget.js:381:26 <http://localhost:8080/WNetSuitePlus/library/closure/goog/events/eventtarget.js:381:26>)
>>>
>>> at org.apache.royale.net.URLLoader.org.apache.royale.events.EventDispatcher.dispatchEvent (http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:72:37 <http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:72:37>)
>>>
>>> at org.apache.royale.net.URLLoader.jsEventHandler (http://localhost:8080/WNetSuitePlus/org/apache/royale/net/URLLoader.js:169:12 <http://localhost:8080/WNetSuitePlus/org/apache/royale/net/URLLoader.js:169:12>)
>>>
>>>
>>>
>>> Call stack:
>>>
>>>
>>>
>>> <image003.png>
>>>
>>>
>>>
>>> [INFO] Executing MXMLC in tool group Royale with args: [
>>>
>>> -load-config=D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\compile-app-config.xml,
>>>
>>> -js-default-initializers=true,
>>>
>>> -source-map=true,
>>>
>>> -js-dynamic-access-unknown-members=true,
>>>
>>> -keep-as3-metadata+=Inject,Dispatcher,EventHandler,Event,PostConstruct,PreDestroy,ViewAdded,ViewRemoved,Bindable,Transient,
>>>
>>> -keep-code-with-metadata=Inject,
>>>
>>> -show-binding-warnings=false,
>>>
>>> -export-public-symbols=false,
>>>
>>> -prevent-rename-protected-symbols=false,
>>>
>>> -prevent-rename-internal-symbols=false,
>>>
>>> -js-output=D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\javascript,
>>>
>>> -compiler.targets=JSRoyale,
>>>
>>> D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\src\main\royale\App.mxml
>>>
>>>
>>>
>>>
>>>
>>> The release execution does not change, the error is the same as before (SDK compilation from the develop branch):
>>>
>>>
>>>
>>> Se produjo una excepción: ReferenceError: Error #1065: Variable com.iest.winplusweb.models.MasterConfigSystemModel is not defined.
>>>
>>> at yR (http://localhost:8080/WPWebRelease/App.js:3605:1771 <http://localhost:8080/WPWebRelease/App.js:3605:1771>)
>>>
>>> at Mya (http://localhost:8080/WPWebRelease/App.js:3343:365 <http://localhost:8080/WPWebRelease/App.js:3343:365>)
>>>
>>> at AR.J.usa (http://localhost:8080/WPWebRelease/App.js:434:441 <http://localhost:8080/WPWebRelease/App.js:434:441>)
>>>
>>> at GFa.J.fromTypeDefinition (http://localhost:8080/WPWebRelease/App.js:5706:139 <http://localhost:8080/WPWebRelease/App.js:5706:139>)
>>>
>>> at Function.YT.getTypeDescriptor (http://localhost:8080/WPWebRelease/App.js:4570:820 <http://localhost:8080/WPWebRelease/App.js:4570:820>)
>>>
>>> at Function.fX.constructBean (http://localhost:8080/WPWebRelease/App.js:2336:472 <http://localhost:8080/WPWebRelease/App.js:2336:472>)
>>>
>>> at r$.J.initialize (http://localhost:8080/WPWebRelease/App.js:5041:66 <http://localhost:8080/WPWebRelease/App.js:5041:66>)
>>>
>>> at OW.J.init (http://localhost:8080/WPWebRelease/App.js:950:452 <http://localhost:8080/WPWebRelease/App.js:950:452>)
>>>
>>> at OW.J.u (http://localhost:8080/WPWebRelease/App.js:951:454 <http://localhost:8080/WPWebRelease/App.js:951:454>)
>>>
>>> at $$.J.addBead (http://localhost:8080/WPWebRelease/App.js:357:549 <http://localhost:8080/WPWebRelease/App.js:357:549>)
>>>
>>>
>>>
>>> The main difference:
>>>
>>> project compiled from "SDK-develop" runs fine in js-debug and gives error in js-release and, compiled from "SDK-ROYALE_INTERFACE_INFO" does not launch because of conversion error.
>>>
>>>
>>>
>>> Hiedra
>>>
>>>
>>>
>>> De: Roman Isitua <romanisitua@gmail.com <ma...@gmail.com>>
>>> Enviado el: martes, 28 de diciembre de 2021 15:55
>>> Para: users@royale.apache.org <ma...@royale.apache.org>
>>> Asunto: Re: Load time is very slow
>>>
>>>
>>>
>>> @Harb
>>>
>>>
>>>
>>> I have checked out the feature/ROYALE_INTERFACE_INFO branch and compiled asjs and compiler. I have rebuilt my application with modules in release mode.
>>>
>>>
>>>
>>> I get the following error when I attempt to launch a module
>>>
>>>
>>>
>>>
>>>
>>> <image001.png>
>>>
>>>
>>>
>>>
>>>
>>> The module loads fine in debug mode
>>>
>>>
>>>
>>> <image002.png>
>>>
>>>
>>>
>>>
>>>
>>> Snippets of the log
>>>
>>>
>>>
>>> Overview.js:786 Uncaught TypeError: cm.valuesImpl.init is not a function
>>> at Rr.Mr.yl (Overview.js:786)
>>> at Function.iq.generateMXMLProperties (Overview.js:736)
>>> at Rr.hq.generateMXMLAttributes (Overview.js:546)
>>> at new Rr (Overview.js:804)
>>> at LN.J.loadHandler (FrontEnd.js:1967)
>>> Mr.yl @ Overview.js:786
>>> iq.generateMXMLProperties @ Overview.js:736
>>> hq.generateMXMLAttributes @ Overview.js:546
>>> Rr @ Overview.js:804
>>> J.loadHandler @ FrontEnd.js:1967
>>> load (async)
>>> LN.loadModule @ FrontEnd.js:1965
>>> dN.loadModule @ FrontEnd.js:2406
>>> LD.Un @ FrontEnd.js:1809
>>> ny @ FrontEnd.js:123
>>> ny @ FrontEnd.js:248
>>> iy @ FrontEnd.js:125
>>> b @ FrontEnd.js:121
>>>
>>>
>>>
>>>
>>>
>>> I have attached the full log to this email.
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> On Tue, Dec 28, 2021 at 2:51 PM Roman Isitua <romanisitua@gmail.com <ma...@gmail.com>> wrote:
>>>
>>> Hi Maria,
>>>
>>>
>>>
>>> Prior to starting this mail discussion "Load time is very slow". I can confirm I have only been compiling in debug mode. My target\javascript\bin\ only had js-debug. It was after I upgraded my royale sdk from 0.9.7 to 0.9.8 that I compiled in release mode.
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> On Tue, Dec 28, 2021 at 2:24 PM Maria Jose Esteve <mjesteve@iest.com <ma...@iest.com>> wrote:
>>>
>>> Hi, @Roman, I think you are doing a double compile can it be? My times are the same as yours and I always compile in debug and release.
>>>
>>>
>>>
>>> Look at your target folder " target\javascript\bin\" and if you have two folders: js-debug and js-release you are compiling always double.
>>>
>>>
>>>
>>> In my case, the architecture of my project as well as the Maven compilation files (pom.xml) were provided by an external company (we didn't know anything about Maven or Royale at that time) and I understand that this formula was chosen to show us the options we had.
>>>
>>>
>>>
>>> A priori and without doing any test as Harb has done, I think that modularity gives us the advantage of compiling parts of the code once and not compiling them again if they are not modified. So far WITH MY COMPILATION TIMES, sometimes more than 1 minute, this is fundamental. But of course, now we have the problem of minification of the modules and it is really a serious problem because it is impossible for us to deploy in production.
>>>
>>>
>>>
>>> I will try to separate the compiación realese with a profile and if I succeed I will pass it to you @Roman.
>>>
>>>
>>>
>>> @Harb what do you mean by compiling the ROYALE_INTERFACE_INFO branch?
>>>
>>>
>>>
>>> Hiedra
>>>
>>>
>>>
>>> De: Harbs <harbs.lists@gmail.com <ma...@gmail.com>>
>>> Enviado el: lunes, 27 de diciembre de 2021 18:32
>>> Para: users@royale.apache.org <ma...@royale.apache.org>
>>> Asunto: Re: Load time is very slow
>>>
>>>
>>>
>>> That doesn’t sound right.
>>>
>>>
>>>
>>> Are you sure you’re compiling debug and not release? That sounds like release build times.
>>>
>>>
>>>
>>> On Dec 27, 2021, at 3:31 PM, Roman Isitua <romanisitua@gmail.com <ma...@gmail.com>> wrote:
>>>
>>>
>>>
>>> Wow ! You are using a workstation with a bleeding edge processor.
>>>
>>>
>>>
>>> I just compiled my app now. It took 44 seconds. (First compilation after ide start up.) Subsequently compilations are usually 19s to 20s.
>>>
>>>
>>>
>>> My application code base is very very small compared to yours. As we continue to add functionality, I expect the compile times to rise.
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>
>> <MainApp_pom.xml><Overview_pom.xml><fm_client2_pom.xml>
>
Re: Compiling Modules (was Re: Load time is very slow)
Posted by Roman Isitua <ro...@gmail.com>.
Kindly clarify what you mean by "no 1. Get rid of aggressive mimification
options " ? Which of the options are aggressive ?
I will apply no 2 and revert with my findings.
On Thu, 30 Dec 2021, 18:56 Harbs, <ha...@gmail.com> wrote:
> 1. I’d get rid of the agressive minification options. It will likely cause
> issues. If you get it to work without those options, you can try to add
> them back in and see if it still works.
> 2. You seem to be missing the compiler options explained here:
> https://apache.github.io/royale-docs/features/modules#minification
>
> For a pom, it would look something like this (adjust your paths to match
> your setup):
>
> Main app:
> <additionalCompilerOptions>-source-map=true;-js-compiler-option=--variable_map_output_file
> gccvars.txt;-js-compiler-option+=--property_map_output_file
> gccprops.txt</additionalCompilerOptions>
>
> Module:
> <additionalCompilerOptions>-source-map=true;-js-compiler-option=--variable_map_input_file
> ../../../../../MainApp/bin/js-release/gccvars.txt;-js-compiler-option+=--property_map_input_file
> ../../../../../MainApp/bin/js-release/gccprops.txt</additionalCompilerOptions>
>
> On Dec 30, 2021, at 7:43 PM, Roman Isitua <ro...@gmail.com> wrote:
>
> I think it will be better for me to share my pom's that way you can see
> all the compilation options used. The pom for the parent (FmClient2), the
> MainApp and one module (Overview) have been attached to this email.
>
>
> On Thu, Dec 30, 2021 at 6:22 PM Harbs <ha...@gmail.com> wrote:
>
>> Roman, can you share your full compiler options?
>>
>> I decided to remove the below settings completely
>>> -export-public-symbols=false
>>> -prevent-rename-protected-symbols=false
>>> -prevent-rename-public-symbols=false
>>> -prevent-rename-internal-symbols=false
>>>
>>>
>>> I enabled the below settings
>>>
>>> -js-dynamic-access-unknown-members=true;
>>> -js-default-initializers=true
>>>
>>>
>>> The release version starts up
>>>
>>>
>>>
>> Hiedra, that’s great!
>>
>> On Dec 30, 2021, at 7:15 PM, Roman Isitua <ro...@gmail.com> wrote:
>>
>>
>> Yes. I am testing with the sdk compiled on branch ROYALE_INTERFACE_INFO
>>
>> On Thu, Dec 30, 2021 at 6:10 PM Maria Jose Esteve <mj...@iest.com>
>> wrote:
>>
>>> Roman, are you testing with the SDK compiled from the Harb branches,
>>> ROYALE_INTERFACE_INFO, or from develop?
>>>
>>>
>>>
>>> Hiedra
>>>
>>>
>>>
>>> *De:* Roman Isitua <ro...@gmail.com>
>>> *Enviado el:* jueves, 30 de diciembre de 2021 16:52
>>> *Para:* users@royale.apache.org
>>> *Asunto:* Re: Compiling Modules (was Re: Load time is very slow)
>>>
>>>
>>>
>>> I decided to remove the below settings completely
>>> -export-public-symbols=false
>>> -prevent-rename-protected-symbols=false
>>> -prevent-rename-public-symbols=false
>>> -prevent-rename-internal-symbols=false
>>>
>>>
>>> I enabled the below settings
>>>
>>> -js-dynamic-access-unknown-members=true;
>>> -js-default-initializers=true
>>>
>>>
>>> The release version starts up
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> <image001.png>
>>>
>>>
>>>
>>>
>>>
>>> <image002.png>
>>>
>>>
>>>
>>> However, the moment I launch a module. I get the below error
>>>
>>>
>>>
>>> <image003.png>
>>>
>>>
>>>
>>>
>>>
>>> It appears to be failing when I launch the "*Overview*" module
>>> (by clicking the Overview side menu).
>>>
>>>
>>>
>>> So my current observation is that by retaining only two settings
>>>
>>>
>>>
>>> -js-dynamic-access-unknown-members=true;
>>> -js-default-initializers=true
>>>
>>>
>>>
>>> The release module starts up but the app fails whenever I launch a
>>> module.
>>>
>>>
>>>
>>> The smallest size settings in the documentation do not work. The app
>>> does not start up.
>>>
>>>
>>>
>>> -export-public-symbols=false
>>> -prevent-rename-protected-symbols=false
>>> -prevent-rename-public-symbols=false
>>> -prevent-rename-internal-symbols=false
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> The error trace is below
>>>
>>>
>>>
>>>
>>>
>>> Uncaught TypeError: cm.valuesImpl.init is not a function
>>> at Wr.Rr.pl <http://wr.rr.pl/> (Overview.js:792)
>>> at Function.mq.generateMXMLProperties (Overview.js:743)
>>> at Wr.lq.generateMXMLAttributes (Overview.js:551)
>>> at new Wr (Overview.js:810)
>>> at QN.J.loadHandler (FrontEnd.js:1978)
>>> 3Overview.js:56 Uncaught TypeError: Cannot read properties of undefined
>>> (reading 'prototype')
>>> at P (Overview.js:56)
>>> at VG.convert (FrontEnd.js:910)
>>> at ny (FrontEnd.js:250)
>>> at HTMLElement.iy (FrontEnd.js:125)
>>> at HTMLElement.b (FrontEnd.js:121)
>>> FrontEnd.js:1649 Uncaught TypeError: M is not a function
>>> at sM.J.handleMouseOut (FrontEnd.js:1649)
>>> at Function.ny [as googFireListener] (FrontEnd.js:123)
>>> at ny (FrontEnd.js:250)
>>> at HTMLAnchorElement.iy (FrontEnd.js:125)
>>> at HTMLAnchorElement.b (FrontEnd.js:121)
>>> FrontEnd.js:1649 Uncaught TypeError: M is not a function
>>> at sM.J.handleMouseOver (FrontEnd.js:1649)
>>> at Function.ny [as googFireListener] (FrontEnd.js:123)
>>> at ny (FrontEnd.js:250)
>>> at HTMLAnchorElement.iy (FrontEnd.js:125)
>>> at HTMLAnchorElement.b (FrontEnd.js:121)
>>> J.handleMouseOver @ FrontEnd.js:1649
>>> ny @ FrontEnd.js:123
>>> ny @ FrontEnd.js:250
>>> iy @ FrontEnd.js:125
>>> b @ FrontEnd.js:121
>>> FrontEnd.js:1649 Uncaught TypeError: M is not a function
>>> at sM.J.handleMouseOut (FrontEnd.js:1649)
>>> at Function.ny [as googFireListener] (FrontEnd.js:123)
>>> at ny (FrontEnd.js:250)
>>> at HTMLAnchorElement.iy (FrontEnd.js:125)
>>> at HTMLAnchorElement.b (FrontEnd.js:121)
>>> J.handleMouseOut @ FrontEnd.js:1649
>>> ny @ FrontEnd.js:123
>>> ny @ FrontEnd.js:250
>>> iy @ FrontEnd.js:125
>>> b @ FrontEnd.js:121
>>> FrontEnd.js:1649 Uncaught TypeError: M is not a function
>>> at sM.J.handleMouseOver (FrontEnd.js:1649)
>>> at Function.ny [as googFireListener] (FrontEnd.js:123)
>>> at ny (FrontEnd.js:250)
>>> at HTMLAnchorElement.iy (FrontEnd.js:125)
>>> at HTMLAnchorElement.b (FrontEnd.js:121)
>>> J.handleMouseOver @ FrontEnd.js:1649
>>> ny @ FrontEnd.js:123
>>> ny @ FrontEnd.js:250
>>> iy @ FrontEnd.js:125
>>> b @ FrontEnd.js:121
>>> FrontEnd.js:1649 Uncaught TypeError: M is not a function
>>> at sM.J.handleMouseOut (FrontEnd.js:1649)
>>> at Function.ny [as googFireListener] (FrontEnd.js:123)
>>> at ny (FrontEnd.js:250)
>>> at HTMLAnchorElement.iy (FrontEnd.js:125)
>>> at HTMLAnchorElement.b (FrontEnd.js:121)
>>> J.handleMouseOut @ FrontEnd.js:1649
>>> ny @ FrontEnd.js:123
>>> ny @ FrontEnd.js:250
>>> iy @ FrontEnd.js:125
>>> b @ FrontEnd.js:121
>>> FrontEnd.js:1649 Uncaught TypeError: M is not a function
>>> at sM.J.handleMouseOver (FrontEnd.js:1649)
>>> at Function.ny [as googFireListener] (FrontEnd.js:123)
>>> at ny (FrontEnd.js:250)
>>> at HTMLAnchorElement.iy (FrontEnd.js:125)
>>> at HTMLAnchorElement.b (FrontEnd.js:121)
>>> J.handleMouseOver @ FrontEnd.js:1649
>>> ny @ FrontEnd.js:123
>>> ny @ FrontEnd.js:250
>>> iy @ FrontEnd.js:125
>>> b @ FrontEnd.js:121
>>> FrontEnd.js:1649 Uncaught TypeError: M is not a function
>>> at sM.J.handleMouseOut (FrontEnd.js:1649)
>>> at Function.ny [as googFireListener] (FrontEnd.js:123)
>>> at ny (FrontEnd.js:250)
>>> at HTMLAnchorElement.iy (FrontEnd.js:125)
>>> at HTMLAnchorElement.b (FrontEnd.js:121)
>>> J.handleMouseOut @ FrontEnd.js:1649
>>> ny @ FrontEnd.js:123
>>> ny @ FrontEnd.js:250
>>> iy @ FrontEnd.js:125
>>> b @ FrontEnd.js:121
>>> FrontEnd.js:1649 Uncaught TypeError: M is not a function
>>> at sM.J.handleMouseOver (FrontEnd.js:1649)
>>> at Function.ny [as googFireListener] (FrontEnd.js:123)
>>> at ny (FrontEnd.js:250)
>>> at HTMLAnchorElement.iy (FrontEnd.js:125)
>>> at HTMLAnchorElement.b (FrontEnd.js:121)
>>> J.handleMouseOver @ FrontEnd.js:1649
>>> ny @ FrontEnd.js:123
>>> ny @ FrontEnd.js:250
>>> iy @ FrontEnd.js:125
>>> b @ FrontEnd.js:121
>>> FrontEnd.js:1649 Uncaught TypeError: M is not a function
>>> at sM.J.handleMouseOut (FrontEnd.js:1649)
>>> at Function.ny [as googFireListener] (FrontEnd.js:123)
>>> at ny (FrontEnd.js:250)
>>> at HTMLAnchorElement.iy (FrontEnd.js:125)
>>> at HTMLAnchorElement.b (FrontEnd.js:121)
>>> J.handleMouseOut @ FrontEnd.js:1649
>>> ny @ FrontEnd.js:123
>>> ny @ FrontEnd.js:250
>>> iy @ FrontEnd.js:125
>>> b @ FrontEnd.js:121
>>>
>>>
>>>
>>> On Thu, Dec 30, 2021 at 4:32 PM Roman Isitua <ro...@gmail.com>
>>> wrote:
>>>
>>> I get the same error even when I set
>>> the -js-dynamic-access-unknown-members=true;
>>>
>>>
>>>
>>> On Thu, Dec 30, 2021 at 4:24 PM Roman Isitua <ro...@gmail.com>
>>> wrote:
>>>
>>>
>>>
>>> Using the below settings,
>>>
>>> -export-public-symbols=false
>>> -prevent-rename-protected-symbols=false
>>> -prevent-rename-public-symbols=false
>>> -prevent-rename-internal-symbols=false
>>> -js-dynamic-access-unknown-members=false;
>>>
>>> -js-default-initializers=true
>>>
>>>
>>> Debug version runs fine. The release version does not start up
>>>
>>> <image004.png>
>>>
>>>
>>> I get the below errors
>>>
>>> Uncaught TypeError: Cannot read properties of undefined (reading 'apply')
>>> at KE.hm (FrontEnd.js:1600)
>>> at XE.M.Fb (FrontEnd.js:943)
>>> at XE.M.uh (FrontEnd.js:937)
>>> at FE.M.na <http://fe.m.na/> (FrontEnd.js:497)
>>> at FE.M.v (FrontEnd.js:497)
>>> at dR.M.S (FrontEnd.js:213)
>>> at dR.Nz.S (FrontEnd.js:217)
>>> at dR.M.start (FrontEnd.js:1396)
>>> at index.html:45
>>> :8080/favicon.ico:1 Failed to load resource: the server responded with a
>>> status of 404 (Not Found)
>>>
>>>
>>>
>>>
>>>
>>> FrontEnd.js is the start up class for the application. i.e. It
>>> implements the Jewel application class.
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> On Thu, Dec 30, 2021 at 3:19 PM Roman Isitua <ro...@gmail.com>
>>> wrote:
>>>
>>> Hi Harb,
>>>
>>>
>>>
>>> Thanks for your response. I have gone through the documentation. I will
>>> do my test again starting with the smallest size option and share my
>>> findings.
>>>
>>>
>>>
>>> Regards,
>>>
>>>
>>>
>>> On Thu, Dec 30, 2021 at 10:59 AM Harbs <ha...@gmail.com> wrote:
>>>
>>> Sorry for my deal in responding.
>>>
>>>
>>>
>>> Let’s take a step back.
>>>
>>>
>>>
>>> I’m not sure how you are compiling your modules. I just added some
>>> content to the module documentation page which explains what compiler
>>> options you need while compiling modules. (It still needs some editing.)
>>> https://apache.github.io/royale-docs/features/modules#minification
>>>
>>>
>>>
>>> Are you using those options?
>>>
>>>
>>>
>>> On Dec 29, 2021, at 2:19 AM, Maria Jose Esteve <mj...@iest.com>
>>> wrote:
>>>
>>>
>>>
>>> Hi, Let me join you with these tests....
>>>
>>>
>>>
>>> @Harb, I have compiled the SDK from this branch, feature/ROYALE_INTERFACE_INFO,
>>> and when running in debug I get this error:
>>>
>>>
>>>
>>> Message on the PURGE CONSOLE is displayed:
>>>
>>>
>>>
>>> Cannot convert org.apache.royale.reflection.beads.ClassAliasBead to
>>> IBead
>>>
>>>
>>>
>>> Message in the IDE Window:
>>>
>>>
>>>
>>> Se produjo una excepción: TypeError: Cannot convert [object Object] to
>>> IBead
>>>
>>> at App.org.apache.royale.core.ElementWrapper.addBead (
>>> http://localhost:8080/WNetSuitePlus/org/apache/royale/core/ElementWrapper.js:114:11
>>> )
>>>
>>> at App.org.apache.royale.core.HTMLElementWrapper.addBead (
>>> http://localhost:8080/WNetSuitePlus/org/apache/royale/core/HTMLElementWrapper.js:43:65
>>> )
>>>
>>> at App.org.apache.royale.jewel.Application.start (
>>> http://localhost:8080/WNetSuitePlus/org/apache/royale/jewel/Application.js:246:10
>>> )
>>>
>>> at App.App_loadXML (
>>> http://localhost:8080/WNetSuitePlus/App.js:1681:25)
>>>
>>> at
>>> org.apache.royale.net.URLLoader.org.apache.royale.events.EventDispatcher.fireListeners
>>> (
>>> http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:97:23
>>> )
>>>
>>> at Function.goog.events.EventTarget.dispatchEventInternal_ (
>>> http://localhost:8080/WNetSuitePlus/library/closure/goog/events/eventtarget.js:381:26
>>> )
>>>
>>> at
>>> org.apache.royale.net.URLLoader.org.apache.royale.events.EventDispatcher.dispatchEvent
>>> (
>>> http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:72:37
>>> )
>>>
>>> at org.apache.royale.net.URLLoader.jsEventHandler (
>>> http://localhost:8080/WNetSuitePlus/org/apache/royale/net/URLLoader.js:169:12
>>> )
>>>
>>>
>>>
>>> Call stack:
>>>
>>>
>>>
>>> <image003.png>
>>>
>>>
>>>
>>> [INFO] Executing MXMLC in tool group Royale with args: [
>>>
>>>
>>> -load-config=D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\compile-app-config.xml,
>>>
>>> -js-default-initializers=true,
>>>
>>> -source-map=true,
>>>
>>> -js-dynamic-access-unknown-members=true,
>>>
>>>
>>> -keep-as3-metadata+=Inject,Dispatcher,EventHandler,Event,PostConstruct,PreDestroy,ViewAdded,ViewRemoved,Bindable,Transient,
>>>
>>> -keep-code-with-metadata=Inject,
>>>
>>> -show-binding-warnings=false,
>>>
>>> -export-public-symbols=false,
>>>
>>> -prevent-rename-protected-symbols=false,
>>>
>>> -prevent-rename-internal-symbols=false,
>>>
>>>
>>> -js-output=D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\javascript,
>>>
>>> -compiler.targets=JSRoyale,
>>>
>>>
>>> D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\src\main\royale\App.mxml
>>>
>>>
>>>
>>>
>>>
>>> The release execution does not change, the error is the same as before
>>> (SDK compilation from the develop branch):
>>>
>>>
>>>
>>> Se produjo una excepción: ReferenceError: Error #1065: Variable
>>> com.iest.winplusweb.models.MasterConfigSystemModel is not defined.
>>>
>>> at yR (http://localhost:8080/WPWebRelease/App.js:3605:1771)
>>>
>>> at Mya (http://localhost:8080/WPWebRelease/App.js:3343:365)
>>>
>>> at AR.J.usa (http://localhost:8080/WPWebRelease/App.js:434:441)
>>>
>>> at GFa.J.fromTypeDefinition (
>>> http://localhost:8080/WPWebRelease/App.js:5706:139)
>>>
>>> at Function.YT.getTypeDescriptor (
>>> http://localhost:8080/WPWebRelease/App.js:4570:820)
>>>
>>> at Function.fX.constructBean (
>>> http://localhost:8080/WPWebRelease/App.js:2336:472)
>>>
>>> at r$.J.initialize (
>>> http://localhost:8080/WPWebRelease/App.js:5041:66)
>>>
>>> at OW.J.init (http://localhost:8080/WPWebRelease/App.js:950:452)
>>>
>>> at OW.J.u (http://localhost:8080/WPWebRelease/App.js:951:454)
>>>
>>> at $$.J.addBead (http://localhost:8080/WPWebRelease/App.js:357:549)
>>>
>>>
>>>
>>> The main difference:
>>>
>>> project compiled from "SDK-develop" runs fine in js-debug and gives
>>> error in js-release and, compiled from "SDK-ROYALE_INTERFACE_INFO" does not
>>> launch because of conversion error.
>>>
>>>
>>>
>>> Hiedra
>>>
>>>
>>>
>>> *De:* Roman Isitua <ro...@gmail.com>
>>> *Enviado el:* martes, 28 de diciembre de 2021 15:55
>>> *Para:* users@royale.apache.org
>>> *Asunto:* Re: Load time is very slow
>>>
>>>
>>>
>>> @Harb
>>>
>>>
>>>
>>> I have checked out the feature/ROYALE_INTERFACE_INFO branch and
>>> compiled asjs and compiler. I have rebuilt my application with modules in
>>> release mode.
>>>
>>>
>>>
>>> I get the following error when I attempt to launch a module
>>>
>>>
>>>
>>>
>>>
>>> <image001.png>
>>>
>>>
>>>
>>>
>>>
>>> The module loads fine in debug mode
>>>
>>>
>>>
>>> <image002.png>
>>>
>>>
>>>
>>>
>>>
>>> Snippets of the log
>>>
>>>
>>>
>>> Overview.js:786 Uncaught TypeError: cm.valuesImpl.init is not a function
>>> at Rr.Mr.yl (Overview.js:786)
>>> at Function.iq.generateMXMLProperties (Overview.js:736)
>>> at Rr.hq.generateMXMLAttributes (Overview.js:546)
>>> at new Rr (Overview.js:804)
>>> at LN.J.loadHandler (FrontEnd.js:1967)
>>> Mr.yl @ Overview.js:786
>>> iq.generateMXMLProperties @ Overview.js:736
>>> hq.generateMXMLAttributes @ Overview.js:546
>>> Rr @ Overview.js:804
>>> J.loadHandler @ FrontEnd.js:1967
>>> load (async)
>>> LN.loadModule @ FrontEnd.js:1965
>>> dN.loadModule @ FrontEnd.js:2406
>>> LD.Un @ FrontEnd.js:1809
>>> ny @ FrontEnd.js:123
>>> ny @ FrontEnd.js:248
>>> iy @ FrontEnd.js:125
>>> b @ FrontEnd.js:121
>>>
>>>
>>>
>>>
>>>
>>> I have attached the full log to this email.
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> On Tue, Dec 28, 2021 at 2:51 PM Roman Isitua <ro...@gmail.com>
>>> wrote:
>>>
>>> Hi Maria,
>>>
>>>
>>>
>>> Prior to starting this mail discussion "Load time is very slow". I can
>>> confirm I have only been compiling in debug mode. My target\javascript\bin\
>>> only had js-debug. It was after I upgraded my royale sdk from 0.9.7 to
>>> 0.9.8 that I compiled in release mode.
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> On Tue, Dec 28, 2021 at 2:24 PM Maria Jose Esteve <mj...@iest.com>
>>> wrote:
>>>
>>> Hi, @Roman, I think you are doing a double compile can it be? My times
>>> are the same as yours and I always compile in debug and release.
>>>
>>>
>>>
>>> Look at your target folder " target\javascript\bin\" and if you have
>>> two folders: js-debug and js-release you are compiling always double.
>>>
>>>
>>>
>>> In my case, the architecture of my project as well as the Maven
>>> compilation files (pom.xml) were provided by an external company (we didn't
>>> know anything about Maven or Royale at that time) and I understand that
>>> this formula was chosen to show us the options we had.
>>>
>>>
>>>
>>> A priori and without doing any test as Harb has done, I think that
>>> modularity gives us the advantage of compiling parts of the code once and
>>> not compiling them again if they are not modified. So far WITH MY
>>> COMPILATION TIMES, sometimes more than 1 minute, this is fundamental. But
>>> of course, now we have the problem of minification of the modules and it is
>>> really a serious problem because it is impossible for us to deploy in
>>> production.
>>>
>>>
>>>
>>> I will try to separate the compiación realese with a profile and if I
>>> succeed I will pass it to you @Roman.
>>>
>>>
>>>
>>> @Harb what do you mean by compiling the ROYALE_INTERFACE_INFO branch?
>>>
>>>
>>>
>>> Hiedra
>>>
>>>
>>>
>>> *De:* Harbs <ha...@gmail.com>
>>> *Enviado el:* lunes, 27 de diciembre de 2021 18:32
>>> *Para:* users@royale.apache.org
>>> *Asunto:* Re: Load time is very slow
>>>
>>>
>>>
>>> That doesn’t sound right.
>>>
>>>
>>>
>>> Are you sure you’re compiling debug and not release? That sounds like
>>> release build times.
>>>
>>>
>>>
>>> On Dec 27, 2021, at 3:31 PM, Roman Isitua <ro...@gmail.com> wrote:
>>>
>>>
>>>
>>> Wow ! You are using a workstation with a bleeding edge processor.
>>>
>>>
>>>
>>> I just compiled my app now. It took 44 seconds. (First compilation
>>> after ide start up.) Subsequently compilations are usually 19s to 20s.
>>>
>>>
>>>
>>> My application code base is very very small compared to yours. As we
>>> continue to add functionality, I expect the compile times to rise.
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>> <MainApp_pom.xml><Overview_pom.xml><fm_client2_pom.xml>
>
>
>
Re: Compiling Modules (was Re: Load time is very slow)
Posted by Harbs <ha...@gmail.com>.
1. I’d get rid of the agressive minification options. It will likely cause issues. If you get it to work without those options, you can try to add them back in and see if it still works.
2. You seem to be missing the compiler options explained here: https://apache.github.io/royale-docs/features/modules#minification
For a pom, it would look something like this (adjust your paths to match your setup):
Main app:
<additionalCompilerOptions>-source-map=true;-js-compiler-option=--variable_map_output_file gccvars.txt;-js-compiler-option+=--property_map_output_file gccprops.txt</additionalCompilerOptions>
Module:
<additionalCompilerOptions>-source-map=true;-js-compiler-option=--variable_map_input_file ../../../../../MainApp/bin/js-release/gccvars.txt;-js-compiler-option+=--property_map_input_file ../../../../../MainApp/bin/js-release/gccprops.txt</additionalCompilerOptions>
> On Dec 30, 2021, at 7:43 PM, Roman Isitua <ro...@gmail.com> wrote:
>
> I think it will be better for me to share my pom's that way you can see all the compilation options used. The pom for the parent (FmClient2), the MainApp and one module (Overview) have been attached to this email.
>
>
> On Thu, Dec 30, 2021 at 6:22 PM Harbs <harbs.lists@gmail.com <ma...@gmail.com>> wrote:
> Roman, can you share your full compiler options?
>
>> I decided to remove the below settings completely
>> -export-public-symbols=false
>> -prevent-rename-protected-symbols=false
>> -prevent-rename-public-symbols=false
>> -prevent-rename-internal-symbols=false
>>
>>
>> I enabled the below settings
>>
>> -js-dynamic-access-unknown-members=true;
>> -js-default-initializers=true
>>
>>
>> The release version starts up
>>
>>
>>
>
> Hiedra, that’s great!
>
>> On Dec 30, 2021, at 7:15 PM, Roman Isitua <romanisitua@gmail.com <ma...@gmail.com>> wrote:
>>
>>
>> Yes. I am testing with the sdk compiled on branch ROYALE_INTERFACE_INFO
>>
>> On Thu, Dec 30, 2021 at 6:10 PM Maria Jose Esteve <mjesteve@iest.com <ma...@iest.com>> wrote:
>> Roman, are you testing with the SDK compiled from the Harb branches, ROYALE_INTERFACE_INFO, or from develop?
>>
>>
>>
>> Hiedra
>>
>>
>>
>> De: Roman Isitua <romanisitua@gmail.com <ma...@gmail.com>>
>> Enviado el: jueves, 30 de diciembre de 2021 16:52
>> Para: users@royale.apache.org <ma...@royale.apache.org>
>> Asunto: Re: Compiling Modules (was Re: Load time is very slow)
>>
>>
>>
>> I decided to remove the below settings completely
>> -export-public-symbols=false
>> -prevent-rename-protected-symbols=false
>> -prevent-rename-public-symbols=false
>> -prevent-rename-internal-symbols=false
>>
>>
>> I enabled the below settings
>>
>> -js-dynamic-access-unknown-members=true;
>> -js-default-initializers=true
>>
>>
>> The release version starts up
>>
>>
>>
>>
>>
>>
>>
>> <image001.png>
>>
>>
>>
>>
>>
>> <image002.png>
>>
>>
>>
>> However, the moment I launch a module. I get the below error
>>
>>
>>
>> <image003.png>
>>
>>
>>
>>
>>
>> It appears to be failing when I launch the "Overview" module (by clicking the Overview side menu).
>>
>>
>>
>> So my current observation is that by retaining only two settings
>>
>>
>>
>> -js-dynamic-access-unknown-members=true;
>> -js-default-initializers=true
>>
>>
>>
>> The release module starts up but the app fails whenever I launch a module.
>>
>>
>>
>> The smallest size settings in the documentation do not work. The app does not start up.
>>
>>
>>
>> -export-public-symbols=false
>> -prevent-rename-protected-symbols=false
>> -prevent-rename-public-symbols=false
>> -prevent-rename-internal-symbols=false
>>
>>
>>
>>
>>
>>
>>
>> The error trace is below
>>
>>
>>
>>
>>
>> Uncaught TypeError: cm.valuesImpl.init is not a function
>> at Wr.Rr.pl <http://wr.rr.pl/> (Overview.js:792)
>> at Function.mq.generateMXMLProperties (Overview.js:743)
>> at Wr.lq.generateMXMLAttributes (Overview.js:551)
>> at new Wr (Overview.js:810)
>> at QN.J.loadHandler (FrontEnd.js:1978)
>> 3Overview.js:56 Uncaught TypeError: Cannot read properties of undefined (reading 'prototype')
>> at P (Overview.js:56)
>> at VG.convert (FrontEnd.js:910)
>> at ny (FrontEnd.js:250)
>> at HTMLElement.iy (FrontEnd.js:125)
>> at HTMLElement.b (FrontEnd.js:121)
>> FrontEnd.js:1649 Uncaught TypeError: M is not a function
>> at sM.J.handleMouseOut (FrontEnd.js:1649)
>> at Function.ny [as googFireListener] (FrontEnd.js:123)
>> at ny (FrontEnd.js:250)
>> at HTMLAnchorElement.iy (FrontEnd.js:125)
>> at HTMLAnchorElement.b (FrontEnd.js:121)
>> FrontEnd.js:1649 Uncaught TypeError: M is not a function
>> at sM.J.handleMouseOver (FrontEnd.js:1649)
>> at Function.ny [as googFireListener] (FrontEnd.js:123)
>> at ny (FrontEnd.js:250)
>> at HTMLAnchorElement.iy (FrontEnd.js:125)
>> at HTMLAnchorElement.b (FrontEnd.js:121)
>> J.handleMouseOver @ FrontEnd.js:1649
>> ny @ FrontEnd.js:123
>> ny @ FrontEnd.js:250
>> iy @ FrontEnd.js:125
>> b @ FrontEnd.js:121
>> FrontEnd.js:1649 Uncaught TypeError: M is not a function
>> at sM.J.handleMouseOut (FrontEnd.js:1649)
>> at Function.ny [as googFireListener] (FrontEnd.js:123)
>> at ny (FrontEnd.js:250)
>> at HTMLAnchorElement.iy (FrontEnd.js:125)
>> at HTMLAnchorElement.b (FrontEnd.js:121)
>> J.handleMouseOut @ FrontEnd.js:1649
>> ny @ FrontEnd.js:123
>> ny @ FrontEnd.js:250
>> iy @ FrontEnd.js:125
>> b @ FrontEnd.js:121
>> FrontEnd.js:1649 Uncaught TypeError: M is not a function
>> at sM.J.handleMouseOver (FrontEnd.js:1649)
>> at Function.ny [as googFireListener] (FrontEnd.js:123)
>> at ny (FrontEnd.js:250)
>> at HTMLAnchorElement.iy (FrontEnd.js:125)
>> at HTMLAnchorElement.b (FrontEnd.js:121)
>> J.handleMouseOver @ FrontEnd.js:1649
>> ny @ FrontEnd.js:123
>> ny @ FrontEnd.js:250
>> iy @ FrontEnd.js:125
>> b @ FrontEnd.js:121
>> FrontEnd.js:1649 Uncaught TypeError: M is not a function
>> at sM.J.handleMouseOut (FrontEnd.js:1649)
>> at Function.ny [as googFireListener] (FrontEnd.js:123)
>> at ny (FrontEnd.js:250)
>> at HTMLAnchorElement.iy (FrontEnd.js:125)
>> at HTMLAnchorElement.b (FrontEnd.js:121)
>> J.handleMouseOut @ FrontEnd.js:1649
>> ny @ FrontEnd.js:123
>> ny @ FrontEnd.js:250
>> iy @ FrontEnd.js:125
>> b @ FrontEnd.js:121
>> FrontEnd.js:1649 Uncaught TypeError: M is not a function
>> at sM.J.handleMouseOver (FrontEnd.js:1649)
>> at Function.ny [as googFireListener] (FrontEnd.js:123)
>> at ny (FrontEnd.js:250)
>> at HTMLAnchorElement.iy (FrontEnd.js:125)
>> at HTMLAnchorElement.b (FrontEnd.js:121)
>> J.handleMouseOver @ FrontEnd.js:1649
>> ny @ FrontEnd.js:123
>> ny @ FrontEnd.js:250
>> iy @ FrontEnd.js:125
>> b @ FrontEnd.js:121
>> FrontEnd.js:1649 Uncaught TypeError: M is not a function
>> at sM.J.handleMouseOut (FrontEnd.js:1649)
>> at Function.ny [as googFireListener] (FrontEnd.js:123)
>> at ny (FrontEnd.js:250)
>> at HTMLAnchorElement.iy (FrontEnd.js:125)
>> at HTMLAnchorElement.b (FrontEnd.js:121)
>> J.handleMouseOut @ FrontEnd.js:1649
>> ny @ FrontEnd.js:123
>> ny @ FrontEnd.js:250
>> iy @ FrontEnd.js:125
>> b @ FrontEnd.js:121
>> FrontEnd.js:1649 Uncaught TypeError: M is not a function
>> at sM.J.handleMouseOver (FrontEnd.js:1649)
>> at Function.ny [as googFireListener] (FrontEnd.js:123)
>> at ny (FrontEnd.js:250)
>> at HTMLAnchorElement.iy (FrontEnd.js:125)
>> at HTMLAnchorElement.b (FrontEnd.js:121)
>> J.handleMouseOver @ FrontEnd.js:1649
>> ny @ FrontEnd.js:123
>> ny @ FrontEnd.js:250
>> iy @ FrontEnd.js:125
>> b @ FrontEnd.js:121
>> FrontEnd.js:1649 Uncaught TypeError: M is not a function
>> at sM.J.handleMouseOut (FrontEnd.js:1649)
>> at Function.ny [as googFireListener] (FrontEnd.js:123)
>> at ny (FrontEnd.js:250)
>> at HTMLAnchorElement.iy (FrontEnd.js:125)
>> at HTMLAnchorElement.b (FrontEnd.js:121)
>> J.handleMouseOut @ FrontEnd.js:1649
>> ny @ FrontEnd.js:123
>> ny @ FrontEnd.js:250
>> iy @ FrontEnd.js:125
>> b @ FrontEnd.js:121
>>
>>
>>
>> On Thu, Dec 30, 2021 at 4:32 PM Roman Isitua <romanisitua@gmail.com <ma...@gmail.com>> wrote:
>>
>> I get the same error even when I set the -js-dynamic-access-unknown-members=true;
>>
>>
>>
>> On Thu, Dec 30, 2021 at 4:24 PM Roman Isitua <romanisitua@gmail.com <ma...@gmail.com>> wrote:
>>
>>
>>
>> Using the below settings,
>>
>> -export-public-symbols=false
>> -prevent-rename-protected-symbols=false
>> -prevent-rename-public-symbols=false
>> -prevent-rename-internal-symbols=false
>> -js-dynamic-access-unknown-members=false;
>>
>> -js-default-initializers=true
>>
>>
>> Debug version runs fine. The release version does not start up
>>
>> <image004.png>
>>
>>
>> I get the below errors
>>
>> Uncaught TypeError: Cannot read properties of undefined (reading 'apply')
>> at KE.hm (FrontEnd.js:1600)
>> at XE.M.Fb (FrontEnd.js:943)
>> at XE.M.uh (FrontEnd.js:937)
>> at FE.M.na <http://fe.m.na/> (FrontEnd.js:497)
>> at FE.M.v (FrontEnd.js:497)
>> at dR.M.S (FrontEnd.js:213)
>> at dR.Nz.S (FrontEnd.js:217)
>> at dR.M.start (FrontEnd.js:1396)
>> at index.html:45
>> :8080/favicon.ico:1 Failed to load resource: the server responded with a status of 404 (Not Found)
>>
>>
>>
>>
>>
>> FrontEnd.js is the start up class for the application. i.e. It implements the Jewel application class.
>>
>>
>>
>>
>>
>>
>>
>> On Thu, Dec 30, 2021 at 3:19 PM Roman Isitua <romanisitua@gmail.com <ma...@gmail.com>> wrote:
>>
>> Hi Harb,
>>
>>
>>
>> Thanks for your response. I have gone through the documentation. I will do my test again starting with the smallest size option and share my findings.
>>
>>
>>
>> Regards,
>>
>>
>>
>> On Thu, Dec 30, 2021 at 10:59 AM Harbs <harbs.lists@gmail.com <ma...@gmail.com>> wrote:
>>
>> Sorry for my deal in responding.
>>
>>
>>
>> Let’s take a step back.
>>
>>
>>
>> I’m not sure how you are compiling your modules. I just added some content to the module documentation page which explains what compiler options you need while compiling modules. (It still needs some editing.) https://apache.github.io/royale-docs/features/modules#minification <https://apache.github.io/royale-docs/features/modules#minification>
>>
>>
>> Are you using those options?
>>
>>
>>
>>
>> On Dec 29, 2021, at 2:19 AM, Maria Jose Esteve <mjesteve@iest.com <ma...@iest.com>> wrote:
>>
>>
>>
>> Hi, Let me join you with these tests....
>>
>>
>>
>> @Harb, I have compiled the SDK from this branch, feature/ROYALE_INTERFACE_INFO, and when running in debug I get this error:
>>
>>
>>
>> Message on the PURGE CONSOLE is displayed:
>>
>>
>>
>> Cannot convert org.apache.royale.reflection.beads.ClassAliasBead to IBead
>>
>>
>>
>> Message in the IDE Window:
>>
>>
>>
>> Se produjo una excepción: TypeError: Cannot convert [object Object] to IBead
>>
>> at App.org.apache.royale.core.ElementWrapper.addBead (http://localhost:8080/WNetSuitePlus/org/apache/royale/core/ElementWrapper.js:114:11 <http://localhost:8080/WNetSuitePlus/org/apache/royale/core/ElementWrapper.js:114:11>)
>>
>> at App.org.apache.royale.core.HTMLElementWrapper.addBead (http://localhost:8080/WNetSuitePlus/org/apache/royale/core/HTMLElementWrapper.js:43:65 <http://localhost:8080/WNetSuitePlus/org/apache/royale/core/HTMLElementWrapper.js:43:65>)
>>
>> at App.org.apache.royale.jewel.Application.start (http://localhost:8080/WNetSuitePlus/org/apache/royale/jewel/Application.js:246:10 <http://localhost:8080/WNetSuitePlus/org/apache/royale/jewel/Application.js:246:10>)
>>
>> at App.App_loadXML (http://localhost:8080/WNetSuitePlus/App.js:1681:25 <http://localhost:8080/WNetSuitePlus/App.js:1681:25>)
>>
>> at org.apache.royale.net.URLLoader.org.apache.royale.events.EventDispatcher.fireListeners (http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:97:23 <http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:97:23>)
>>
>> at Function.goog.events.EventTarget.dispatchEventInternal_ (http://localhost:8080/WNetSuitePlus/library/closure/goog/events/eventtarget.js:381:26 <http://localhost:8080/WNetSuitePlus/library/closure/goog/events/eventtarget.js:381:26>)
>>
>> at org.apache.royale.net.URLLoader.org.apache.royale.events.EventDispatcher.dispatchEvent (http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:72:37 <http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:72:37>)
>>
>> at org.apache.royale.net.URLLoader.jsEventHandler (http://localhost:8080/WNetSuitePlus/org/apache/royale/net/URLLoader.js:169:12 <http://localhost:8080/WNetSuitePlus/org/apache/royale/net/URLLoader.js:169:12>)
>>
>>
>>
>> Call stack:
>>
>>
>>
>> <image003.png>
>>
>>
>>
>> [INFO] Executing MXMLC in tool group Royale with args: [
>>
>> -load-config=D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\compile-app-config.xml,
>>
>> -js-default-initializers=true,
>>
>> -source-map=true,
>>
>> -js-dynamic-access-unknown-members=true,
>>
>> -keep-as3-metadata+=Inject,Dispatcher,EventHandler,Event,PostConstruct,PreDestroy,ViewAdded,ViewRemoved,Bindable,Transient,
>>
>> -keep-code-with-metadata=Inject,
>>
>> -show-binding-warnings=false,
>>
>> -export-public-symbols=false,
>>
>> -prevent-rename-protected-symbols=false,
>>
>> -prevent-rename-internal-symbols=false,
>>
>> -js-output=D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\javascript,
>>
>> -compiler.targets=JSRoyale,
>>
>> D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\src\main\royale\App.mxml
>>
>>
>>
>>
>>
>> The release execution does not change, the error is the same as before (SDK compilation from the develop branch):
>>
>>
>>
>> Se produjo una excepción: ReferenceError: Error #1065: Variable com.iest.winplusweb.models.MasterConfigSystemModel is not defined.
>>
>> at yR (http://localhost:8080/WPWebRelease/App.js:3605:1771 <http://localhost:8080/WPWebRelease/App.js:3605:1771>)
>>
>> at Mya (http://localhost:8080/WPWebRelease/App.js:3343:365 <http://localhost:8080/WPWebRelease/App.js:3343:365>)
>>
>> at AR.J.usa (http://localhost:8080/WPWebRelease/App.js:434:441 <http://localhost:8080/WPWebRelease/App.js:434:441>)
>>
>> at GFa.J.fromTypeDefinition (http://localhost:8080/WPWebRelease/App.js:5706:139 <http://localhost:8080/WPWebRelease/App.js:5706:139>)
>>
>> at Function.YT.getTypeDescriptor (http://localhost:8080/WPWebRelease/App.js:4570:820 <http://localhost:8080/WPWebRelease/App.js:4570:820>)
>>
>> at Function.fX.constructBean (http://localhost:8080/WPWebRelease/App.js:2336:472 <http://localhost:8080/WPWebRelease/App.js:2336:472>)
>>
>> at r$.J.initialize (http://localhost:8080/WPWebRelease/App.js:5041:66 <http://localhost:8080/WPWebRelease/App.js:5041:66>)
>>
>> at OW.J.init (http://localhost:8080/WPWebRelease/App.js:950:452 <http://localhost:8080/WPWebRelease/App.js:950:452>)
>>
>> at OW.J.u (http://localhost:8080/WPWebRelease/App.js:951:454 <http://localhost:8080/WPWebRelease/App.js:951:454>)
>>
>> at $$.J.addBead (http://localhost:8080/WPWebRelease/App.js:357:549 <http://localhost:8080/WPWebRelease/App.js:357:549>)
>>
>>
>>
>> The main difference:
>>
>> project compiled from "SDK-develop" runs fine in js-debug and gives error in js-release and, compiled from "SDK-ROYALE_INTERFACE_INFO" does not launch because of conversion error.
>>
>>
>>
>> Hiedra
>>
>>
>>
>> De: Roman Isitua <romanisitua@gmail.com <ma...@gmail.com>>
>> Enviado el: martes, 28 de diciembre de 2021 15:55
>> Para: users@royale.apache.org <ma...@royale.apache.org>
>> Asunto: Re: Load time is very slow
>>
>>
>>
>> @Harb
>>
>>
>>
>> I have checked out the feature/ROYALE_INTERFACE_INFO branch and compiled asjs and compiler. I have rebuilt my application with modules in release mode.
>>
>>
>>
>> I get the following error when I attempt to launch a module
>>
>>
>>
>>
>>
>> <image001.png>
>>
>>
>>
>>
>>
>> The module loads fine in debug mode
>>
>>
>>
>> <image002.png>
>>
>>
>>
>>
>>
>> Snippets of the log
>>
>>
>>
>> Overview.js:786 Uncaught TypeError: cm.valuesImpl.init is not a function
>> at Rr.Mr.yl (Overview.js:786)
>> at Function.iq.generateMXMLProperties (Overview.js:736)
>> at Rr.hq.generateMXMLAttributes (Overview.js:546)
>> at new Rr (Overview.js:804)
>> at LN.J.loadHandler (FrontEnd.js:1967)
>> Mr.yl @ Overview.js:786
>> iq.generateMXMLProperties @ Overview.js:736
>> hq.generateMXMLAttributes @ Overview.js:546
>> Rr @ Overview.js:804
>> J.loadHandler @ FrontEnd.js:1967
>> load (async)
>> LN.loadModule @ FrontEnd.js:1965
>> dN.loadModule @ FrontEnd.js:2406
>> LD.Un @ FrontEnd.js:1809
>> ny @ FrontEnd.js:123
>> ny @ FrontEnd.js:248
>> iy @ FrontEnd.js:125
>> b @ FrontEnd.js:121
>>
>>
>>
>>
>>
>> I have attached the full log to this email.
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> On Tue, Dec 28, 2021 at 2:51 PM Roman Isitua <romanisitua@gmail.com <ma...@gmail.com>> wrote:
>>
>> Hi Maria,
>>
>>
>>
>> Prior to starting this mail discussion "Load time is very slow". I can confirm I have only been compiling in debug mode. My target\javascript\bin\ only had js-debug. It was after I upgraded my royale sdk from 0.9.7 to 0.9.8 that I compiled in release mode.
>>
>>
>>
>>
>>
>>
>>
>> On Tue, Dec 28, 2021 at 2:24 PM Maria Jose Esteve <mjesteve@iest.com <ma...@iest.com>> wrote:
>>
>> Hi, @Roman, I think you are doing a double compile can it be? My times are the same as yours and I always compile in debug and release.
>>
>>
>>
>> Look at your target folder " target\javascript\bin\" and if you have two folders: js-debug and js-release you are compiling always double.
>>
>>
>>
>> In my case, the architecture of my project as well as the Maven compilation files (pom.xml) were provided by an external company (we didn't know anything about Maven or Royale at that time) and I understand that this formula was chosen to show us the options we had.
>>
>>
>>
>> A priori and without doing any test as Harb has done, I think that modularity gives us the advantage of compiling parts of the code once and not compiling them again if they are not modified. So far WITH MY COMPILATION TIMES, sometimes more than 1 minute, this is fundamental. But of course, now we have the problem of minification of the modules and it is really a serious problem because it is impossible for us to deploy in production.
>>
>>
>>
>> I will try to separate the compiación realese with a profile and if I succeed I will pass it to you @Roman.
>>
>>
>>
>> @Harb what do you mean by compiling the ROYALE_INTERFACE_INFO branch?
>>
>>
>>
>> Hiedra
>>
>>
>>
>> De: Harbs <harbs.lists@gmail.com <ma...@gmail.com>>
>> Enviado el: lunes, 27 de diciembre de 2021 18:32
>> Para: users@royale.apache.org <ma...@royale.apache.org>
>> Asunto: Re: Load time is very slow
>>
>>
>>
>> That doesn’t sound right.
>>
>>
>>
>> Are you sure you’re compiling debug and not release? That sounds like release build times.
>>
>>
>>
>> On Dec 27, 2021, at 3:31 PM, Roman Isitua <romanisitua@gmail.com <ma...@gmail.com>> wrote:
>>
>>
>>
>> Wow ! You are using a workstation with a bleeding edge processor.
>>
>>
>>
>> I just compiled my app now. It took 44 seconds. (First compilation after ide start up.) Subsequently compilations are usually 19s to 20s.
>>
>>
>>
>> My application code base is very very small compared to yours. As we continue to add functionality, I expect the compile times to rise.
>>
>>
>>
>>
>>
>>
>>
>
> <MainApp_pom.xml><Overview_pom.xml><fm_client2_pom.xml>
Re: Compiling Modules (was Re: Load time is very slow)
Posted by Roman Isitua <ro...@gmail.com>.
I think it will be better for me to share my pom's that way you can see all
the compilation options used. The pom for the parent (FmClient2), the
MainApp and one module (Overview) have been attached to this email.
On Thu, Dec 30, 2021 at 6:22 PM Harbs <ha...@gmail.com> wrote:
> Roman, can you share your full compiler options?
>
> I decided to remove the below settings completely
>> -export-public-symbols=false
>> -prevent-rename-protected-symbols=false
>> -prevent-rename-public-symbols=false
>> -prevent-rename-internal-symbols=false
>>
>>
>> I enabled the below settings
>>
>> -js-dynamic-access-unknown-members=true;
>> -js-default-initializers=true
>>
>>
>> The release version starts up
>>
>>
>>
> Hiedra, that’s great!
>
> On Dec 30, 2021, at 7:15 PM, Roman Isitua <ro...@gmail.com> wrote:
>
>
> Yes. I am testing with the sdk compiled on branch ROYALE_INTERFACE_INFO
>
> On Thu, Dec 30, 2021 at 6:10 PM Maria Jose Esteve <mj...@iest.com>
> wrote:
>
>> Roman, are you testing with the SDK compiled from the Harb branches,
>> ROYALE_INTERFACE_INFO, or from develop?
>>
>>
>>
>> Hiedra
>>
>>
>>
>> *De:* Roman Isitua <ro...@gmail.com>
>> *Enviado el:* jueves, 30 de diciembre de 2021 16:52
>> *Para:* users@royale.apache.org
>> *Asunto:* Re: Compiling Modules (was Re: Load time is very slow)
>>
>>
>>
>> I decided to remove the below settings completely
>> -export-public-symbols=false
>> -prevent-rename-protected-symbols=false
>> -prevent-rename-public-symbols=false
>> -prevent-rename-internal-symbols=false
>>
>>
>> I enabled the below settings
>>
>> -js-dynamic-access-unknown-members=true;
>> -js-default-initializers=true
>>
>>
>> The release version starts up
>>
>>
>>
>>
>>
>>
>>
>> <image001.png>
>>
>>
>>
>>
>>
>> <image002.png>
>>
>>
>>
>> However, the moment I launch a module. I get the below error
>>
>>
>>
>> <image003.png>
>>
>>
>>
>>
>>
>> It appears to be failing when I launch the "*Overview*" module
>> (by clicking the Overview side menu).
>>
>>
>>
>> So my current observation is that by retaining only two settings
>>
>>
>>
>> -js-dynamic-access-unknown-members=true;
>> -js-default-initializers=true
>>
>>
>>
>> The release module starts up but the app fails whenever I launch a module.
>>
>>
>>
>> The smallest size settings in the documentation do not work. The app does
>> not start up.
>>
>>
>>
>> -export-public-symbols=false
>> -prevent-rename-protected-symbols=false
>> -prevent-rename-public-symbols=false
>> -prevent-rename-internal-symbols=false
>>
>>
>>
>>
>>
>>
>>
>> The error trace is below
>>
>>
>>
>>
>>
>> Uncaught TypeError: cm.valuesImpl.init is not a function
>> at Wr.Rr.pl <http://wr.rr.pl/> (Overview.js:792)
>> at Function.mq.generateMXMLProperties (Overview.js:743)
>> at Wr.lq.generateMXMLAttributes (Overview.js:551)
>> at new Wr (Overview.js:810)
>> at QN.J.loadHandler (FrontEnd.js:1978)
>> 3Overview.js:56 Uncaught TypeError: Cannot read properties of undefined
>> (reading 'prototype')
>> at P (Overview.js:56)
>> at VG.convert (FrontEnd.js:910)
>> at ny (FrontEnd.js:250)
>> at HTMLElement.iy (FrontEnd.js:125)
>> at HTMLElement.b (FrontEnd.js:121)
>> FrontEnd.js:1649 Uncaught TypeError: M is not a function
>> at sM.J.handleMouseOut (FrontEnd.js:1649)
>> at Function.ny [as googFireListener] (FrontEnd.js:123)
>> at ny (FrontEnd.js:250)
>> at HTMLAnchorElement.iy (FrontEnd.js:125)
>> at HTMLAnchorElement.b (FrontEnd.js:121)
>> FrontEnd.js:1649 Uncaught TypeError: M is not a function
>> at sM.J.handleMouseOver (FrontEnd.js:1649)
>> at Function.ny [as googFireListener] (FrontEnd.js:123)
>> at ny (FrontEnd.js:250)
>> at HTMLAnchorElement.iy (FrontEnd.js:125)
>> at HTMLAnchorElement.b (FrontEnd.js:121)
>> J.handleMouseOver @ FrontEnd.js:1649
>> ny @ FrontEnd.js:123
>> ny @ FrontEnd.js:250
>> iy @ FrontEnd.js:125
>> b @ FrontEnd.js:121
>> FrontEnd.js:1649 Uncaught TypeError: M is not a function
>> at sM.J.handleMouseOut (FrontEnd.js:1649)
>> at Function.ny [as googFireListener] (FrontEnd.js:123)
>> at ny (FrontEnd.js:250)
>> at HTMLAnchorElement.iy (FrontEnd.js:125)
>> at HTMLAnchorElement.b (FrontEnd.js:121)
>> J.handleMouseOut @ FrontEnd.js:1649
>> ny @ FrontEnd.js:123
>> ny @ FrontEnd.js:250
>> iy @ FrontEnd.js:125
>> b @ FrontEnd.js:121
>> FrontEnd.js:1649 Uncaught TypeError: M is not a function
>> at sM.J.handleMouseOver (FrontEnd.js:1649)
>> at Function.ny [as googFireListener] (FrontEnd.js:123)
>> at ny (FrontEnd.js:250)
>> at HTMLAnchorElement.iy (FrontEnd.js:125)
>> at HTMLAnchorElement.b (FrontEnd.js:121)
>> J.handleMouseOver @ FrontEnd.js:1649
>> ny @ FrontEnd.js:123
>> ny @ FrontEnd.js:250
>> iy @ FrontEnd.js:125
>> b @ FrontEnd.js:121
>> FrontEnd.js:1649 Uncaught TypeError: M is not a function
>> at sM.J.handleMouseOut (FrontEnd.js:1649)
>> at Function.ny [as googFireListener] (FrontEnd.js:123)
>> at ny (FrontEnd.js:250)
>> at HTMLAnchorElement.iy (FrontEnd.js:125)
>> at HTMLAnchorElement.b (FrontEnd.js:121)
>> J.handleMouseOut @ FrontEnd.js:1649
>> ny @ FrontEnd.js:123
>> ny @ FrontEnd.js:250
>> iy @ FrontEnd.js:125
>> b @ FrontEnd.js:121
>> FrontEnd.js:1649 Uncaught TypeError: M is not a function
>> at sM.J.handleMouseOver (FrontEnd.js:1649)
>> at Function.ny [as googFireListener] (FrontEnd.js:123)
>> at ny (FrontEnd.js:250)
>> at HTMLAnchorElement.iy (FrontEnd.js:125)
>> at HTMLAnchorElement.b (FrontEnd.js:121)
>> J.handleMouseOver @ FrontEnd.js:1649
>> ny @ FrontEnd.js:123
>> ny @ FrontEnd.js:250
>> iy @ FrontEnd.js:125
>> b @ FrontEnd.js:121
>> FrontEnd.js:1649 Uncaught TypeError: M is not a function
>> at sM.J.handleMouseOut (FrontEnd.js:1649)
>> at Function.ny [as googFireListener] (FrontEnd.js:123)
>> at ny (FrontEnd.js:250)
>> at HTMLAnchorElement.iy (FrontEnd.js:125)
>> at HTMLAnchorElement.b (FrontEnd.js:121)
>> J.handleMouseOut @ FrontEnd.js:1649
>> ny @ FrontEnd.js:123
>> ny @ FrontEnd.js:250
>> iy @ FrontEnd.js:125
>> b @ FrontEnd.js:121
>> FrontEnd.js:1649 Uncaught TypeError: M is not a function
>> at sM.J.handleMouseOver (FrontEnd.js:1649)
>> at Function.ny [as googFireListener] (FrontEnd.js:123)
>> at ny (FrontEnd.js:250)
>> at HTMLAnchorElement.iy (FrontEnd.js:125)
>> at HTMLAnchorElement.b (FrontEnd.js:121)
>> J.handleMouseOver @ FrontEnd.js:1649
>> ny @ FrontEnd.js:123
>> ny @ FrontEnd.js:250
>> iy @ FrontEnd.js:125
>> b @ FrontEnd.js:121
>> FrontEnd.js:1649 Uncaught TypeError: M is not a function
>> at sM.J.handleMouseOut (FrontEnd.js:1649)
>> at Function.ny [as googFireListener] (FrontEnd.js:123)
>> at ny (FrontEnd.js:250)
>> at HTMLAnchorElement.iy (FrontEnd.js:125)
>> at HTMLAnchorElement.b (FrontEnd.js:121)
>> J.handleMouseOut @ FrontEnd.js:1649
>> ny @ FrontEnd.js:123
>> ny @ FrontEnd.js:250
>> iy @ FrontEnd.js:125
>> b @ FrontEnd.js:121
>>
>>
>>
>> On Thu, Dec 30, 2021 at 4:32 PM Roman Isitua <ro...@gmail.com>
>> wrote:
>>
>> I get the same error even when I set
>> the -js-dynamic-access-unknown-members=true;
>>
>>
>>
>> On Thu, Dec 30, 2021 at 4:24 PM Roman Isitua <ro...@gmail.com>
>> wrote:
>>
>>
>>
>> Using the below settings,
>>
>> -export-public-symbols=false
>> -prevent-rename-protected-symbols=false
>> -prevent-rename-public-symbols=false
>> -prevent-rename-internal-symbols=false
>> -js-dynamic-access-unknown-members=false;
>>
>> -js-default-initializers=true
>>
>>
>> Debug version runs fine. The release version does not start up
>>
>> <image004.png>
>>
>>
>> I get the below errors
>>
>> Uncaught TypeError: Cannot read properties of undefined (reading 'apply')
>> at KE.hm (FrontEnd.js:1600)
>> at XE.M.Fb (FrontEnd.js:943)
>> at XE.M.uh (FrontEnd.js:937)
>> at FE.M.na <http://fe.m.na/> (FrontEnd.js:497)
>> at FE.M.v (FrontEnd.js:497)
>> at dR.M.S (FrontEnd.js:213)
>> at dR.Nz.S (FrontEnd.js:217)
>> at dR.M.start (FrontEnd.js:1396)
>> at index.html:45
>> :8080/favicon.ico:1 Failed to load resource: the server responded with a
>> status of 404 (Not Found)
>>
>>
>>
>>
>>
>> FrontEnd.js is the start up class for the application. i.e. It implements
>> the Jewel application class.
>>
>>
>>
>>
>>
>>
>>
>> On Thu, Dec 30, 2021 at 3:19 PM Roman Isitua <ro...@gmail.com>
>> wrote:
>>
>> Hi Harb,
>>
>>
>>
>> Thanks for your response. I have gone through the documentation. I will
>> do my test again starting with the smallest size option and share my
>> findings.
>>
>>
>>
>> Regards,
>>
>>
>>
>> On Thu, Dec 30, 2021 at 10:59 AM Harbs <ha...@gmail.com> wrote:
>>
>> Sorry for my deal in responding.
>>
>>
>>
>> Let’s take a step back.
>>
>>
>>
>> I’m not sure how you are compiling your modules. I just added some
>> content to the module documentation page which explains what compiler
>> options you need while compiling modules. (It still needs some editing.)
>> https://apache.github.io/royale-docs/features/modules#minification
>>
>>
>>
>> Are you using those options?
>>
>>
>>
>> On Dec 29, 2021, at 2:19 AM, Maria Jose Esteve <mj...@iest.com> wrote:
>>
>>
>>
>> Hi, Let me join you with these tests....
>>
>>
>>
>> @Harb, I have compiled the SDK from this branch, feature/ROYALE_INTERFACE_INFO,
>> and when running in debug I get this error:
>>
>>
>>
>> Message on the PURGE CONSOLE is displayed:
>>
>>
>>
>> Cannot convert org.apache.royale.reflection.beads.ClassAliasBead to
>> IBead
>>
>>
>>
>> Message in the IDE Window:
>>
>>
>>
>> Se produjo una excepción: TypeError: Cannot convert [object Object] to
>> IBead
>>
>> at App.org.apache.royale.core.ElementWrapper.addBead (
>> http://localhost:8080/WNetSuitePlus/org/apache/royale/core/ElementWrapper.js:114:11
>> )
>>
>> at App.org.apache.royale.core.HTMLElementWrapper.addBead (
>> http://localhost:8080/WNetSuitePlus/org/apache/royale/core/HTMLElementWrapper.js:43:65
>> )
>>
>> at App.org.apache.royale.jewel.Application.start (
>> http://localhost:8080/WNetSuitePlus/org/apache/royale/jewel/Application.js:246:10
>> )
>>
>> at App.App_loadXML (
>> http://localhost:8080/WNetSuitePlus/App.js:1681:25)
>>
>> at
>> org.apache.royale.net.URLLoader.org.apache.royale.events.EventDispatcher.fireListeners
>> (
>> http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:97:23
>> )
>>
>> at Function.goog.events.EventTarget.dispatchEventInternal_ (
>> http://localhost:8080/WNetSuitePlus/library/closure/goog/events/eventtarget.js:381:26
>> )
>>
>> at
>> org.apache.royale.net.URLLoader.org.apache.royale.events.EventDispatcher.dispatchEvent
>> (
>> http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:72:37
>> )
>>
>> at org.apache.royale.net.URLLoader.jsEventHandler (
>> http://localhost:8080/WNetSuitePlus/org/apache/royale/net/URLLoader.js:169:12
>> )
>>
>>
>>
>> Call stack:
>>
>>
>>
>> <image003.png>
>>
>>
>>
>> [INFO] Executing MXMLC in tool group Royale with args: [
>>
>>
>> -load-config=D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\compile-app-config.xml,
>>
>> -js-default-initializers=true,
>>
>> -source-map=true,
>>
>> -js-dynamic-access-unknown-members=true,
>>
>>
>> -keep-as3-metadata+=Inject,Dispatcher,EventHandler,Event,PostConstruct,PreDestroy,ViewAdded,ViewRemoved,Bindable,Transient,
>>
>> -keep-code-with-metadata=Inject,
>>
>> -show-binding-warnings=false,
>>
>> -export-public-symbols=false,
>>
>> -prevent-rename-protected-symbols=false,
>>
>> -prevent-rename-internal-symbols=false,
>>
>>
>> -js-output=D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\javascript,
>>
>> -compiler.targets=JSRoyale,
>>
>>
>> D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\src\main\royale\App.mxml
>>
>>
>>
>>
>>
>> The release execution does not change, the error is the same as before
>> (SDK compilation from the develop branch):
>>
>>
>>
>> Se produjo una excepción: ReferenceError: Error #1065: Variable
>> com.iest.winplusweb.models.MasterConfigSystemModel is not defined.
>>
>> at yR (http://localhost:8080/WPWebRelease/App.js:3605:1771)
>>
>> at Mya (http://localhost:8080/WPWebRelease/App.js:3343:365)
>>
>> at AR.J.usa (http://localhost:8080/WPWebRelease/App.js:434:441)
>>
>> at GFa.J.fromTypeDefinition (
>> http://localhost:8080/WPWebRelease/App.js:5706:139)
>>
>> at Function.YT.getTypeDescriptor (
>> http://localhost:8080/WPWebRelease/App.js:4570:820)
>>
>> at Function.fX.constructBean (
>> http://localhost:8080/WPWebRelease/App.js:2336:472)
>>
>> at r$.J.initialize (http://localhost:8080/WPWebRelease/App.js:5041:66
>> )
>>
>> at OW.J.init (http://localhost:8080/WPWebRelease/App.js:950:452)
>>
>> at OW.J.u (http://localhost:8080/WPWebRelease/App.js:951:454)
>>
>> at $$.J.addBead (http://localhost:8080/WPWebRelease/App.js:357:549)
>>
>>
>>
>> The main difference:
>>
>> project compiled from "SDK-develop" runs fine in js-debug and gives error
>> in js-release and, compiled from "SDK-ROYALE_INTERFACE_INFO" does not
>> launch because of conversion error.
>>
>>
>>
>> Hiedra
>>
>>
>>
>> *De:* Roman Isitua <ro...@gmail.com>
>> *Enviado el:* martes, 28 de diciembre de 2021 15:55
>> *Para:* users@royale.apache.org
>> *Asunto:* Re: Load time is very slow
>>
>>
>>
>> @Harb
>>
>>
>>
>> I have checked out the feature/ROYALE_INTERFACE_INFO branch and compiled
>> asjs and compiler. I have rebuilt my application with modules in release
>> mode.
>>
>>
>>
>> I get the following error when I attempt to launch a module
>>
>>
>>
>>
>>
>> <image001.png>
>>
>>
>>
>>
>>
>> The module loads fine in debug mode
>>
>>
>>
>> <image002.png>
>>
>>
>>
>>
>>
>> Snippets of the log
>>
>>
>>
>> Overview.js:786 Uncaught TypeError: cm.valuesImpl.init is not a function
>> at Rr.Mr.yl (Overview.js:786)
>> at Function.iq.generateMXMLProperties (Overview.js:736)
>> at Rr.hq.generateMXMLAttributes (Overview.js:546)
>> at new Rr (Overview.js:804)
>> at LN.J.loadHandler (FrontEnd.js:1967)
>> Mr.yl @ Overview.js:786
>> iq.generateMXMLProperties @ Overview.js:736
>> hq.generateMXMLAttributes @ Overview.js:546
>> Rr @ Overview.js:804
>> J.loadHandler @ FrontEnd.js:1967
>> load (async)
>> LN.loadModule @ FrontEnd.js:1965
>> dN.loadModule @ FrontEnd.js:2406
>> LD.Un @ FrontEnd.js:1809
>> ny @ FrontEnd.js:123
>> ny @ FrontEnd.js:248
>> iy @ FrontEnd.js:125
>> b @ FrontEnd.js:121
>>
>>
>>
>>
>>
>> I have attached the full log to this email.
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> On Tue, Dec 28, 2021 at 2:51 PM Roman Isitua <ro...@gmail.com>
>> wrote:
>>
>> Hi Maria,
>>
>>
>>
>> Prior to starting this mail discussion "Load time is very slow". I can
>> confirm I have only been compiling in debug mode. My target\javascript\bin\
>> only had js-debug. It was after I upgraded my royale sdk from 0.9.7 to
>> 0.9.8 that I compiled in release mode.
>>
>>
>>
>>
>>
>>
>>
>> On Tue, Dec 28, 2021 at 2:24 PM Maria Jose Esteve <mj...@iest.com>
>> wrote:
>>
>> Hi, @Roman, I think you are doing a double compile can it be? My times
>> are the same as yours and I always compile in debug and release.
>>
>>
>>
>> Look at your target folder " target\javascript\bin\" and if you have two
>> folders: js-debug and js-release you are compiling always double.
>>
>>
>>
>> In my case, the architecture of my project as well as the Maven
>> compilation files (pom.xml) were provided by an external company (we didn't
>> know anything about Maven or Royale at that time) and I understand that
>> this formula was chosen to show us the options we had.
>>
>>
>>
>> A priori and without doing any test as Harb has done, I think that
>> modularity gives us the advantage of compiling parts of the code once and
>> not compiling them again if they are not modified. So far WITH MY
>> COMPILATION TIMES, sometimes more than 1 minute, this is fundamental. But
>> of course, now we have the problem of minification of the modules and it is
>> really a serious problem because it is impossible for us to deploy in
>> production.
>>
>>
>>
>> I will try to separate the compiación realese with a profile and if I
>> succeed I will pass it to you @Roman.
>>
>>
>>
>> @Harb what do you mean by compiling the ROYALE_INTERFACE_INFO branch?
>>
>>
>>
>> Hiedra
>>
>>
>>
>> *De:* Harbs <ha...@gmail.com>
>> *Enviado el:* lunes, 27 de diciembre de 2021 18:32
>> *Para:* users@royale.apache.org
>> *Asunto:* Re: Load time is very slow
>>
>>
>>
>> That doesn’t sound right.
>>
>>
>>
>> Are you sure you’re compiling debug and not release? That sounds like
>> release build times.
>>
>>
>>
>> On Dec 27, 2021, at 3:31 PM, Roman Isitua <ro...@gmail.com> wrote:
>>
>>
>>
>> Wow ! You are using a workstation with a bleeding edge processor.
>>
>>
>>
>> I just compiled my app now. It took 44 seconds. (First compilation after
>> ide start up.) Subsequently compilations are usually 19s to 20s.
>>
>>
>>
>> My application code base is very very small compared to yours. As we
>> continue to add functionality, I expect the compile times to rise.
>>
>>
>>
>>
>>
>>
>>
>>
>
Re: Compiling Modules (was Re: Load time is very slow)
Posted by Harbs <ha...@gmail.com>.
Roman, can you share your full compiler options?
> I decided to remove the below settings completely
> -export-public-symbols=false
> -prevent-rename-protected-symbols=false
> -prevent-rename-public-symbols=false
> -prevent-rename-internal-symbols=false
>
>
> I enabled the below settings
>
> -js-dynamic-access-unknown-members=true;
> -js-default-initializers=true
>
>
> The release version starts up
>
>
>
Hiedra, that’s great!
> On Dec 30, 2021, at 7:15 PM, Roman Isitua <ro...@gmail.com> wrote:
>
>
> Yes. I am testing with the sdk compiled on branch ROYALE_INTERFACE_INFO
>
> On Thu, Dec 30, 2021 at 6:10 PM Maria Jose Esteve <mjesteve@iest.com <ma...@iest.com>> wrote:
> Roman, are you testing with the SDK compiled from the Harb branches, ROYALE_INTERFACE_INFO, or from develop?
>
>
>
> Hiedra
>
>
>
> De: Roman Isitua <romanisitua@gmail.com <ma...@gmail.com>>
> Enviado el: jueves, 30 de diciembre de 2021 16:52
> Para: users@royale.apache.org <ma...@royale.apache.org>
> Asunto: Re: Compiling Modules (was Re: Load time is very slow)
>
>
>
> I decided to remove the below settings completely
> -export-public-symbols=false
> -prevent-rename-protected-symbols=false
> -prevent-rename-public-symbols=false
> -prevent-rename-internal-symbols=false
>
>
> I enabled the below settings
>
> -js-dynamic-access-unknown-members=true;
> -js-default-initializers=true
>
>
> The release version starts up
>
>
>
>
>
>
>
> <image001.png>
>
>
>
>
>
> <image002.png>
>
>
>
> However, the moment I launch a module. I get the below error
>
>
>
> <image003.png>
>
>
>
>
>
> It appears to be failing when I launch the "Overview" module (by clicking the Overview side menu).
>
>
>
> So my current observation is that by retaining only two settings
>
>
>
> -js-dynamic-access-unknown-members=true;
> -js-default-initializers=true
>
>
>
> The release module starts up but the app fails whenever I launch a module.
>
>
>
> The smallest size settings in the documentation do not work. The app does not start up.
>
>
>
> -export-public-symbols=false
> -prevent-rename-protected-symbols=false
> -prevent-rename-public-symbols=false
> -prevent-rename-internal-symbols=false
>
>
>
>
>
>
>
> The error trace is below
>
>
>
>
>
> Uncaught TypeError: cm.valuesImpl.init is not a function
> at Wr.Rr.pl <http://wr.rr.pl/> (Overview.js:792)
> at Function.mq.generateMXMLProperties (Overview.js:743)
> at Wr.lq.generateMXMLAttributes (Overview.js:551)
> at new Wr (Overview.js:810)
> at QN.J.loadHandler (FrontEnd.js:1978)
> 3Overview.js:56 Uncaught TypeError: Cannot read properties of undefined (reading 'prototype')
> at P (Overview.js:56)
> at VG.convert (FrontEnd.js:910)
> at ny (FrontEnd.js:250)
> at HTMLElement.iy (FrontEnd.js:125)
> at HTMLElement.b (FrontEnd.js:121)
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOut (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOver (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOver @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOut (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOut @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOver (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOver @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOut (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOut @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOver (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOver @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOut (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOut @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOver (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOver @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOut (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOut @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
>
>
>
> On Thu, Dec 30, 2021 at 4:32 PM Roman Isitua <romanisitua@gmail.com <ma...@gmail.com>> wrote:
>
> I get the same error even when I set the -js-dynamic-access-unknown-members=true;
>
>
>
> On Thu, Dec 30, 2021 at 4:24 PM Roman Isitua <romanisitua@gmail.com <ma...@gmail.com>> wrote:
>
>
>
> Using the below settings,
>
> -export-public-symbols=false
> -prevent-rename-protected-symbols=false
> -prevent-rename-public-symbols=false
> -prevent-rename-internal-symbols=false
> -js-dynamic-access-unknown-members=false;
>
> -js-default-initializers=true
>
>
> Debug version runs fine. The release version does not start up
>
> <image004.png>
>
>
> I get the below errors
>
> Uncaught TypeError: Cannot read properties of undefined (reading 'apply')
> at KE.hm (FrontEnd.js:1600)
> at XE.M.Fb (FrontEnd.js:943)
> at XE.M.uh (FrontEnd.js:937)
> at FE.M.na <http://fe.m.na/> (FrontEnd.js:497)
> at FE.M.v (FrontEnd.js:497)
> at dR.M.S (FrontEnd.js:213)
> at dR.Nz.S (FrontEnd.js:217)
> at dR.M.start (FrontEnd.js:1396)
> at index.html:45
> :8080/favicon.ico:1 Failed to load resource: the server responded with a status of 404 (Not Found)
>
>
>
>
>
> FrontEnd.js is the start up class for the application. i.e. It implements the Jewel application class.
>
>
>
>
>
>
>
> On Thu, Dec 30, 2021 at 3:19 PM Roman Isitua <romanisitua@gmail.com <ma...@gmail.com>> wrote:
>
> Hi Harb,
>
>
>
> Thanks for your response. I have gone through the documentation. I will do my test again starting with the smallest size option and share my findings.
>
>
>
> Regards,
>
>
>
> On Thu, Dec 30, 2021 at 10:59 AM Harbs <harbs.lists@gmail.com <ma...@gmail.com>> wrote:
>
> Sorry for my deal in responding.
>
>
>
> Let’s take a step back.
>
>
>
> I’m not sure how you are compiling your modules. I just added some content to the module documentation page which explains what compiler options you need while compiling modules. (It still needs some editing.) https://apache.github.io/royale-docs/features/modules#minification <https://apache.github.io/royale-docs/features/modules#minification>
>
>
> Are you using those options?
>
>
>
>
> On Dec 29, 2021, at 2:19 AM, Maria Jose Esteve <mjesteve@iest.com <ma...@iest.com>> wrote:
>
>
>
> Hi, Let me join you with these tests....
>
>
>
> @Harb, I have compiled the SDK from this branch, feature/ROYALE_INTERFACE_INFO, and when running in debug I get this error:
>
>
>
> Message on the PURGE CONSOLE is displayed:
>
>
>
> Cannot convert org.apache.royale.reflection.beads.ClassAliasBead to IBead
>
>
>
> Message in the IDE Window:
>
>
>
> Se produjo una excepción: TypeError: Cannot convert [object Object] to IBead
>
> at App.org.apache.royale.core.ElementWrapper.addBead (http://localhost:8080/WNetSuitePlus/org/apache/royale/core/ElementWrapper.js:114:11 <http://localhost:8080/WNetSuitePlus/org/apache/royale/core/ElementWrapper.js:114:11>)
>
> at App.org.apache.royale.core.HTMLElementWrapper.addBead (http://localhost:8080/WNetSuitePlus/org/apache/royale/core/HTMLElementWrapper.js:43:65 <http://localhost:8080/WNetSuitePlus/org/apache/royale/core/HTMLElementWrapper.js:43:65>)
>
> at App.org.apache.royale.jewel.Application.start (http://localhost:8080/WNetSuitePlus/org/apache/royale/jewel/Application.js:246:10 <http://localhost:8080/WNetSuitePlus/org/apache/royale/jewel/Application.js:246:10>)
>
> at App.App_loadXML (http://localhost:8080/WNetSuitePlus/App.js:1681:25 <http://localhost:8080/WNetSuitePlus/App.js:1681:25>)
>
> at org.apache.royale.net.URLLoader.org.apache.royale.events.EventDispatcher.fireListeners (http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:97:23 <http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:97:23>)
>
> at Function.goog.events.EventTarget.dispatchEventInternal_ (http://localhost:8080/WNetSuitePlus/library/closure/goog/events/eventtarget.js:381:26 <http://localhost:8080/WNetSuitePlus/library/closure/goog/events/eventtarget.js:381:26>)
>
> at org.apache.royale.net.URLLoader.org.apache.royale.events.EventDispatcher.dispatchEvent (http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:72:37 <http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:72:37>)
>
> at org.apache.royale.net.URLLoader.jsEventHandler (http://localhost:8080/WNetSuitePlus/org/apache/royale/net/URLLoader.js:169:12 <http://localhost:8080/WNetSuitePlus/org/apache/royale/net/URLLoader.js:169:12>)
>
>
>
> Call stack:
>
>
>
> <image003.png>
>
>
>
> [INFO] Executing MXMLC in tool group Royale with args: [
>
> -load-config=D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\compile-app-config.xml,
>
> -js-default-initializers=true,
>
> -source-map=true,
>
> -js-dynamic-access-unknown-members=true,
>
> -keep-as3-metadata+=Inject,Dispatcher,EventHandler,Event,PostConstruct,PreDestroy,ViewAdded,ViewRemoved,Bindable,Transient,
>
> -keep-code-with-metadata=Inject,
>
> -show-binding-warnings=false,
>
> -export-public-symbols=false,
>
> -prevent-rename-protected-symbols=false,
>
> -prevent-rename-internal-symbols=false,
>
> -js-output=D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\javascript,
>
> -compiler.targets=JSRoyale,
>
> D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\src\main\royale\App.mxml
>
>
>
>
>
> The release execution does not change, the error is the same as before (SDK compilation from the develop branch):
>
>
>
> Se produjo una excepción: ReferenceError: Error #1065: Variable com.iest.winplusweb.models.MasterConfigSystemModel is not defined.
>
> at yR (http://localhost:8080/WPWebRelease/App.js:3605:1771 <http://localhost:8080/WPWebRelease/App.js:3605:1771>)
>
> at Mya (http://localhost:8080/WPWebRelease/App.js:3343:365 <http://localhost:8080/WPWebRelease/App.js:3343:365>)
>
> at AR.J.usa (http://localhost:8080/WPWebRelease/App.js:434:441 <http://localhost:8080/WPWebRelease/App.js:434:441>)
>
> at GFa.J.fromTypeDefinition (http://localhost:8080/WPWebRelease/App.js:5706:139 <http://localhost:8080/WPWebRelease/App.js:5706:139>)
>
> at Function.YT.getTypeDescriptor (http://localhost:8080/WPWebRelease/App.js:4570:820 <http://localhost:8080/WPWebRelease/App.js:4570:820>)
>
> at Function.fX.constructBean (http://localhost:8080/WPWebRelease/App.js:2336:472 <http://localhost:8080/WPWebRelease/App.js:2336:472>)
>
> at r$.J.initialize (http://localhost:8080/WPWebRelease/App.js:5041:66 <http://localhost:8080/WPWebRelease/App.js:5041:66>)
>
> at OW.J.init (http://localhost:8080/WPWebRelease/App.js:950:452 <http://localhost:8080/WPWebRelease/App.js:950:452>)
>
> at OW.J.u (http://localhost:8080/WPWebRelease/App.js:951:454 <http://localhost:8080/WPWebRelease/App.js:951:454>)
>
> at $$.J.addBead (http://localhost:8080/WPWebRelease/App.js:357:549 <http://localhost:8080/WPWebRelease/App.js:357:549>)
>
>
>
> The main difference:
>
> project compiled from "SDK-develop" runs fine in js-debug and gives error in js-release and, compiled from "SDK-ROYALE_INTERFACE_INFO" does not launch because of conversion error.
>
>
>
> Hiedra
>
>
>
> De: Roman Isitua <romanisitua@gmail.com <ma...@gmail.com>>
> Enviado el: martes, 28 de diciembre de 2021 15:55
> Para: users@royale.apache.org <ma...@royale.apache.org>
> Asunto: Re: Load time is very slow
>
>
>
> @Harb
>
>
>
> I have checked out the feature/ROYALE_INTERFACE_INFO branch and compiled asjs and compiler. I have rebuilt my application with modules in release mode.
>
>
>
> I get the following error when I attempt to launch a module
>
>
>
>
>
> <image001.png>
>
>
>
>
>
> The module loads fine in debug mode
>
>
>
> <image002.png>
>
>
>
>
>
> Snippets of the log
>
>
>
> Overview.js:786 Uncaught TypeError: cm.valuesImpl.init is not a function
> at Rr.Mr.yl (Overview.js:786)
> at Function.iq.generateMXMLProperties (Overview.js:736)
> at Rr.hq.generateMXMLAttributes (Overview.js:546)
> at new Rr (Overview.js:804)
> at LN.J.loadHandler (FrontEnd.js:1967)
> Mr.yl @ Overview.js:786
> iq.generateMXMLProperties @ Overview.js:736
> hq.generateMXMLAttributes @ Overview.js:546
> Rr @ Overview.js:804
> J.loadHandler @ FrontEnd.js:1967
> load (async)
> LN.loadModule @ FrontEnd.js:1965
> dN.loadModule @ FrontEnd.js:2406
> LD.Un @ FrontEnd.js:1809
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:248
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
>
>
>
>
>
> I have attached the full log to this email.
>
>
>
>
>
>
>
>
>
> On Tue, Dec 28, 2021 at 2:51 PM Roman Isitua <romanisitua@gmail.com <ma...@gmail.com>> wrote:
>
> Hi Maria,
>
>
>
> Prior to starting this mail discussion "Load time is very slow". I can confirm I have only been compiling in debug mode. My target\javascript\bin\ only had js-debug. It was after I upgraded my royale sdk from 0.9.7 to 0.9.8 that I compiled in release mode.
>
>
>
>
>
>
>
> On Tue, Dec 28, 2021 at 2:24 PM Maria Jose Esteve <mjesteve@iest.com <ma...@iest.com>> wrote:
>
> Hi, @Roman, I think you are doing a double compile can it be? My times are the same as yours and I always compile in debug and release.
>
>
>
> Look at your target folder " target\javascript\bin\" and if you have two folders: js-debug and js-release you are compiling always double.
>
>
>
> In my case, the architecture of my project as well as the Maven compilation files (pom.xml) were provided by an external company (we didn't know anything about Maven or Royale at that time) and I understand that this formula was chosen to show us the options we had.
>
>
>
> A priori and without doing any test as Harb has done, I think that modularity gives us the advantage of compiling parts of the code once and not compiling them again if they are not modified. So far WITH MY COMPILATION TIMES, sometimes more than 1 minute, this is fundamental. But of course, now we have the problem of minification of the modules and it is really a serious problem because it is impossible for us to deploy in production.
>
>
>
> I will try to separate the compiación realese with a profile and if I succeed I will pass it to you @Roman.
>
>
>
> @Harb what do you mean by compiling the ROYALE_INTERFACE_INFO branch?
>
>
>
> Hiedra
>
>
>
> De: Harbs <harbs.lists@gmail.com <ma...@gmail.com>>
> Enviado el: lunes, 27 de diciembre de 2021 18:32
> Para: users@royale.apache.org <ma...@royale.apache.org>
> Asunto: Re: Load time is very slow
>
>
>
> That doesn’t sound right.
>
>
>
> Are you sure you’re compiling debug and not release? That sounds like release build times.
>
>
>
> On Dec 27, 2021, at 3:31 PM, Roman Isitua <romanisitua@gmail.com <ma...@gmail.com>> wrote:
>
>
>
> Wow ! You are using a workstation with a bleeding edge processor.
>
>
>
> I just compiled my app now. It took 44 seconds. (First compilation after ide start up.) Subsequently compilations are usually 19s to 20s.
>
>
>
> My application code base is very very small compared to yours. As we continue to add functionality, I expect the compile times to rise.
>
>
>
>
>
>
>
Re: Compiling Modules (was Re: Load time is very slow)
Posted by Roman Isitua <ro...@gmail.com>.
Yes. I am testing with the sdk compiled on branch ROYALE_INTERFACE_INFO
On Thu, Dec 30, 2021 at 6:10 PM Maria Jose Esteve <mj...@iest.com> wrote:
> Roman, are you testing with the SDK compiled from the Harb branches,
> ROYALE_INTERFACE_INFO, or from develop?
>
>
>
> Hiedra
>
>
>
> *De:* Roman Isitua <ro...@gmail.com>
> *Enviado el:* jueves, 30 de diciembre de 2021 16:52
> *Para:* users@royale.apache.org
> *Asunto:* Re: Compiling Modules (was Re: Load time is very slow)
>
>
>
> I decided to remove the below settings completely
> -export-public-symbols=false
> -prevent-rename-protected-symbols=false
> -prevent-rename-public-symbols=false
> -prevent-rename-internal-symbols=false
>
>
> I enabled the below settings
>
> -js-dynamic-access-unknown-members=true;
> -js-default-initializers=true
>
>
> The release version starts up
>
>
>
>
>
>
>
>
>
>
>
>
>
> However, the moment I launch a module. I get the below error
>
>
>
>
>
>
>
> It appears to be failing when I launch the "*Overview*" module
> (by clicking the Overview side menu).
>
>
>
> So my current observation is that by retaining only two settings
>
>
>
> -js-dynamic-access-unknown-members=true;
> -js-default-initializers=true
>
>
>
> The release module starts up but the app fails whenever I launch a module.
>
>
>
> The smallest size settings in the documentation do not work. The app does
> not start up.
>
>
>
> -export-public-symbols=false
> -prevent-rename-protected-symbols=false
> -prevent-rename-public-symbols=false
> -prevent-rename-internal-symbols=false
>
>
>
>
>
>
>
> The error trace is below
>
>
>
>
>
> Uncaught TypeError: cm.valuesImpl.init is not a function
> at Wr.Rr.pl (Overview.js:792)
> at Function.mq.generateMXMLProperties (Overview.js:743)
> at Wr.lq.generateMXMLAttributes (Overview.js:551)
> at new Wr (Overview.js:810)
> at QN.J.loadHandler (FrontEnd.js:1978)
> 3Overview.js:56 Uncaught TypeError: Cannot read properties of undefined
> (reading 'prototype')
> at P (Overview.js:56)
> at VG.convert (FrontEnd.js:910)
> at ny (FrontEnd.js:250)
> at HTMLElement.iy (FrontEnd.js:125)
> at HTMLElement.b (FrontEnd.js:121)
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOut (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOver (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOver @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOut (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOut @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOver (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOver @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOut (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOut @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOver (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOver @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOut (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOut @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOver (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOver @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOut (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOut @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
>
>
>
> On Thu, Dec 30, 2021 at 4:32 PM Roman Isitua <ro...@gmail.com>
> wrote:
>
> I get the same error even when I set
> the -js-dynamic-access-unknown-members=true;
>
>
>
> On Thu, Dec 30, 2021 at 4:24 PM Roman Isitua <ro...@gmail.com>
> wrote:
>
>
>
> Using the below settings,
>
> -export-public-symbols=false
> -prevent-rename-protected-symbols=false
> -prevent-rename-public-symbols=false
> -prevent-rename-internal-symbols=false
> -js-dynamic-access-unknown-members=false;
>
> -js-default-initializers=true
>
>
> Debug version runs fine. The release version does not start up
>
>
>
>
> I get the below errors
>
> Uncaught TypeError: Cannot read properties of undefined (reading 'apply')
> at KE.hm (FrontEnd.js:1600)
> at XE.M.Fb (FrontEnd.js:943)
> at XE.M.uh (FrontEnd.js:937)
> at FE.M.na (FrontEnd.js:497)
> at FE.M.v (FrontEnd.js:497)
> at dR.M.S (FrontEnd.js:213)
> at dR.Nz.S (FrontEnd.js:217)
> at dR.M.start (FrontEnd.js:1396)
> at index.html:45
> :8080/favicon.ico:1 Failed to load resource: the server responded with a
> status of 404 (Not Found)
>
>
>
>
>
> FrontEnd.js is the start up class for the application. i.e. It implements
> the Jewel application class.
>
>
>
>
>
>
>
> On Thu, Dec 30, 2021 at 3:19 PM Roman Isitua <ro...@gmail.com>
> wrote:
>
> Hi Harb,
>
>
>
> Thanks for your response. I have gone through the documentation. I will do
> my test again starting with the smallest size option and share my findings.
>
>
>
> Regards,
>
>
>
> On Thu, Dec 30, 2021 at 10:59 AM Harbs <ha...@gmail.com> wrote:
>
> Sorry for my deal in responding.
>
>
>
> Let’s take a step back.
>
>
>
> I’m not sure how you are compiling your modules. I just added some content
> to the module documentation page which explains what compiler options you
> need while compiling modules. (It still needs some editing.)
> https://apache.github.io/royale-docs/features/modules#minification
>
>
>
> Are you using those options?
>
>
>
> On Dec 29, 2021, at 2:19 AM, Maria Jose Esteve <mj...@iest.com> wrote:
>
>
>
> Hi, Let me join you with these tests....
>
>
>
> @Harb, I have compiled the SDK from this branch, feature/ROYALE_INTERFACE_INFO,
> and when running in debug I get this error:
>
>
>
> Message on the PURGE CONSOLE is displayed:
>
>
>
> Cannot convert org.apache.royale.reflection.beads.ClassAliasBead to IBead
>
>
>
> Message in the IDE Window:
>
>
>
> Se produjo una excepción: TypeError: Cannot convert [object Object] to
> IBead
>
> at App.org.apache.royale.core.ElementWrapper.addBead (
> http://localhost:8080/WNetSuitePlus/org/apache/royale/core/ElementWrapper.js:114:11
> )
>
> at App.org.apache.royale.core.HTMLElementWrapper.addBead (
> http://localhost:8080/WNetSuitePlus/org/apache/royale/core/HTMLElementWrapper.js:43:65
> )
>
> at App.org.apache.royale.jewel.Application.start (
> http://localhost:8080/WNetSuitePlus/org/apache/royale/jewel/Application.js:246:10
> )
>
> at App.App_loadXML (http://localhost:8080/WNetSuitePlus/App.js:1681:25
> )
>
> at
> org.apache.royale.net.URLLoader.org.apache.royale.events.EventDispatcher.fireListeners
> (
> http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:97:23
> )
>
> at Function.goog.events.EventTarget.dispatchEventInternal_ (
> http://localhost:8080/WNetSuitePlus/library/closure/goog/events/eventtarget.js:381:26
> )
>
> at
> org.apache.royale.net.URLLoader.org.apache.royale.events.EventDispatcher.dispatchEvent
> (
> http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:72:37
> )
>
> at org.apache.royale.net.URLLoader.jsEventHandler (
> http://localhost:8080/WNetSuitePlus/org/apache/royale/net/URLLoader.js:169:12
> )
>
>
>
> Call stack:
>
>
>
> <image003.png>
>
>
>
> [INFO] Executing MXMLC in tool group Royale with args: [
>
>
> -load-config=D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\compile-app-config.xml,
>
> -js-default-initializers=true,
>
> -source-map=true,
>
> -js-dynamic-access-unknown-members=true,
>
>
> -keep-as3-metadata+=Inject,Dispatcher,EventHandler,Event,PostConstruct,PreDestroy,ViewAdded,ViewRemoved,Bindable,Transient,
>
> -keep-code-with-metadata=Inject,
>
> -show-binding-warnings=false,
>
> -export-public-symbols=false,
>
> -prevent-rename-protected-symbols=false,
>
> -prevent-rename-internal-symbols=false,
>
>
> -js-output=D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\javascript,
>
> -compiler.targets=JSRoyale,
>
>
> D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\src\main\royale\App.mxml
>
>
>
>
>
> The release execution does not change, the error is the same as before
> (SDK compilation from the develop branch):
>
>
>
> Se produjo una excepción: ReferenceError: Error #1065: Variable
> com.iest.winplusweb.models.MasterConfigSystemModel is not defined.
>
> at yR (http://localhost:8080/WPWebRelease/App.js:3605:1771)
>
> at Mya (http://localhost:8080/WPWebRelease/App.js:3343:365)
>
> at AR.J.usa (http://localhost:8080/WPWebRelease/App.js:434:441)
>
> at GFa.J.fromTypeDefinition (
> http://localhost:8080/WPWebRelease/App.js:5706:139)
>
> at Function.YT.getTypeDescriptor (
> http://localhost:8080/WPWebRelease/App.js:4570:820)
>
> at Function.fX.constructBean (
> http://localhost:8080/WPWebRelease/App.js:2336:472)
>
> at r$.J.initialize (http://localhost:8080/WPWebRelease/App.js:5041:66)
>
> at OW.J.init (http://localhost:8080/WPWebRelease/App.js:950:452)
>
> at OW.J.u (http://localhost:8080/WPWebRelease/App.js:951:454)
>
> at $$.J.addBead (http://localhost:8080/WPWebRelease/App.js:357:549)
>
>
>
> The main difference:
>
> project compiled from "SDK-develop" runs fine in js-debug and gives error
> in js-release and, compiled from "SDK-ROYALE_INTERFACE_INFO" does not
> launch because of conversion error.
>
>
>
> Hiedra
>
>
>
> *De:* Roman Isitua <ro...@gmail.com>
> *Enviado el:* martes, 28 de diciembre de 2021 15:55
> *Para:* users@royale.apache.org
> *Asunto:* Re: Load time is very slow
>
>
>
> @Harb
>
>
>
> I have checked out the feature/ROYALE_INTERFACE_INFO branch and compiled
> asjs and compiler. I have rebuilt my application with modules in release
> mode.
>
>
>
> I get the following error when I attempt to launch a module
>
>
>
>
>
> <image001.png>
>
>
>
>
>
> The module loads fine in debug mode
>
>
>
> <image002.png>
>
>
>
>
>
> Snippets of the log
>
>
>
> Overview.js:786 Uncaught TypeError: cm.valuesImpl.init is not a function
> at Rr.Mr.yl (Overview.js:786)
> at Function.iq.generateMXMLProperties (Overview.js:736)
> at Rr.hq.generateMXMLAttributes (Overview.js:546)
> at new Rr (Overview.js:804)
> at LN.J.loadHandler (FrontEnd.js:1967)
> Mr.yl @ Overview.js:786
> iq.generateMXMLProperties @ Overview.js:736
> hq.generateMXMLAttributes @ Overview.js:546
> Rr @ Overview.js:804
> J.loadHandler @ FrontEnd.js:1967
> load (async)
> LN.loadModule @ FrontEnd.js:1965
> dN.loadModule @ FrontEnd.js:2406
> LD.Un @ FrontEnd.js:1809
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:248
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
>
>
>
>
>
> I have attached the full log to this email.
>
>
>
>
>
>
>
>
>
> On Tue, Dec 28, 2021 at 2:51 PM Roman Isitua <ro...@gmail.com>
> wrote:
>
> Hi Maria,
>
>
>
> Prior to starting this mail discussion "Load time is very slow". I can
> confirm I have only been compiling in debug mode. My target\javascript\bin\
> only had js-debug. It was after I upgraded my royale sdk from 0.9.7 to
> 0.9.8 that I compiled in release mode.
>
>
>
>
>
>
>
> On Tue, Dec 28, 2021 at 2:24 PM Maria Jose Esteve <mj...@iest.com>
> wrote:
>
> Hi, @Roman, I think you are doing a double compile can it be? My times are
> the same as yours and I always compile in debug and release.
>
>
>
> Look at your target folder " target\javascript\bin\" and if you have two
> folders: js-debug and js-release you are compiling always double.
>
>
>
> In my case, the architecture of my project as well as the Maven
> compilation files (pom.xml) were provided by an external company (we didn't
> know anything about Maven or Royale at that time) and I understand that
> this formula was chosen to show us the options we had.
>
>
>
> A priori and without doing any test as Harb has done, I think that
> modularity gives us the advantage of compiling parts of the code once and
> not compiling them again if they are not modified. So far WITH MY
> COMPILATION TIMES, sometimes more than 1 minute, this is fundamental. But
> of course, now we have the problem of minification of the modules and it is
> really a serious problem because it is impossible for us to deploy in
> production.
>
>
>
> I will try to separate the compiación realese with a profile and if I
> succeed I will pass it to you @Roman.
>
>
>
> @Harb what do you mean by compiling the ROYALE_INTERFACE_INFO branch?
>
>
>
> Hiedra
>
>
>
> *De:* Harbs <ha...@gmail.com>
> *Enviado el:* lunes, 27 de diciembre de 2021 18:32
> *Para:* users@royale.apache.org
> *Asunto:* Re: Load time is very slow
>
>
>
> That doesn’t sound right.
>
>
>
> Are you sure you’re compiling debug and not release? That sounds like
> release build times.
>
>
>
> On Dec 27, 2021, at 3:31 PM, Roman Isitua <ro...@gmail.com> wrote:
>
>
>
> Wow ! You are using a workstation with a bleeding edge processor.
>
>
>
> I just compiled my app now. It took 44 seconds. (First compilation after
> ide start up.) Subsequently compilations are usually 19s to 20s.
>
>
>
> My application code base is very very small compared to yours. As we
> continue to add functionality, I expect the compile times to rise.
>
>
>
>
>
>
>
>
RE: Compiling Modules (was Re: Load time is very slow)
Posted by Maria Jose Esteve <mj...@iest.com>.
Roman, are you testing with the SDK compiled from the Harb branches, ROYALE_INTERFACE_INFO, or from develop?
Hiedra
De: Roman Isitua <ro...@gmail.com>
Enviado el: jueves, 30 de diciembre de 2021 16:52
Para: users@royale.apache.org
Asunto: Re: Compiling Modules (was Re: Load time is very slow)
I decided to remove the below settings completely
-export-public-symbols=false
-prevent-rename-protected-symbols=false
-prevent-rename-public-symbols=false
-prevent-rename-internal-symbols=false
I enabled the below settings
-js-dynamic-access-unknown-members=true;
-js-default-initializers=true
The release version starts up
[cid:image001.png@01D7FDA8.762B4800]
[cid:image002.png@01D7FDA8.762B4800]
However, the moment I launch a module. I get the below error
[cid:image003.png@01D7FDA8.762B4800]
It appears to be failing when I launch the "Overview" module (by clicking the Overview side menu).
So my current observation is that by retaining only two settings
-js-dynamic-access-unknown-members=true;
-js-default-initializers=true
The release module starts up but the app fails whenever I launch a module.
The smallest size settings in the documentation do not work. The app does not start up.
-export-public-symbols=false
-prevent-rename-protected-symbols=false
-prevent-rename-public-symbols=false
-prevent-rename-internal-symbols=false
The error trace is below
Uncaught TypeError: cm.valuesImpl.init is not a function
at Wr.Rr.pl<http://Wr.Rr.pl> (Overview.js:792)
at Function.mq.generateMXMLProperties (Overview.js:743)
at Wr.lq.generateMXMLAttributes (Overview.js:551)
at new Wr (Overview.js:810)
at QN.J.loadHandler (FrontEnd.js:1978)
3Overview.js:56 Uncaught TypeError: Cannot read properties of undefined (reading 'prototype')
at P (Overview.js:56)
at VG.convert (FrontEnd.js:910)
at ny (FrontEnd.js:250)
at HTMLElement.iy (FrontEnd.js:125)
at HTMLElement.b (FrontEnd.js:121)
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOut (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOver (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOver @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOut (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOut @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOver (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOver @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOut (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOut @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOver (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOver @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOut (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOut @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOver (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOver @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOut (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOut @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
On Thu, Dec 30, 2021 at 4:32 PM Roman Isitua <ro...@gmail.com>> wrote:
I get the same error even when I set the -js-dynamic-access-unknown-members=true;
On Thu, Dec 30, 2021 at 4:24 PM Roman Isitua <ro...@gmail.com>> wrote:
Using the below settings,
-export-public-symbols=false
-prevent-rename-protected-symbols=false
-prevent-rename-public-symbols=false
-prevent-rename-internal-symbols=false
-js-dynamic-access-unknown-members=false;
-js-default-initializers=true
Debug version runs fine. The release version does not start up
[cid:image004.png@01D7FDA8.762B4800]
I get the below errors
Uncaught TypeError: Cannot read properties of undefined (reading 'apply')
at KE.hm (FrontEnd.js:1600)
at XE.M.Fb (FrontEnd.js:943)
at XE.M.uh (FrontEnd.js:937)
at FE.M.na<http://FE.M.na> (FrontEnd.js:497)
at FE.M.v (FrontEnd.js:497)
at dR.M.S (FrontEnd.js:213)
at dR.Nz.S (FrontEnd.js:217)
at dR.M.start (FrontEnd.js:1396)
at index.html:45
:8080/favicon.ico:1 Failed to load resource: the server responded with a status of 404 (Not Found)
FrontEnd.js is the start up class for the application. i.e. It implements the Jewel application class.
On Thu, Dec 30, 2021 at 3:19 PM Roman Isitua <ro...@gmail.com>> wrote:
Hi Harb,
Thanks for your response. I have gone through the documentation. I will do my test again starting with the smallest size option and share my findings.
Regards,
On Thu, Dec 30, 2021 at 10:59 AM Harbs <ha...@gmail.com>> wrote:
Sorry for my deal in responding.
Let’s take a step back.
I’m not sure how you are compiling your modules. I just added some content to the module documentation page which explains what compiler options you need while compiling modules. (It still needs some editing.) https://apache.github.io/royale-docs/features/modules#minification
Are you using those options?
On Dec 29, 2021, at 2:19 AM, Maria Jose Esteve <mj...@iest.com>> wrote:
Hi, Let me join you with these tests....
@Harb, I have compiled the SDK from this branch, feature/ROYALE_INTERFACE_INFO, and when running in debug I get this error:
Message on the PURGE CONSOLE is displayed:
Cannot convert org.apache.royale.reflection.beads.ClassAliasBead to IBead
Message in the IDE Window:
Se produjo una excepción: TypeError: Cannot convert [object Object] to IBead
at App.org.apache.royale.core.ElementWrapper.addBead (http://localhost:8080/WNetSuitePlus/org/apache/royale/core/ElementWrapper.js:114:11)
at App.org.apache.royale.core.HTMLElementWrapper.addBead (http://localhost:8080/WNetSuitePlus/org/apache/royale/core/HTMLElementWrapper.js:43:65)
at App.org.apache.royale.jewel.Application.start (http://localhost:8080/WNetSuitePlus/org/apache/royale/jewel/Application.js:246:10)
at App.App_loadXML (http://localhost:8080/WNetSuitePlus/App.js:1681:25)
at org.apache.royale.net.URLLoader.org.apache.royale.events.EventDispatcher.fireListeners (http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:97:23)
at Function.goog.events.EventTarget.dispatchEventInternal_ (http://localhost:8080/WNetSuitePlus/library/closure/goog/events/eventtarget.js:381:26)
at org.apache.royale.net.URLLoader.org.apache.royale.events.EventDispatcher.dispatchEvent (http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:72:37)
at org.apache.royale.net.URLLoader.jsEventHandler (http://localhost:8080/WNetSuitePlus/org/apache/royale/net/URLLoader.js:169:12)
Call stack:
<image003.png>
[INFO] Executing MXMLC in tool group Royale with args: [
-load-config=D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\compile-app-config.xml,
-js-default-initializers=true,
-source-map=true,
-js-dynamic-access-unknown-members=true,
-keep-as3-metadata+=Inject,Dispatcher,EventHandler,Event,PostConstruct,PreDestroy,ViewAdded,ViewRemoved,Bindable,Transient,
-keep-code-with-metadata=Inject,
-show-binding-warnings=false,
-export-public-symbols=false,
-prevent-rename-protected-symbols=false,
-prevent-rename-internal-symbols=false,
-js-output=D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\javascript,
-compiler.targets=JSRoyale,
D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\src\main\royale\App.mxml
The release execution does not change, the error is the same as before (SDK compilation from the develop branch):
Se produjo una excepción: ReferenceError: Error #1065: Variable com.iest.winplusweb.models.MasterConfigSystemModel is not defined.
at yR (http://localhost:8080/WPWebRelease/App.js:3605:1771)
at Mya (http://localhost:8080/WPWebRelease/App.js:3343:365)
at AR.J.usa (http://localhost:8080/WPWebRelease/App.js:434:441)
at GFa.J.fromTypeDefinition (http://localhost:8080/WPWebRelease/App.js:5706:139)
at Function.YT.getTypeDescriptor (http://localhost:8080/WPWebRelease/App.js:4570:820)
at Function.fX.constructBean (http://localhost:8080/WPWebRelease/App.js:2336:472)
at r$.J.initialize (http://localhost:8080/WPWebRelease/App.js:5041:66)
at OW.J.init (http://localhost:8080/WPWebRelease/App.js:950:452)
at OW.J.u (http://localhost:8080/WPWebRelease/App.js:951:454)
at $$.J.addBead (http://localhost:8080/WPWebRelease/App.js:357:549)
The main difference:
project compiled from "SDK-develop" runs fine in js-debug and gives error in js-release and, compiled from "SDK-ROYALE_INTERFACE_INFO" does not launch because of conversion error.
Hiedra
De: Roman Isitua <ro...@gmail.com>>
Enviado el: martes, 28 de diciembre de 2021 15:55
Para: users@royale.apache.org<ma...@royale.apache.org>
Asunto: Re: Load time is very slow
@Harb
I have checked out the feature/ROYALE_INTERFACE_INFO branch and compiled asjs and compiler. I have rebuilt my application with modules in release mode.
I get the following error when I attempt to launch a module
<image001.png>
The module loads fine in debug mode
<image002.png>
Snippets of the log
Overview.js:786 Uncaught TypeError: cm.valuesImpl.init is not a function
at Rr.Mr.yl (Overview.js:786)
at Function.iq.generateMXMLProperties (Overview.js:736)
at Rr.hq.generateMXMLAttributes (Overview.js:546)
at new Rr (Overview.js:804)
at LN.J.loadHandler (FrontEnd.js:1967)
Mr.yl @ Overview.js:786
iq.generateMXMLProperties @ Overview.js:736
hq.generateMXMLAttributes @ Overview.js:546
Rr @ Overview.js:804
J.loadHandler @ FrontEnd.js:1967
load (async)
LN.loadModule @ FrontEnd.js:1965
dN.loadModule @ FrontEnd.js:2406
LD.Un @ FrontEnd.js:1809
ny @ FrontEnd.js:123
ny @ FrontEnd.js:248
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
I have attached the full log to this email.
On Tue, Dec 28, 2021 at 2:51 PM Roman Isitua <ro...@gmail.com>> wrote:
Hi Maria,
Prior to starting this mail discussion "Load time is very slow". I can confirm I have only been compiling in debug mode. My target\javascript\bin\ only had js-debug. It was after I upgraded my royale sdk from 0.9.7 to 0.9.8 that I compiled in release mode.
On Tue, Dec 28, 2021 at 2:24 PM Maria Jose Esteve <mj...@iest.com>> wrote:
Hi, @Roman, I think you are doing a double compile can it be? My times are the same as yours and I always compile in debug and release.
Look at your target folder " target\javascript\bin\" and if you have two folders: js-debug and js-release you are compiling always double.
In my case, the architecture of my project as well as the Maven compilation files (pom.xml) were provided by an external company (we didn't know anything about Maven or Royale at that time) and I understand that this formula was chosen to show us the options we had.
A priori and without doing any test as Harb has done, I think that modularity gives us the advantage of compiling parts of the code once and not compiling them again if they are not modified. So far WITH MY COMPILATION TIMES, sometimes more than 1 minute, this is fundamental. But of course, now we have the problem of minification of the modules and it is really a serious problem because it is impossible for us to deploy in production.
I will try to separate the compiación realese with a profile and if I succeed I will pass it to you @Roman.
@Harb what do you mean by compiling the ROYALE_INTERFACE_INFO branch?
Hiedra
De: Harbs <ha...@gmail.com>>
Enviado el: lunes, 27 de diciembre de 2021 18:32
Para: users@royale.apache.org<ma...@royale.apache.org>
Asunto: Re: Load time is very slow
That doesn’t sound right.
Are you sure you’re compiling debug and not release? That sounds like release build times.
On Dec 27, 2021, at 3:31 PM, Roman Isitua <ro...@gmail.com>> wrote:
Wow ! You are using a workstation with a bleeding edge processor.
I just compiled my app now. It took 44 seconds. (First compilation after ide start up.) Subsequently compilations are usually 19s to 20s.
My application code base is very very small compared to yours. As we continue to add functionality, I expect the compile times to rise.
Re: Compiling Modules (was Re: Load time is very slow)
Posted by Roman Isitua <ro...@gmail.com>.
I decided to remove the below settings completely
-export-public-symbols=false
-prevent-rename-protected-symbols=false
-prevent-rename-public-symbols=false
-prevent-rename-internal-symbols=false
I enabled the below settings
-js-dynamic-access-unknown-members=true;
-js-default-initializers=true
The release version starts up
[image: image.png]
[image: image.png]
However, the moment I launch a module. I get the below error
[image: image.png]
It appears to be failing when I launch the "*Overview*" module (by clicking
the Overview side menu).
So my current observation is that by retaining only two settings
-js-dynamic-access-unknown-members=true;
-js-default-initializers=true
The release module starts up but the app fails whenever I launch a module.
The smallest size settings in the documentation do not work. The app does
not start up.
-export-public-symbols=false
-prevent-rename-protected-symbols=false
-prevent-rename-public-symbols=false
-prevent-rename-internal-symbols=false
The error trace is below
Uncaught TypeError: cm.valuesImpl.init is not a function
at Wr.Rr.pl (Overview.js:792)
at Function.mq.generateMXMLProperties (Overview.js:743)
at Wr.lq.generateMXMLAttributes (Overview.js:551)
at new Wr (Overview.js:810)
at QN.J.loadHandler (FrontEnd.js:1978)
3Overview.js:56 Uncaught TypeError: Cannot read properties of undefined
(reading 'prototype')
at P (Overview.js:56)
at VG.convert (FrontEnd.js:910)
at ny (FrontEnd.js:250)
at HTMLElement.iy (FrontEnd.js:125)
at HTMLElement.b (FrontEnd.js:121)
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOut (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOver (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOver @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOut (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOut @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOver (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOver @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOut (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOut @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOver (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOver @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOut (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOut @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOver (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOver @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
FrontEnd.js:1649 Uncaught TypeError: M is not a function
at sM.J.handleMouseOut (FrontEnd.js:1649)
at Function.ny [as googFireListener] (FrontEnd.js:123)
at ny (FrontEnd.js:250)
at HTMLAnchorElement.iy (FrontEnd.js:125)
at HTMLAnchorElement.b (FrontEnd.js:121)
J.handleMouseOut @ FrontEnd.js:1649
ny @ FrontEnd.js:123
ny @ FrontEnd.js:250
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
On Thu, Dec 30, 2021 at 4:32 PM Roman Isitua <ro...@gmail.com> wrote:
> I get the same error even when I set
> the -js-dynamic-access-unknown-members=true;
>
> On Thu, Dec 30, 2021 at 4:24 PM Roman Isitua <ro...@gmail.com>
> wrote:
>
>>
>> Using the below settings,
>>
>> -export-public-symbols=false
>> -prevent-rename-protected-symbols=false
>> -prevent-rename-public-symbols=false
>> -prevent-rename-internal-symbols=false
>> -js-dynamic-access-unknown-members=false;
>> -js-default-initializers=true
>>
>>
>> Debug version runs fine. The release version does not start up
>>
>> [image: image.png]
>>
>>
>> I get the below errors
>>
>> Uncaught TypeError: Cannot read properties of undefined (reading 'apply')
>> at KE.hm (FrontEnd.js:1600)
>> at XE.M.Fb (FrontEnd.js:943)
>> at XE.M.uh (FrontEnd.js:937)
>> at FE.M.na (FrontEnd.js:497)
>> at FE.M.v (FrontEnd.js:497)
>> at dR.M.S (FrontEnd.js:213)
>> at dR.Nz.S (FrontEnd.js:217)
>> at dR.M.start (FrontEnd.js:1396)
>> at index.html:45
>> :8080/favicon.ico:1 Failed to load resource: the server responded with a
>> status of 404 (Not Found)
>>
>>
>> FrontEnd.js is the start up class for the application. i.e. It implements
>> the Jewel application class.
>>
>>
>>
>> On Thu, Dec 30, 2021 at 3:19 PM Roman Isitua <ro...@gmail.com>
>> wrote:
>>
>>> Hi Harb,
>>>
>>> Thanks for your response. I have gone through the documentation. I will
>>> do my test again starting with the smallest size option and share my
>>> findings.
>>>
>>> Regards,
>>>
>>> On Thu, Dec 30, 2021 at 10:59 AM Harbs <ha...@gmail.com> wrote:
>>>
>>>> Sorry for my deal in responding.
>>>>
>>>> Let’s take a step back.
>>>>
>>>> I’m not sure how you are compiling your modules. I just added some
>>>> content to the module documentation page which explains what compiler
>>>> options you need while compiling modules. (It still needs some editing.)
>>>> https://apache.github.io/royale-docs/features/modules#minification
>>>>
>>>> Are you using those options?
>>>>
>>>> On Dec 29, 2021, at 2:19 AM, Maria Jose Esteve <mj...@iest.com>
>>>> wrote:
>>>>
>>>> Hi, Let me join you with these tests....
>>>>
>>>> @Harb, I have compiled the SDK from this branch, feature/ROYALE_INTERFACE_INFO,
>>>> and when running in debug I get this error:
>>>>
>>>> Message on the PURGE CONSOLE is displayed:
>>>>
>>>> Cannot convert org.apache.royale.reflection.beads.ClassAliasBead to
>>>> IBead
>>>>
>>>> Message in the IDE Window:
>>>>
>>>> Se produjo una excepción: TypeError: Cannot convert [object Object] to
>>>> IBead
>>>> at App.org.apache.royale.core.ElementWrapper.addBead (
>>>> http://localhost:8080/WNetSuitePlus/org/apache/royale/core/ElementWrapper.js:114:11
>>>> )
>>>> at App.org.apache.royale.core.HTMLElementWrapper.addBead (
>>>> http://localhost:8080/WNetSuitePlus/org/apache/royale/core/HTMLElementWrapper.js:43:65
>>>> )
>>>> at App.org.apache.royale.jewel.Application.start (
>>>> http://localhost:8080/WNetSuitePlus/org/apache/royale/jewel/Application.js:246:10
>>>> )
>>>> at App.App_loadXML (
>>>> http://localhost:8080/WNetSuitePlus/App.js:1681:25)
>>>> at
>>>> org.apache.royale.net.URLLoader.org.apache.royale.events.EventDispatcher.fireListeners
>>>> (
>>>> http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:97:23
>>>> )
>>>> at Function.goog.events.EventTarget.dispatchEventInternal_ (
>>>> http://localhost:8080/WNetSuitePlus/library/closure/goog/events/eventtarget.js:381:26
>>>> )
>>>> at
>>>> org.apache.royale.net.URLLoader.org.apache.royale.events.EventDispatcher.dispatchEvent
>>>> (
>>>> http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:72:37
>>>> )
>>>> at org.apache.royale.net.URLLoader.jsEventHandler (
>>>> http://localhost:8080/WNetSuitePlus/org/apache/royale/net/URLLoader.js:169:12
>>>> )
>>>>
>>>> Call stack:
>>>>
>>>> <image003.png>
>>>>
>>>> [INFO] Executing MXMLC in tool group Royale with args: [
>>>>
>>>> -load-config=D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\compile-app-config.xml,
>>>> -js-default-initializers=true,
>>>> -source-map=true,
>>>> -js-dynamic-access-unknown-members=true,
>>>>
>>>> -keep-as3-metadata+=Inject,Dispatcher,EventHandler,Event,PostConstruct,PreDestroy,ViewAdded,ViewRemoved,Bindable,Transient,
>>>> -keep-code-with-metadata=Inject,
>>>> -show-binding-warnings=false,
>>>> -export-public-symbols=false,
>>>> -prevent-rename-protected-symbols=false,
>>>> -prevent-rename-internal-symbols=false,
>>>>
>>>> -js-output=D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\javascript,
>>>> -compiler.targets=JSRoyale,
>>>>
>>>> D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\src\main\royale\App.mxml
>>>>
>>>>
>>>> The release execution does not change, the error is the same as before
>>>> (SDK compilation from the develop branch):
>>>>
>>>> Se produjo una excepción: ReferenceError: Error #1065: Variable
>>>> com.iest.winplusweb.models.MasterConfigSystemModel is not defined.
>>>> at yR (http://localhost:8080/WPWebRelease/App.js:3605:1771)
>>>> at Mya (http://localhost:8080/WPWebRelease/App.js:3343:365)
>>>> at AR.J.usa (http://localhost:8080/WPWebRelease/App.js:434:441)
>>>> at GFa.J.fromTypeDefinition (
>>>> http://localhost:8080/WPWebRelease/App.js:5706:139)
>>>> at Function.YT.getTypeDescriptor (
>>>> http://localhost:8080/WPWebRelease/App.js:4570:820)
>>>> at Function.fX.constructBean (
>>>> http://localhost:8080/WPWebRelease/App.js:2336:472)
>>>> at r$.J.initialize (
>>>> http://localhost:8080/WPWebRelease/App.js:5041:66)
>>>> at OW.J.init (http://localhost:8080/WPWebRelease/App.js:950:452)
>>>> at OW.J.u (http://localhost:8080/WPWebRelease/App.js:951:454)
>>>> at $$.J.addBead (http://localhost:8080/WPWebRelease/App.js:357:549)
>>>>
>>>> The main difference:
>>>> project compiled from "SDK-develop" runs fine in js-debug and gives
>>>> error in js-release and, compiled from "SDK-ROYALE_INTERFACE_INFO" does not
>>>> launch because of conversion error.
>>>>
>>>> Hiedra
>>>>
>>>> *De:* Roman Isitua <ro...@gmail.com>
>>>> *Enviado el:* martes, 28 de diciembre de 2021 15:55
>>>> *Para:* users@royale.apache.org
>>>> *Asunto:* Re: Load time is very slow
>>>>
>>>> @Harb
>>>>
>>>> I have checked out the feature/ROYALE_INTERFACE_INFO branch and
>>>> compiled asjs and compiler. I have rebuilt my application with modules in
>>>> release mode.
>>>>
>>>> I get the following error when I attempt to launch a module
>>>>
>>>>
>>>> <image001.png>
>>>>
>>>>
>>>> The module loads fine in debug mode
>>>>
>>>> <image002.png>
>>>>
>>>>
>>>> Snippets of the log
>>>>
>>>> Overview.js:786 Uncaught TypeError: cm.valuesImpl.init is not a function
>>>> at Rr.Mr.yl (Overview.js:786)
>>>> at Function.iq.generateMXMLProperties (Overview.js:736)
>>>> at Rr.hq.generateMXMLAttributes (Overview.js:546)
>>>> at new Rr (Overview.js:804)
>>>> at LN.J.loadHandler (FrontEnd.js:1967)
>>>> Mr.yl @ Overview.js:786
>>>> iq.generateMXMLProperties @ Overview.js:736
>>>> hq.generateMXMLAttributes @ Overview.js:546
>>>> Rr @ Overview.js:804
>>>> J.loadHandler @ FrontEnd.js:1967
>>>> load (async)
>>>> LN.loadModule @ FrontEnd.js:1965
>>>> dN.loadModule @ FrontEnd.js:2406
>>>> LD.Un @ FrontEnd.js:1809
>>>> ny @ FrontEnd.js:123
>>>> ny @ FrontEnd.js:248
>>>> iy @ FrontEnd.js:125
>>>> b @ FrontEnd.js:121
>>>>
>>>>
>>>> I have attached the full log to this email.
>>>>
>>>>
>>>>
>>>>
>>>> On Tue, Dec 28, 2021 at 2:51 PM Roman Isitua <ro...@gmail.com>
>>>> wrote:
>>>>
>>>> Hi Maria,
>>>>
>>>> Prior to starting this mail discussion "Load time is very slow". I can
>>>> confirm I have only been compiling in debug mode. My target\javascript\bin\
>>>> only had js-debug. It was after I upgraded my royale sdk from 0.9.7 to
>>>> 0.9.8 that I compiled in release mode.
>>>>
>>>>
>>>>
>>>> On Tue, Dec 28, 2021 at 2:24 PM Maria Jose Esteve <mj...@iest.com>
>>>> wrote:
>>>>
>>>> Hi, @Roman, I think you are doing a double compile can it be? My times
>>>> are the same as yours and I always compile in debug and release.
>>>>
>>>> Look at your target folder " target\javascript\bin\" and if you have
>>>> two folders: js-debug and js-release you are compiling always double.
>>>>
>>>> In my case, the architecture of my project as well as the Maven
>>>> compilation files (pom.xml) were provided by an external company (we didn't
>>>> know anything about Maven or Royale at that time) and I understand that
>>>> this formula was chosen to show us the options we had.
>>>>
>>>> A priori and without doing any test as Harb has done, I think that
>>>> modularity gives us the advantage of compiling parts of the code once and
>>>> not compiling them again if they are not modified. So far WITH MY
>>>> COMPILATION TIMES, sometimes more than 1 minute, this is fundamental. But
>>>> of course, now we have the problem of minification of the modules and it is
>>>> really a serious problem because it is impossible for us to deploy in
>>>> production.
>>>>
>>>> I will try to separate the compiación realese with a profile and if I
>>>> succeed I will pass it to you @Roman.
>>>>
>>>> @Harb what do you mean by compiling the ROYALE_INTERFACE_INFO branch?
>>>>
>>>> Hiedra
>>>>
>>>> *De:* Harbs <ha...@gmail.com>
>>>> *Enviado el:* lunes, 27 de diciembre de 2021 18:32
>>>> *Para:* users@royale.apache.org
>>>> *Asunto:* Re: Load time is very slow
>>>>
>>>> That doesn’t sound right.
>>>>
>>>> Are you sure you’re compiling debug and not release? That sounds like
>>>> release build times.
>>>>
>>>>
>>>>
>>>> On Dec 27, 2021, at 3:31 PM, Roman Isitua <ro...@gmail.com>
>>>> wrote:
>>>>
>>>> Wow ! You are using a workstation with a bleeding edge processor.
>>>>
>>>> I just compiled my app now. It took 44 seconds. (First compilation
>>>> after ide start up.) Subsequently compilations are usually 19s to 20s.
>>>>
>>>> My application code base is very very small compared to yours. As we
>>>> continue to add functionality, I expect the compile times to rise.
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
Re: Compiling Modules (was Re: Load time is very slow)
Posted by Roman Isitua <ro...@gmail.com>.
I get the same error even when I set
the -js-dynamic-access-unknown-members=true;
On Thu, Dec 30, 2021 at 4:24 PM Roman Isitua <ro...@gmail.com> wrote:
>
> Using the below settings,
>
> -export-public-symbols=false
> -prevent-rename-protected-symbols=false
> -prevent-rename-public-symbols=false
> -prevent-rename-internal-symbols=false
> -js-dynamic-access-unknown-members=false;
> -js-default-initializers=true
>
>
> Debug version runs fine. The release version does not start up
>
> [image: image.png]
>
>
> I get the below errors
>
> Uncaught TypeError: Cannot read properties of undefined (reading 'apply')
> at KE.hm (FrontEnd.js:1600)
> at XE.M.Fb (FrontEnd.js:943)
> at XE.M.uh (FrontEnd.js:937)
> at FE.M.na (FrontEnd.js:497)
> at FE.M.v (FrontEnd.js:497)
> at dR.M.S (FrontEnd.js:213)
> at dR.Nz.S (FrontEnd.js:217)
> at dR.M.start (FrontEnd.js:1396)
> at index.html:45
> :8080/favicon.ico:1 Failed to load resource: the server responded with a
> status of 404 (Not Found)
>
>
> FrontEnd.js is the start up class for the application. i.e. It implements
> the Jewel application class.
>
>
>
> On Thu, Dec 30, 2021 at 3:19 PM Roman Isitua <ro...@gmail.com>
> wrote:
>
>> Hi Harb,
>>
>> Thanks for your response. I have gone through the documentation. I will
>> do my test again starting with the smallest size option and share my
>> findings.
>>
>> Regards,
>>
>> On Thu, Dec 30, 2021 at 10:59 AM Harbs <ha...@gmail.com> wrote:
>>
>>> Sorry for my deal in responding.
>>>
>>> Let’s take a step back.
>>>
>>> I’m not sure how you are compiling your modules. I just added some
>>> content to the module documentation page which explains what compiler
>>> options you need while compiling modules. (It still needs some editing.)
>>> https://apache.github.io/royale-docs/features/modules#minification
>>>
>>> Are you using those options?
>>>
>>> On Dec 29, 2021, at 2:19 AM, Maria Jose Esteve <mj...@iest.com>
>>> wrote:
>>>
>>> Hi, Let me join you with these tests....
>>>
>>> @Harb, I have compiled the SDK from this branch, feature/ROYALE_INTERFACE_INFO,
>>> and when running in debug I get this error:
>>>
>>> Message on the PURGE CONSOLE is displayed:
>>>
>>> Cannot convert org.apache.royale.reflection.beads.ClassAliasBead to
>>> IBead
>>>
>>> Message in the IDE Window:
>>>
>>> Se produjo una excepción: TypeError: Cannot convert [object Object] to
>>> IBead
>>> at App.org.apache.royale.core.ElementWrapper.addBead (
>>> http://localhost:8080/WNetSuitePlus/org/apache/royale/core/ElementWrapper.js:114:11
>>> )
>>> at App.org.apache.royale.core.HTMLElementWrapper.addBead (
>>> http://localhost:8080/WNetSuitePlus/org/apache/royale/core/HTMLElementWrapper.js:43:65
>>> )
>>> at App.org.apache.royale.jewel.Application.start (
>>> http://localhost:8080/WNetSuitePlus/org/apache/royale/jewel/Application.js:246:10
>>> )
>>> at App.App_loadXML (
>>> http://localhost:8080/WNetSuitePlus/App.js:1681:25)
>>> at
>>> org.apache.royale.net.URLLoader.org.apache.royale.events.EventDispatcher.fireListeners
>>> (
>>> http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:97:23
>>> )
>>> at Function.goog.events.EventTarget.dispatchEventInternal_ (
>>> http://localhost:8080/WNetSuitePlus/library/closure/goog/events/eventtarget.js:381:26
>>> )
>>> at
>>> org.apache.royale.net.URLLoader.org.apache.royale.events.EventDispatcher.dispatchEvent
>>> (
>>> http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:72:37
>>> )
>>> at org.apache.royale.net.URLLoader.jsEventHandler (
>>> http://localhost:8080/WNetSuitePlus/org/apache/royale/net/URLLoader.js:169:12
>>> )
>>>
>>> Call stack:
>>>
>>> <image003.png>
>>>
>>> [INFO] Executing MXMLC in tool group Royale with args: [
>>>
>>> -load-config=D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\compile-app-config.xml,
>>> -js-default-initializers=true,
>>> -source-map=true,
>>> -js-dynamic-access-unknown-members=true,
>>>
>>> -keep-as3-metadata+=Inject,Dispatcher,EventHandler,Event,PostConstruct,PreDestroy,ViewAdded,ViewRemoved,Bindable,Transient,
>>> -keep-code-with-metadata=Inject,
>>> -show-binding-warnings=false,
>>> -export-public-symbols=false,
>>> -prevent-rename-protected-symbols=false,
>>> -prevent-rename-internal-symbols=false,
>>>
>>> -js-output=D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\javascript,
>>> -compiler.targets=JSRoyale,
>>>
>>> D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\src\main\royale\App.mxml
>>>
>>>
>>> The release execution does not change, the error is the same as before
>>> (SDK compilation from the develop branch):
>>>
>>> Se produjo una excepción: ReferenceError: Error #1065: Variable
>>> com.iest.winplusweb.models.MasterConfigSystemModel is not defined.
>>> at yR (http://localhost:8080/WPWebRelease/App.js:3605:1771)
>>> at Mya (http://localhost:8080/WPWebRelease/App.js:3343:365)
>>> at AR.J.usa (http://localhost:8080/WPWebRelease/App.js:434:441)
>>> at GFa.J.fromTypeDefinition (
>>> http://localhost:8080/WPWebRelease/App.js:5706:139)
>>> at Function.YT.getTypeDescriptor (
>>> http://localhost:8080/WPWebRelease/App.js:4570:820)
>>> at Function.fX.constructBean (
>>> http://localhost:8080/WPWebRelease/App.js:2336:472)
>>> at r$.J.initialize (
>>> http://localhost:8080/WPWebRelease/App.js:5041:66)
>>> at OW.J.init (http://localhost:8080/WPWebRelease/App.js:950:452)
>>> at OW.J.u (http://localhost:8080/WPWebRelease/App.js:951:454)
>>> at $$.J.addBead (http://localhost:8080/WPWebRelease/App.js:357:549)
>>>
>>> The main difference:
>>> project compiled from "SDK-develop" runs fine in js-debug and gives
>>> error in js-release and, compiled from "SDK-ROYALE_INTERFACE_INFO" does not
>>> launch because of conversion error.
>>>
>>> Hiedra
>>>
>>> *De:* Roman Isitua <ro...@gmail.com>
>>> *Enviado el:* martes, 28 de diciembre de 2021 15:55
>>> *Para:* users@royale.apache.org
>>> *Asunto:* Re: Load time is very slow
>>>
>>> @Harb
>>>
>>> I have checked out the feature/ROYALE_INTERFACE_INFO branch and
>>> compiled asjs and compiler. I have rebuilt my application with modules in
>>> release mode.
>>>
>>> I get the following error when I attempt to launch a module
>>>
>>>
>>> <image001.png>
>>>
>>>
>>> The module loads fine in debug mode
>>>
>>> <image002.png>
>>>
>>>
>>> Snippets of the log
>>>
>>> Overview.js:786 Uncaught TypeError: cm.valuesImpl.init is not a function
>>> at Rr.Mr.yl (Overview.js:786)
>>> at Function.iq.generateMXMLProperties (Overview.js:736)
>>> at Rr.hq.generateMXMLAttributes (Overview.js:546)
>>> at new Rr (Overview.js:804)
>>> at LN.J.loadHandler (FrontEnd.js:1967)
>>> Mr.yl @ Overview.js:786
>>> iq.generateMXMLProperties @ Overview.js:736
>>> hq.generateMXMLAttributes @ Overview.js:546
>>> Rr @ Overview.js:804
>>> J.loadHandler @ FrontEnd.js:1967
>>> load (async)
>>> LN.loadModule @ FrontEnd.js:1965
>>> dN.loadModule @ FrontEnd.js:2406
>>> LD.Un @ FrontEnd.js:1809
>>> ny @ FrontEnd.js:123
>>> ny @ FrontEnd.js:248
>>> iy @ FrontEnd.js:125
>>> b @ FrontEnd.js:121
>>>
>>>
>>> I have attached the full log to this email.
>>>
>>>
>>>
>>>
>>> On Tue, Dec 28, 2021 at 2:51 PM Roman Isitua <ro...@gmail.com>
>>> wrote:
>>>
>>> Hi Maria,
>>>
>>> Prior to starting this mail discussion "Load time is very slow". I can
>>> confirm I have only been compiling in debug mode. My target\javascript\bin\
>>> only had js-debug. It was after I upgraded my royale sdk from 0.9.7 to
>>> 0.9.8 that I compiled in release mode.
>>>
>>>
>>>
>>> On Tue, Dec 28, 2021 at 2:24 PM Maria Jose Esteve <mj...@iest.com>
>>> wrote:
>>>
>>> Hi, @Roman, I think you are doing a double compile can it be? My times
>>> are the same as yours and I always compile in debug and release.
>>>
>>> Look at your target folder " target\javascript\bin\" and if you have
>>> two folders: js-debug and js-release you are compiling always double.
>>>
>>> In my case, the architecture of my project as well as the Maven
>>> compilation files (pom.xml) were provided by an external company (we didn't
>>> know anything about Maven or Royale at that time) and I understand that
>>> this formula was chosen to show us the options we had.
>>>
>>> A priori and without doing any test as Harb has done, I think that
>>> modularity gives us the advantage of compiling parts of the code once and
>>> not compiling them again if they are not modified. So far WITH MY
>>> COMPILATION TIMES, sometimes more than 1 minute, this is fundamental. But
>>> of course, now we have the problem of minification of the modules and it is
>>> really a serious problem because it is impossible for us to deploy in
>>> production.
>>>
>>> I will try to separate the compiación realese with a profile and if I
>>> succeed I will pass it to you @Roman.
>>>
>>> @Harb what do you mean by compiling the ROYALE_INTERFACE_INFO branch?
>>>
>>> Hiedra
>>>
>>> *De:* Harbs <ha...@gmail.com>
>>> *Enviado el:* lunes, 27 de diciembre de 2021 18:32
>>> *Para:* users@royale.apache.org
>>> *Asunto:* Re: Load time is very slow
>>>
>>> That doesn’t sound right.
>>>
>>> Are you sure you’re compiling debug and not release? That sounds like
>>> release build times.
>>>
>>>
>>>
>>> On Dec 27, 2021, at 3:31 PM, Roman Isitua <ro...@gmail.com> wrote:
>>>
>>> Wow ! You are using a workstation with a bleeding edge processor.
>>>
>>> I just compiled my app now. It took 44 seconds. (First compilation
>>> after ide start up.) Subsequently compilations are usually 19s to 20s.
>>>
>>> My application code base is very very small compared to yours. As we
>>> continue to add functionality, I expect the compile times to rise.
>>>
>>>
>>>
>>>
>>>
>>>
Re: Compiling Modules (was Re: Load time is very slow)
Posted by Roman Isitua <ro...@gmail.com>.
Using the below settings,
-export-public-symbols=false
-prevent-rename-protected-symbols=false
-prevent-rename-public-symbols=false
-prevent-rename-internal-symbols=false
-js-dynamic-access-unknown-members=false;
-js-default-initializers=true
Debug version runs fine. The release version does not start up
[image: image.png]
I get the below errors
Uncaught TypeError: Cannot read properties of undefined (reading 'apply')
at KE.hm (FrontEnd.js:1600)
at XE.M.Fb (FrontEnd.js:943)
at XE.M.uh (FrontEnd.js:937)
at FE.M.na (FrontEnd.js:497)
at FE.M.v (FrontEnd.js:497)
at dR.M.S (FrontEnd.js:213)
at dR.Nz.S (FrontEnd.js:217)
at dR.M.start (FrontEnd.js:1396)
at index.html:45
:8080/favicon.ico:1 Failed to load resource: the server responded with a
status of 404 (Not Found)
FrontEnd.js is the start up class for the application. i.e. It implements
the Jewel application class.
On Thu, Dec 30, 2021 at 3:19 PM Roman Isitua <ro...@gmail.com> wrote:
> Hi Harb,
>
> Thanks for your response. I have gone through the documentation. I will do
> my test again starting with the smallest size option and share my findings.
>
> Regards,
>
> On Thu, Dec 30, 2021 at 10:59 AM Harbs <ha...@gmail.com> wrote:
>
>> Sorry for my deal in responding.
>>
>> Let’s take a step back.
>>
>> I’m not sure how you are compiling your modules. I just added some
>> content to the module documentation page which explains what compiler
>> options you need while compiling modules. (It still needs some editing.)
>> https://apache.github.io/royale-docs/features/modules#minification
>>
>> Are you using those options?
>>
>> On Dec 29, 2021, at 2:19 AM, Maria Jose Esteve <mj...@iest.com> wrote:
>>
>> Hi, Let me join you with these tests....
>>
>> @Harb, I have compiled the SDK from this branch, feature/ROYALE_INTERFACE_INFO,
>> and when running in debug I get this error:
>>
>> Message on the PURGE CONSOLE is displayed:
>>
>> Cannot convert org.apache.royale.reflection.beads.ClassAliasBead to
>> IBead
>>
>> Message in the IDE Window:
>>
>> Se produjo una excepción: TypeError: Cannot convert [object Object] to
>> IBead
>> at App.org.apache.royale.core.ElementWrapper.addBead (
>> http://localhost:8080/WNetSuitePlus/org/apache/royale/core/ElementWrapper.js:114:11
>> )
>> at App.org.apache.royale.core.HTMLElementWrapper.addBead (
>> http://localhost:8080/WNetSuitePlus/org/apache/royale/core/HTMLElementWrapper.js:43:65
>> )
>> at App.org.apache.royale.jewel.Application.start (
>> http://localhost:8080/WNetSuitePlus/org/apache/royale/jewel/Application.js:246:10
>> )
>> at App.App_loadXML (
>> http://localhost:8080/WNetSuitePlus/App.js:1681:25)
>> at
>> org.apache.royale.net.URLLoader.org.apache.royale.events.EventDispatcher.fireListeners
>> (
>> http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:97:23
>> )
>> at Function.goog.events.EventTarget.dispatchEventInternal_ (
>> http://localhost:8080/WNetSuitePlus/library/closure/goog/events/eventtarget.js:381:26
>> )
>> at
>> org.apache.royale.net.URLLoader.org.apache.royale.events.EventDispatcher.dispatchEvent
>> (
>> http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:72:37
>> )
>> at org.apache.royale.net.URLLoader.jsEventHandler (
>> http://localhost:8080/WNetSuitePlus/org/apache/royale/net/URLLoader.js:169:12
>> )
>>
>> Call stack:
>>
>> <image003.png>
>>
>> [INFO] Executing MXMLC in tool group Royale with args: [
>>
>> -load-config=D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\compile-app-config.xml,
>> -js-default-initializers=true,
>> -source-map=true,
>> -js-dynamic-access-unknown-members=true,
>>
>> -keep-as3-metadata+=Inject,Dispatcher,EventHandler,Event,PostConstruct,PreDestroy,ViewAdded,ViewRemoved,Bindable,Transient,
>> -keep-code-with-metadata=Inject,
>> -show-binding-warnings=false,
>> -export-public-symbols=false,
>> -prevent-rename-protected-symbols=false,
>> -prevent-rename-internal-symbols=false,
>>
>> -js-output=D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\javascript,
>> -compiler.targets=JSRoyale,
>>
>> D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\src\main\royale\App.mxml
>>
>>
>> The release execution does not change, the error is the same as before
>> (SDK compilation from the develop branch):
>>
>> Se produjo una excepción: ReferenceError: Error #1065: Variable
>> com.iest.winplusweb.models.MasterConfigSystemModel is not defined.
>> at yR (http://localhost:8080/WPWebRelease/App.js:3605:1771)
>> at Mya (http://localhost:8080/WPWebRelease/App.js:3343:365)
>> at AR.J.usa (http://localhost:8080/WPWebRelease/App.js:434:441)
>> at GFa.J.fromTypeDefinition (
>> http://localhost:8080/WPWebRelease/App.js:5706:139)
>> at Function.YT.getTypeDescriptor (
>> http://localhost:8080/WPWebRelease/App.js:4570:820)
>> at Function.fX.constructBean (
>> http://localhost:8080/WPWebRelease/App.js:2336:472)
>> at r$.J.initialize (http://localhost:8080/WPWebRelease/App.js:5041:66
>> )
>> at OW.J.init (http://localhost:8080/WPWebRelease/App.js:950:452)
>> at OW.J.u (http://localhost:8080/WPWebRelease/App.js:951:454)
>> at $$.J.addBead (http://localhost:8080/WPWebRelease/App.js:357:549)
>>
>> The main difference:
>> project compiled from "SDK-develop" runs fine in js-debug and gives error
>> in js-release and, compiled from "SDK-ROYALE_INTERFACE_INFO" does not
>> launch because of conversion error.
>>
>> Hiedra
>>
>> *De:* Roman Isitua <ro...@gmail.com>
>> *Enviado el:* martes, 28 de diciembre de 2021 15:55
>> *Para:* users@royale.apache.org
>> *Asunto:* Re: Load time is very slow
>>
>> @Harb
>>
>> I have checked out the feature/ROYALE_INTERFACE_INFO branch and compiled
>> asjs and compiler. I have rebuilt my application with modules in release
>> mode.
>>
>> I get the following error when I attempt to launch a module
>>
>>
>> <image001.png>
>>
>>
>> The module loads fine in debug mode
>>
>> <image002.png>
>>
>>
>> Snippets of the log
>>
>> Overview.js:786 Uncaught TypeError: cm.valuesImpl.init is not a function
>> at Rr.Mr.yl (Overview.js:786)
>> at Function.iq.generateMXMLProperties (Overview.js:736)
>> at Rr.hq.generateMXMLAttributes (Overview.js:546)
>> at new Rr (Overview.js:804)
>> at LN.J.loadHandler (FrontEnd.js:1967)
>> Mr.yl @ Overview.js:786
>> iq.generateMXMLProperties @ Overview.js:736
>> hq.generateMXMLAttributes @ Overview.js:546
>> Rr @ Overview.js:804
>> J.loadHandler @ FrontEnd.js:1967
>> load (async)
>> LN.loadModule @ FrontEnd.js:1965
>> dN.loadModule @ FrontEnd.js:2406
>> LD.Un @ FrontEnd.js:1809
>> ny @ FrontEnd.js:123
>> ny @ FrontEnd.js:248
>> iy @ FrontEnd.js:125
>> b @ FrontEnd.js:121
>>
>>
>> I have attached the full log to this email.
>>
>>
>>
>>
>> On Tue, Dec 28, 2021 at 2:51 PM Roman Isitua <ro...@gmail.com>
>> wrote:
>>
>> Hi Maria,
>>
>> Prior to starting this mail discussion "Load time is very slow". I can
>> confirm I have only been compiling in debug mode. My target\javascript\bin\
>> only had js-debug. It was after I upgraded my royale sdk from 0.9.7 to
>> 0.9.8 that I compiled in release mode.
>>
>>
>>
>> On Tue, Dec 28, 2021 at 2:24 PM Maria Jose Esteve <mj...@iest.com>
>> wrote:
>>
>> Hi, @Roman, I think you are doing a double compile can it be? My times
>> are the same as yours and I always compile in debug and release.
>>
>> Look at your target folder " target\javascript\bin\" and if you have two
>> folders: js-debug and js-release you are compiling always double.
>>
>> In my case, the architecture of my project as well as the Maven
>> compilation files (pom.xml) were provided by an external company (we didn't
>> know anything about Maven or Royale at that time) and I understand that
>> this formula was chosen to show us the options we had.
>>
>> A priori and without doing any test as Harb has done, I think that
>> modularity gives us the advantage of compiling parts of the code once and
>> not compiling them again if they are not modified. So far WITH MY
>> COMPILATION TIMES, sometimes more than 1 minute, this is fundamental. But
>> of course, now we have the problem of minification of the modules and it is
>> really a serious problem because it is impossible for us to deploy in
>> production.
>>
>> I will try to separate the compiación realese with a profile and if I
>> succeed I will pass it to you @Roman.
>>
>> @Harb what do you mean by compiling the ROYALE_INTERFACE_INFO branch?
>>
>> Hiedra
>>
>> *De:* Harbs <ha...@gmail.com>
>> *Enviado el:* lunes, 27 de diciembre de 2021 18:32
>> *Para:* users@royale.apache.org
>> *Asunto:* Re: Load time is very slow
>>
>> That doesn’t sound right.
>>
>> Are you sure you’re compiling debug and not release? That sounds like
>> release build times.
>>
>>
>>
>> On Dec 27, 2021, at 3:31 PM, Roman Isitua <ro...@gmail.com> wrote:
>>
>> Wow ! You are using a workstation with a bleeding edge processor.
>>
>> I just compiled my app now. It took 44 seconds. (First compilation after
>> ide start up.) Subsequently compilations are usually 19s to 20s.
>>
>> My application code base is very very small compared to yours. As we
>> continue to add functionality, I expect the compile times to rise.
>>
>>
>>
>>
>>
>>
Re: Compiling Modules (was Re: Load time is very slow)
Posted by Roman Isitua <ro...@gmail.com>.
Hi Harb,
Thanks for your response. I have gone through the documentation. I will do
my test again starting with the smallest size option and share my findings.
Regards,
On Thu, Dec 30, 2021 at 10:59 AM Harbs <ha...@gmail.com> wrote:
> Sorry for my deal in responding.
>
> Let’s take a step back.
>
> I’m not sure how you are compiling your modules. I just added some content
> to the module documentation page which explains what compiler options you
> need while compiling modules. (It still needs some editing.)
> https://apache.github.io/royale-docs/features/modules#minification
>
> Are you using those options?
>
> On Dec 29, 2021, at 2:19 AM, Maria Jose Esteve <mj...@iest.com> wrote:
>
> Hi, Let me join you with these tests....
>
> @Harb, I have compiled the SDK from this branch, feature/ROYALE_INTERFACE_INFO,
> and when running in debug I get this error:
>
> Message on the PURGE CONSOLE is displayed:
>
> Cannot convert org.apache.royale.reflection.beads.ClassAliasBead to IBead
>
> Message in the IDE Window:
>
> Se produjo una excepción: TypeError: Cannot convert [object Object] to
> IBead
> at App.org.apache.royale.core.ElementWrapper.addBead (
> http://localhost:8080/WNetSuitePlus/org/apache/royale/core/ElementWrapper.js:114:11
> )
> at App.org.apache.royale.core.HTMLElementWrapper.addBead (
> http://localhost:8080/WNetSuitePlus/org/apache/royale/core/HTMLElementWrapper.js:43:65
> )
> at App.org.apache.royale.jewel.Application.start (
> http://localhost:8080/WNetSuitePlus/org/apache/royale/jewel/Application.js:246:10
> )
> at App.App_loadXML (http://localhost:8080/WNetSuitePlus/App.js:1681:25
> )
> at
> org.apache.royale.net.URLLoader.org.apache.royale.events.EventDispatcher.fireListeners
> (
> http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:97:23
> )
> at Function.goog.events.EventTarget.dispatchEventInternal_ (
> http://localhost:8080/WNetSuitePlus/library/closure/goog/events/eventtarget.js:381:26
> )
> at
> org.apache.royale.net.URLLoader.org.apache.royale.events.EventDispatcher.dispatchEvent
> (
> http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:72:37
> )
> at org.apache.royale.net.URLLoader.jsEventHandler (
> http://localhost:8080/WNetSuitePlus/org/apache/royale/net/URLLoader.js:169:12
> )
>
> Call stack:
>
> <image003.png>
>
> [INFO] Executing MXMLC in tool group Royale with args: [
>
> -load-config=D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\compile-app-config.xml,
> -js-default-initializers=true,
> -source-map=true,
> -js-dynamic-access-unknown-members=true,
>
> -keep-as3-metadata+=Inject,Dispatcher,EventHandler,Event,PostConstruct,PreDestroy,ViewAdded,ViewRemoved,Bindable,Transient,
> -keep-code-with-metadata=Inject,
> -show-binding-warnings=false,
> -export-public-symbols=false,
> -prevent-rename-protected-symbols=false,
> -prevent-rename-internal-symbols=false,
>
> -js-output=D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\javascript,
> -compiler.targets=JSRoyale,
>
> D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\src\main\royale\App.mxml
>
>
> The release execution does not change, the error is the same as before
> (SDK compilation from the develop branch):
>
> Se produjo una excepción: ReferenceError: Error #1065: Variable
> com.iest.winplusweb.models.MasterConfigSystemModel is not defined.
> at yR (http://localhost:8080/WPWebRelease/App.js:3605:1771)
> at Mya (http://localhost:8080/WPWebRelease/App.js:3343:365)
> at AR.J.usa (http://localhost:8080/WPWebRelease/App.js:434:441)
> at GFa.J.fromTypeDefinition (
> http://localhost:8080/WPWebRelease/App.js:5706:139)
> at Function.YT.getTypeDescriptor (
> http://localhost:8080/WPWebRelease/App.js:4570:820)
> at Function.fX.constructBean (
> http://localhost:8080/WPWebRelease/App.js:2336:472)
> at r$.J.initialize (http://localhost:8080/WPWebRelease/App.js:5041:66)
> at OW.J.init (http://localhost:8080/WPWebRelease/App.js:950:452)
> at OW.J.u (http://localhost:8080/WPWebRelease/App.js:951:454)
> at $$.J.addBead (http://localhost:8080/WPWebRelease/App.js:357:549)
>
> The main difference:
> project compiled from "SDK-develop" runs fine in js-debug and gives error
> in js-release and, compiled from "SDK-ROYALE_INTERFACE_INFO" does not
> launch because of conversion error.
>
> Hiedra
>
> *De:* Roman Isitua <ro...@gmail.com>
> *Enviado el:* martes, 28 de diciembre de 2021 15:55
> *Para:* users@royale.apache.org
> *Asunto:* Re: Load time is very slow
>
> @Harb
>
> I have checked out the feature/ROYALE_INTERFACE_INFO branch and compiled
> asjs and compiler. I have rebuilt my application with modules in release
> mode.
>
> I get the following error when I attempt to launch a module
>
>
> <image001.png>
>
>
> The module loads fine in debug mode
>
> <image002.png>
>
>
> Snippets of the log
>
> Overview.js:786 Uncaught TypeError: cm.valuesImpl.init is not a function
> at Rr.Mr.yl (Overview.js:786)
> at Function.iq.generateMXMLProperties (Overview.js:736)
> at Rr.hq.generateMXMLAttributes (Overview.js:546)
> at new Rr (Overview.js:804)
> at LN.J.loadHandler (FrontEnd.js:1967)
> Mr.yl @ Overview.js:786
> iq.generateMXMLProperties @ Overview.js:736
> hq.generateMXMLAttributes @ Overview.js:546
> Rr @ Overview.js:804
> J.loadHandler @ FrontEnd.js:1967
> load (async)
> LN.loadModule @ FrontEnd.js:1965
> dN.loadModule @ FrontEnd.js:2406
> LD.Un @ FrontEnd.js:1809
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:248
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
>
>
> I have attached the full log to this email.
>
>
>
>
> On Tue, Dec 28, 2021 at 2:51 PM Roman Isitua <ro...@gmail.com>
> wrote:
>
> Hi Maria,
>
> Prior to starting this mail discussion "Load time is very slow". I can
> confirm I have only been compiling in debug mode. My target\javascript\bin\
> only had js-debug. It was after I upgraded my royale sdk from 0.9.7 to
> 0.9.8 that I compiled in release mode.
>
>
>
> On Tue, Dec 28, 2021 at 2:24 PM Maria Jose Esteve <mj...@iest.com>
> wrote:
>
> Hi, @Roman, I think you are doing a double compile can it be? My times are
> the same as yours and I always compile in debug and release.
>
> Look at your target folder " target\javascript\bin\" and if you have two
> folders: js-debug and js-release you are compiling always double.
>
> In my case, the architecture of my project as well as the Maven
> compilation files (pom.xml) were provided by an external company (we didn't
> know anything about Maven or Royale at that time) and I understand that
> this formula was chosen to show us the options we had.
>
> A priori and without doing any test as Harb has done, I think that
> modularity gives us the advantage of compiling parts of the code once and
> not compiling them again if they are not modified. So far WITH MY
> COMPILATION TIMES, sometimes more than 1 minute, this is fundamental. But
> of course, now we have the problem of minification of the modules and it is
> really a serious problem because it is impossible for us to deploy in
> production.
>
> I will try to separate the compiación realese with a profile and if I
> succeed I will pass it to you @Roman.
>
> @Harb what do you mean by compiling the ROYALE_INTERFACE_INFO branch?
>
> Hiedra
>
> *De:* Harbs <ha...@gmail.com>
> *Enviado el:* lunes, 27 de diciembre de 2021 18:32
> *Para:* users@royale.apache.org
> *Asunto:* Re: Load time is very slow
>
> That doesn’t sound right.
>
> Are you sure you’re compiling debug and not release? That sounds like
> release build times.
>
>
>
> On Dec 27, 2021, at 3:31 PM, Roman Isitua <ro...@gmail.com> wrote:
>
> Wow ! You are using a workstation with a bleeding edge processor.
>
> I just compiled my app now. It took 44 seconds. (First compilation after
> ide start up.) Subsequently compilations are usually 19s to 20s.
>
> My application code base is very very small compared to yours. As we
> continue to add functionality, I expect the compile times to rise.
>
>
>
>
>
>
RE: Compiling Modules (was Re: Load time is very slow)
Posted by Maria Jose Esteve <mj...@iest.com>.
No worries Harb.
I posted another message after this one because I hadn't gotten the SDK compilation right:
(Answering your question... YES, I USE THEM ALL!!!! 😝. This coming week I have a vacation, I'll go through it, understanding what each of the compiler options does and come back here to comment on them)
De: Maria Jose Esteve <mj...@iest.com>
Enviado el: miércoles, 29 de diciembre de 2021 3:06
Para: users@royale.apache.org
Asunto: RE: Load time is very slow
Sorry, the previous tests WERE NOT CORRECT because I was not in the ROYALE_INTERFACE_INFO branch of royale-asjs.
Now I have compiled in the correct branches of royale-compiler and royale-asjs and the result, in my case, is the same as before:
- Debug execution, everything ok
- Execution release error:
[cid:image001.png@01D7FD8B.BF0A3E40]
MasterConfigSystemModel is in my library, inside one of the modules.
This result is the same as the build, develop, of the full SDK as of 23.12.2021.
Hiedra
De: Harbs <ha...@gmail.com>
Enviado el: jueves, 30 de diciembre de 2021 10:59
Para: users@royale.apache.org
Asunto: Compiling Modules (was Re: Load time is very slow)
Sorry for my deal in responding.
Let’s take a step back.
I’m not sure how you are compiling your modules. I just added some content to the module documentation page which explains what compiler options you need while compiling modules. (It still needs some editing.) https://apache.github.io/royale-docs/features/modules#minification
Are you using those options?
On Dec 29, 2021, at 2:19 AM, Maria Jose Esteve <mj...@iest.com>> wrote:
Hi, Let me join you with these tests....
@Harb, I have compiled the SDK from this branch, feature/ROYALE_INTERFACE_INFO, and when running in debug I get this error:
Message on the PURGE CONSOLE is displayed:
Cannot convert org.apache.royale.reflection.beads.ClassAliasBead to IBead
Message in the IDE Window:
Se produjo una excepción: TypeError: Cannot convert [object Object] to IBead
at App.org.apache.royale.core.ElementWrapper.addBead (http://localhost:8080/WNetSuitePlus/org/apache/royale/core/ElementWrapper.js:114:11)
at App.org.apache.royale.core.HTMLElementWrapper.addBead (http://localhost:8080/WNetSuitePlus/org/apache/royale/core/HTMLElementWrapper.js:43:65)
at App.org.apache.royale.jewel.Application.start (http://localhost:8080/WNetSuitePlus/org/apache/royale/jewel/Application.js:246:10)
at App.App_loadXML (http://localhost:8080/WNetSuitePlus/App.js:1681:25)
at org.apache.royale.net.URLLoader.org.apache.royale.events.EventDispatcher.fireListeners (http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:97:23)
at Function.goog.events.EventTarget.dispatchEventInternal_ (http://localhost:8080/WNetSuitePlus/library/closure/goog/events/eventtarget.js:381:26)
at org.apache.royale.net.URLLoader.org.apache.royale.events.EventDispatcher.dispatchEvent (http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:72:37)
at org.apache.royale.net.URLLoader.jsEventHandler (http://localhost:8080/WNetSuitePlus/org/apache/royale/net/URLLoader.js:169:12)
Call stack:
<image003.png>
[INFO] Executing MXMLC in tool group Royale with args: [
-load-config=D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\compile-app-config.xml,
-js-default-initializers=true,
-source-map=true,
-js-dynamic-access-unknown-members=true,
-keep-as3-metadata+=Inject,Dispatcher,EventHandler,Event,PostConstruct,PreDestroy,ViewAdded,ViewRemoved,Bindable,Transient,
-keep-code-with-metadata=Inject,
-show-binding-warnings=false,
-export-public-symbols=false,
-prevent-rename-protected-symbols=false,
-prevent-rename-internal-symbols=false,
-js-output=D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\javascript,
-compiler.targets=JSRoyale,
D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\src\main\royale\App.mxml
The release execution does not change, the error is the same as before (SDK compilation from the develop branch):
Se produjo una excepción: ReferenceError: Error #1065: Variable com.iest.winplusweb.models.MasterConfigSystemModel is not defined.
at yR (http://localhost:8080/WPWebRelease/App.js:3605:1771)
at Mya (http://localhost:8080/WPWebRelease/App.js:3343:365)
at AR.J.usa (http://localhost:8080/WPWebRelease/App.js:434:441)
at GFa.J.fromTypeDefinition (http://localhost:8080/WPWebRelease/App.js:5706:139)
at Function.YT.getTypeDescriptor (http://localhost:8080/WPWebRelease/App.js:4570:820)
at Function.fX.constructBean (http://localhost:8080/WPWebRelease/App.js:2336:472)
at r$.J.initialize (http://localhost:8080/WPWebRelease/App.js:5041:66)
at OW.J.init (http://localhost:8080/WPWebRelease/App.js:950:452)
at OW.J.u (http://localhost:8080/WPWebRelease/App.js:951:454)
at $$.J.addBead (http://localhost:8080/WPWebRelease/App.js:357:549)
The main difference:
project compiled from "SDK-develop" runs fine in js-debug and gives error in js-release and, compiled from "SDK-ROYALE_INTERFACE_INFO" does not launch because of conversion error.
Hiedra
De: Roman Isitua <ro...@gmail.com>>
Enviado el: martes, 28 de diciembre de 2021 15:55
Para: users@royale.apache.org<ma...@royale.apache.org>
Asunto: Re: Load time is very slow
@Harb
I have checked out the feature/ROYALE_INTERFACE_INFO branch and compiled asjs and compiler. I have rebuilt my application with modules in release mode.
I get the following error when I attempt to launch a module
<image001.png>
The module loads fine in debug mode
<image002.png>
Snippets of the log
Overview.js:786 Uncaught TypeError: cm.valuesImpl.init is not a function
at Rr.Mr.yl (Overview.js:786)
at Function.iq.generateMXMLProperties (Overview.js:736)
at Rr.hq.generateMXMLAttributes (Overview.js:546)
at new Rr (Overview.js:804)
at LN.J.loadHandler (FrontEnd.js:1967)
Mr.yl @ Overview.js:786
iq.generateMXMLProperties @ Overview.js:736
hq.generateMXMLAttributes @ Overview.js:546
Rr @ Overview.js:804
J.loadHandler @ FrontEnd.js:1967
load (async)
LN.loadModule @ FrontEnd.js:1965
dN.loadModule @ FrontEnd.js:2406
LD.Un @ FrontEnd.js:1809
ny @ FrontEnd.js:123
ny @ FrontEnd.js:248
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
I have attached the full log to this email.
On Tue, Dec 28, 2021 at 2:51 PM Roman Isitua <ro...@gmail.com>> wrote:
Hi Maria,
Prior to starting this mail discussion "Load time is very slow". I can confirm I have only been compiling in debug mode. My target\javascript\bin\ only had js-debug. It was after I upgraded my royale sdk from 0.9.7 to 0.9.8 that I compiled in release mode.
On Tue, Dec 28, 2021 at 2:24 PM Maria Jose Esteve <mj...@iest.com>> wrote:
Hi, @Roman, I think you are doing a double compile can it be? My times are the same as yours and I always compile in debug and release.
Look at your target folder " target\javascript\bin\" and if you have two folders: js-debug and js-release you are compiling always double.
In my case, the architecture of my project as well as the Maven compilation files (pom.xml) were provided by an external company (we didn't know anything about Maven or Royale at that time) and I understand that this formula was chosen to show us the options we had.
A priori and without doing any test as Harb has done, I think that modularity gives us the advantage of compiling parts of the code once and not compiling them again if they are not modified. So far WITH MY COMPILATION TIMES, sometimes more than 1 minute, this is fundamental. But of course, now we have the problem of minification of the modules and it is really a serious problem because it is impossible for us to deploy in production.
I will try to separate the compiación realese with a profile and if I succeed I will pass it to you @Roman.
@Harb what do you mean by compiling the ROYALE_INTERFACE_INFO branch?
Hiedra
De: Harbs <ha...@gmail.com>>
Enviado el: lunes, 27 de diciembre de 2021 18:32
Para: users@royale.apache.org<ma...@royale.apache.org>
Asunto: Re: Load time is very slow
That doesn’t sound right.
Are you sure you’re compiling debug and not release? That sounds like release build times.
On Dec 27, 2021, at 3:31 PM, Roman Isitua <ro...@gmail.com>> wrote:
Wow ! You are using a workstation with a bleeding edge processor.
I just compiled my app now. It took 44 seconds. (First compilation after ide start up.) Subsequently compilations are usually 19s to 20s.
My application code base is very very small compared to yours. As we continue to add functionality, I expect the compile times to rise.
Compiling Modules (was Re: Load time is very slow)
Posted by Harbs <ha...@gmail.com>.
Sorry for my deal in responding.
Let’s take a step back.
I’m not sure how you are compiling your modules. I just added some content to the module documentation page which explains what compiler options you need while compiling modules. (It still needs some editing.) https://apache.github.io/royale-docs/features/modules#minification
Are you using those options?
> On Dec 29, 2021, at 2:19 AM, Maria Jose Esteve <mj...@iest.com> wrote:
>
> Hi, Let me join you with these tests....
>
> @Harb, I have compiled the SDK from this branch, feature/ROYALE_INTERFACE_INFO, and when running in debug I get this error:
>
> Message on the PURGE CONSOLE is displayed:
>
> Cannot convert org.apache.royale.reflection.beads.ClassAliasBead to IBead
>
> Message in the IDE Window:
>
> Se produjo una excepción: TypeError: Cannot convert [object Object] to IBead
> at App.org.apache.royale.core.ElementWrapper.addBead (http://localhost:8080/WNetSuitePlus/org/apache/royale/core/ElementWrapper.js:114:11 <http://localhost:8080/WNetSuitePlus/org/apache/royale/core/ElementWrapper.js:114:11>)
> at App.org.apache.royale.core.HTMLElementWrapper.addBead (http://localhost:8080/WNetSuitePlus/org/apache/royale/core/HTMLElementWrapper.js:43:65 <http://localhost:8080/WNetSuitePlus/org/apache/royale/core/HTMLElementWrapper.js:43:65>)
> at App.org.apache.royale.jewel.Application.start (http://localhost:8080/WNetSuitePlus/org/apache/royale/jewel/Application.js:246:10 <http://localhost:8080/WNetSuitePlus/org/apache/royale/jewel/Application.js:246:10>)
> at App.App_loadXML (http://localhost:8080/WNetSuitePlus/App.js:1681:25 <http://localhost:8080/WNetSuitePlus/App.js:1681:25>)
> at org.apache.royale.net.URLLoader.org.apache.royale.events.EventDispatcher.fireListeners (http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:97:23 <http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:97:23>)
> at Function.goog.events.EventTarget.dispatchEventInternal_ (http://localhost:8080/WNetSuitePlus/library/closure/goog/events/eventtarget.js:381:26 <http://localhost:8080/WNetSuitePlus/library/closure/goog/events/eventtarget.js:381:26>)
> at org.apache.royale.net.URLLoader.org.apache.royale.events.EventDispatcher.dispatchEvent (http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:72:37 <http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:72:37>)
> at org.apache.royale.net.URLLoader.jsEventHandler (http://localhost:8080/WNetSuitePlus/org/apache/royale/net/URLLoader.js:169:12 <http://localhost:8080/WNetSuitePlus/org/apache/royale/net/URLLoader.js:169:12>)
>
> Call stack:
>
> <image003.png>
>
> [INFO] Executing MXMLC in tool group Royale with args: [
> -load-config=D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\compile-app-config.xml,
> -js-default-initializers=true,
> -source-map=true,
> -js-dynamic-access-unknown-members=true,
> -keep-as3-metadata+=Inject,Dispatcher,EventHandler,Event,PostConstruct,PreDestroy,ViewAdded,ViewRemoved,Bindable,Transient,
> -keep-code-with-metadata=Inject,
> -show-binding-warnings=false,
> -export-public-symbols=false,
> -prevent-rename-protected-symbols=false,
> -prevent-rename-internal-symbols=false,
> -js-output=D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\javascript,
> -compiler.targets=JSRoyale,
> D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\src\main\royale\App.mxml
>
>
> The release execution does not change, the error is the same as before (SDK compilation from the develop branch):
>
> Se produjo una excepción: ReferenceError: Error #1065: Variable com.iest.winplusweb.models.MasterConfigSystemModel is not defined.
> at yR (http://localhost:8080/WPWebRelease/App.js:3605:1771 <http://localhost:8080/WPWebRelease/App.js:3605:1771>)
> at Mya (http://localhost:8080/WPWebRelease/App.js:3343:365 <http://localhost:8080/WPWebRelease/App.js:3343:365>)
> at AR.J.usa (http://localhost:8080/WPWebRelease/App.js:434:441 <http://localhost:8080/WPWebRelease/App.js:434:441>)
> at GFa.J.fromTypeDefinition (http://localhost:8080/WPWebRelease/App.js:5706:139 <http://localhost:8080/WPWebRelease/App.js:5706:139>)
> at Function.YT.getTypeDescriptor (http://localhost:8080/WPWebRelease/App.js:4570:820 <http://localhost:8080/WPWebRelease/App.js:4570:820>)
> at Function.fX.constructBean (http://localhost:8080/WPWebRelease/App.js:2336:472 <http://localhost:8080/WPWebRelease/App.js:2336:472>)
> at r$.J.initialize (http://localhost:8080/WPWebRelease/App.js:5041:66 <http://localhost:8080/WPWebRelease/App.js:5041:66>)
> at OW.J.init (http://localhost:8080/WPWebRelease/App.js:950:452 <http://localhost:8080/WPWebRelease/App.js:950:452>)
> at OW.J.u (http://localhost:8080/WPWebRelease/App.js:951:454 <http://localhost:8080/WPWebRelease/App.js:951:454>)
> at $$.J.addBead (http://localhost:8080/WPWebRelease/App.js:357:549 <http://localhost:8080/WPWebRelease/App.js:357:549>)
>
> The main difference:
> project compiled from "SDK-develop" runs fine in js-debug and gives error in js-release and, compiled from "SDK-ROYALE_INTERFACE_INFO" does not launch because of conversion error.
>
> Hiedra
>
> De: Roman Isitua <romanisitua@gmail.com <ma...@gmail.com>>
> Enviado el: martes, 28 de diciembre de 2021 15:55
> Para: users@royale.apache.org <ma...@royale.apache.org>
> Asunto: Re: Load time is very slow
>
> @Harb
>
> I have checked out the feature/ROYALE_INTERFACE_INFO branch and compiled asjs and compiler. I have rebuilt my application with modules in release mode.
>
> I get the following error when I attempt to launch a module
>
>
> <image001.png>
>
>
> The module loads fine in debug mode
>
> <image002.png>
>
>
> Snippets of the log
>
> Overview.js:786 Uncaught TypeError: cm.valuesImpl.init is not a function
> at Rr.Mr.yl (Overview.js:786)
> at Function.iq.generateMXMLProperties (Overview.js:736)
> at Rr.hq.generateMXMLAttributes (Overview.js:546)
> at new Rr (Overview.js:804)
> at LN.J.loadHandler (FrontEnd.js:1967)
> Mr.yl @ Overview.js:786
> iq.generateMXMLProperties @ Overview.js:736
> hq.generateMXMLAttributes @ Overview.js:546
> Rr @ Overview.js:804
> J.loadHandler @ FrontEnd.js:1967
> load (async)
> LN.loadModule @ FrontEnd.js:1965
> dN.loadModule @ FrontEnd.js:2406
> LD.Un @ FrontEnd.js:1809
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:248
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
>
>
> I have attached the full log to this email.
>
>
>
>
> On Tue, Dec 28, 2021 at 2:51 PM Roman Isitua <romanisitua@gmail.com <ma...@gmail.com>> wrote:
> Hi Maria,
>
> Prior to starting this mail discussion "Load time is very slow". I can confirm I have only been compiling in debug mode. My target\javascript\bin\ only had js-debug. It was after I upgraded my royale sdk from 0.9.7 to 0.9.8 that I compiled in release mode.
>
>
>
> On Tue, Dec 28, 2021 at 2:24 PM Maria Jose Esteve <mjesteve@iest.com <ma...@iest.com>> wrote:
> Hi, @Roman, I think you are doing a double compile can it be? My times are the same as yours and I always compile in debug and release.
>
> Look at your target folder " target\javascript\bin\" and if you have two folders: js-debug and js-release you are compiling always double.
>
> In my case, the architecture of my project as well as the Maven compilation files (pom.xml) were provided by an external company (we didn't know anything about Maven or Royale at that time) and I understand that this formula was chosen to show us the options we had.
>
> A priori and without doing any test as Harb has done, I think that modularity gives us the advantage of compiling parts of the code once and not compiling them again if they are not modified. So far WITH MY COMPILATION TIMES, sometimes more than 1 minute, this is fundamental. But of course, now we have the problem of minification of the modules and it is really a serious problem because it is impossible for us to deploy in production.
>
> I will try to separate the compiación realese with a profile and if I succeed I will pass it to you @Roman.
>
> @Harb what do you mean by compiling the ROYALE_INTERFACE_INFO branch?
>
> Hiedra
>
> De: Harbs <harbs.lists@gmail.com <ma...@gmail.com>>
> Enviado el: lunes, 27 de diciembre de 2021 18:32
> Para: users@royale.apache.org <ma...@royale.apache.org>
> Asunto: Re: Load time is very slow
>
> That doesn’t sound right.
>
> Are you sure you’re compiling debug and not release? That sounds like release build times.
>
>
> On Dec 27, 2021, at 3:31 PM, Roman Isitua <romanisitua@gmail.com <ma...@gmail.com>> wrote:
>
> Wow ! You are using a workstation with a bleeding edge processor.
>
> I just compiled my app now. It took 44 seconds. (First compilation after ide start up.) Subsequently compilations are usually 19s to 20s.
>
> My application code base is very very small compared to yours. As we continue to add functionality, I expect the compile times to rise.
>
>
Re: Load time is very slow
Posted by Alex Harui <ah...@adobe.com>.
Maybe AMF/RemoteObject requires Reflection in a way that Harbs didn’t consider.
It occurs to me that the minifier is smart about duplicate strings, so it might be better for the compiler and framework to not leverage generic Reflection data for other purposes such as CSS Type Selectors and Interface implementation.
Maybe only IUIBase implementations would have a ROYALE_CSS_TYPE field with the duplicate string which would be used by SimpleCSSValuesImpl. Then the other ROYALE_CLASS_INFO qname data might not be used and get removed by the optimizer.
And maybe instead of answering “implements” in ROYALE_CLASS_INFO or ROYALE_INTERFACE_INFO, the compiler could build a table to be used by Language “is”. That would probably also significantly speed up Language “is”. If the answer is known at compile time, no need to compute it at runtime.
From: Maria Jose Esteve <mj...@iest.com>
Reply-To: "users@royale.apache.org" <us...@royale.apache.org>
Date: Tuesday, December 28, 2021 at 4:20 PM
To: "users@royale.apache.org" <us...@royale.apache.org>
Subject: RE: Load time is very slow
Hi, Let me join you with these tests....
@Harb, I have compiled the SDK from this branch, feature/ROYALE_INTERFACE_INFO, and when running in debug I get this error:
Message on the PURGE CONSOLE is displayed:
Cannot convert org.apache.royale.reflection.beads.ClassAliasBead to IBead
Message in the IDE Window:
Se produjo una excepción: TypeError: Cannot convert [object Object] to IBead
at App.org.apache.royale.core.ElementWrapper.addBead (http://localhost:8080/WNetSuitePlus/org/apache/royale/core/ElementWrapper.js:114:11)
at App.org.apache.royale.core.HTMLElementWrapper.addBead (http://localhost:8080/WNetSuitePlus/org/apache/royale/core/HTMLElementWrapper.js:43:65)
at App.org.apache.royale.jewel.Application.start (http://localhost:8080/WNetSuitePlus/org/apache/royale/jewel/Application.js:246:10)
at App.App_loadXML (http://localhost:8080/WNetSuitePlus/App.js:1681:25)
at org.apache.royale.net.URLLoader.org.apache.royale.events.EventDispatcher.fireListeners (http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:97:23)
at Function.goog.events.EventTarget.dispatchEventInternal_ (http://localhost:8080/WNetSuitePlus/library/closure/goog/events/eventtarget.js:381:26)
at org.apache.royale.net.URLLoader.org.apache.royale.events.EventDispatcher.dispatchEvent (http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:72:37)
at org.apache.royale.net.URLLoader.jsEventHandler (http://localhost:8080/WNetSuitePlus/org/apache/royale/net/URLLoader.js:169:12)
Call stack:
[cid:image003.png@01D7FC50.A3D334B0]
[INFO] Executing MXMLC in tool group Royale with args: [
-load-config=D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\compile-app-config.xml,
-js-default-initializers=true,
-source-map=true,
-js-dynamic-access-unknown-members=true,
-keep-as3-metadata+=Inject,Dispatcher,EventHandler,Event,PostConstruct,PreDestroy,ViewAdded,ViewRemoved,Bindable,Transient,
-keep-code-with-metadata=Inject,
-show-binding-warnings=false,
-export-public-symbols=false,
-prevent-rename-protected-symbols=false,
-prevent-rename-internal-symbols=false,
-js-output=D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\javascript,
-compiler.targets=JSRoyale,
D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\src\main\royale\App.mxml
The release execution does not change, the error is the same as before (SDK compilation from the develop branch):
Se produjo una excepción: ReferenceError: Error #1065: Variable com.iest.winplusweb.models.MasterConfigSystemModel is not defined.
at yR (http://localhost:8080/WPWebRelease/App.js:3605:1771)
at Mya (http://localhost:8080/WPWebRelease/App.js:3343:365)
at AR.J.usa (http://localhost:8080/WPWebRelease/App.js:434:441)
at GFa.J.fromTypeDefinition (http://localhost:8080/WPWebRelease/App.js:5706:139)
at Function.YT.getTypeDescriptor (http://localhost:8080/WPWebRelease/App.js:4570:820)
at Function.fX.constructBean (http://localhost:8080/WPWebRelease/App.js:2336:472)
at r$.J.initialize (http://localhost:8080/WPWebRelease/App.js:5041:66)
at OW.J.init (http://localhost:8080/WPWebRelease/App.js:950:452)
at OW.J.u (http://localhost:8080/WPWebRelease/App.js:951:454)
at $$.J.addBead (http://localhost:8080/WPWebRelease/App.js:357:549)
The main difference:
project compiled from "SDK-develop" runs fine in js-debug and gives error in js-release and, compiled from "SDK-ROYALE_INTERFACE_INFO" does not launch because of conversion error.
Hiedra
De: Roman Isitua <ro...@gmail.com>
Enviado el: martes, 28 de diciembre de 2021 15:55
Para: users@royale.apache.org
Asunto: Re: Load time is very slow
@Harb
I have checked out the feature/ROYALE_INTERFACE_INFO branch and compiled asjs and compiler. I have rebuilt my application with modules in release mode.
I get the following error when I attempt to launch a module
[cid:image001.png@01D7FC4C.55FAC1D0]
The module loads fine in debug mode
[cid:image002.png@01D7FC4C.55FAC1D0]
Snippets of the log
Overview.js:786 Uncaught TypeError: cm.valuesImpl.init is not a function
at Rr.Mr.yl (Overview.js:786)
at Function.iq.generateMXMLProperties (Overview.js:736)
at Rr.hq.generateMXMLAttributes (Overview.js:546)
at new Rr (Overview.js:804)
at LN.J.loadHandler (FrontEnd.js:1967)
Mr.yl @ Overview.js:786
iq.generateMXMLProperties @ Overview.js:736
hq.generateMXMLAttributes @ Overview.js:546
Rr @ Overview.js:804
J.loadHandler @ FrontEnd.js:1967
load (async)
LN.loadModule @ FrontEnd.js:1965
dN.loadModule @ FrontEnd.js:2406
LD.Un @ FrontEnd.js:1809
ny @ FrontEnd.js:123
ny @ FrontEnd.js:248
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
I have attached the full log to this email.
On Tue, Dec 28, 2021 at 2:51 PM Roman Isitua <ro...@gmail.com>> wrote:
Hi Maria,
Prior to starting this mail discussion "Load time is very slow". I can confirm I have only been compiling in debug mode. My target\javascript\bin\ only had js-debug. It was after I upgraded my royale sdk from 0.9.7 to 0.9.8 that I compiled in release mode.
On Tue, Dec 28, 2021 at 2:24 PM Maria Jose Esteve <mj...@iest.com>> wrote:
Hi, @Roman, I think you are doing a double compile can it be? My times are the same as yours and I always compile in debug and release.
Look at your target folder " target\javascript\bin\" and if you have two folders: js-debug and js-release you are compiling always double.
In my case, the architecture of my project as well as the Maven compilation files (pom.xml) were provided by an external company (we didn't know anything about Maven or Royale at that time) and I understand that this formula was chosen to show us the options we had.
A priori and without doing any test as Harb has done, I think that modularity gives us the advantage of compiling parts of the code once and not compiling them again if they are not modified. So far WITH MY COMPILATION TIMES, sometimes more than 1 minute, this is fundamental. But of course, now we have the problem of minification of the modules and it is really a serious problem because it is impossible for us to deploy in production.
I will try to separate the compiación realese with a profile and if I succeed I will pass it to you @Roman.
@Harb what do you mean by compiling the ROYALE_INTERFACE_INFO branch?
Hiedra
De: Harbs <ha...@gmail.com>>
Enviado el: lunes, 27 de diciembre de 2021 18:32
Para: users@royale.apache.org<ma...@royale.apache.org>
Asunto: Re: Load time is very slow
That doesn’t sound right.
Are you sure you’re compiling debug and not release? That sounds like release build times.
On Dec 27, 2021, at 3:31 PM, Roman Isitua <ro...@gmail.com>> wrote:
Wow ! You are using a workstation with a bleeding edge processor.
I just compiled my app now. It took 44 seconds. (First compilation after ide start up.) Subsequently compilations are usually 19s to 20s.
My application code base is very very small compared to yours. As we continue to add functionality, I expect the compile times to rise.
RE: Load time is very slow
Posted by Maria Jose Esteve <mj...@iest.com>.
Hi, Let me join you with these tests....
@Harb, I have compiled the SDK from this branch, feature/ROYALE_INTERFACE_INFO, and when running in debug I get this error:
Message on the PURGE CONSOLE is displayed:
Cannot convert org.apache.royale.reflection.beads.ClassAliasBead to IBead
Message in the IDE Window:
Se produjo una excepción: TypeError: Cannot convert [object Object] to IBead
at App.org.apache.royale.core.ElementWrapper.addBead (http://localhost:8080/WNetSuitePlus/org/apache/royale/core/ElementWrapper.js:114:11)
at App.org.apache.royale.core.HTMLElementWrapper.addBead (http://localhost:8080/WNetSuitePlus/org/apache/royale/core/HTMLElementWrapper.js:43:65)
at App.org.apache.royale.jewel.Application.start (http://localhost:8080/WNetSuitePlus/org/apache/royale/jewel/Application.js:246:10)
at App.App_loadXML (http://localhost:8080/WNetSuitePlus/App.js:1681:25)
at org.apache.royale.net.URLLoader.org.apache.royale.events.EventDispatcher.fireListeners (http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:97:23)
at Function.goog.events.EventTarget.dispatchEventInternal_ (http://localhost:8080/WNetSuitePlus/library/closure/goog/events/eventtarget.js:381:26)
at org.apache.royale.net.URLLoader.org.apache.royale.events.EventDispatcher.dispatchEvent (http://localhost:8080/WNetSuitePlus/org/apache/royale/events/EventDispatcher.js:72:37)
at org.apache.royale.net.URLLoader.jsEventHandler (http://localhost:8080/WNetSuitePlus/org/apache/royale/net/URLLoader.js:169:12)
Call stack:
[cid:image003.png@01D7FC50.A3D334B0]
[INFO] Executing MXMLC in tool group Royale with args: [
-load-config=D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\compile-app-config.xml,
-js-default-initializers=true,
-source-map=true,
-js-dynamic-access-unknown-members=true,
-keep-as3-metadata+=Inject,Dispatcher,EventHandler,Event,PostConstruct,PreDestroy,ViewAdded,ViewRemoved,Bindable,Transient,
-keep-code-with-metadata=Inject,
-show-binding-warnings=false,
-export-public-symbols=false,
-prevent-rename-protected-symbols=false,
-prevent-rename-internal-symbols=false,
-js-output=D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\target\javascript,
-compiler.targets=JSRoyale,
D:\Develop_Royale\Projects\WinPlusWebSuite\royaleapp\royalelogin\src\main\royale\App.mxml
The release execution does not change, the error is the same as before (SDK compilation from the develop branch):
Se produjo una excepción: ReferenceError: Error #1065: Variable com.iest.winplusweb.models.MasterConfigSystemModel is not defined.
at yR (http://localhost:8080/WPWebRelease/App.js:3605:1771)
at Mya (http://localhost:8080/WPWebRelease/App.js:3343:365)
at AR.J.usa (http://localhost:8080/WPWebRelease/App.js:434:441)
at GFa.J.fromTypeDefinition (http://localhost:8080/WPWebRelease/App.js:5706:139)
at Function.YT.getTypeDescriptor (http://localhost:8080/WPWebRelease/App.js:4570:820)
at Function.fX.constructBean (http://localhost:8080/WPWebRelease/App.js:2336:472)
at r$.J.initialize (http://localhost:8080/WPWebRelease/App.js:5041:66)
at OW.J.init (http://localhost:8080/WPWebRelease/App.js:950:452)
at OW.J.u (http://localhost:8080/WPWebRelease/App.js:951:454)
at $$.J.addBead (http://localhost:8080/WPWebRelease/App.js:357:549)
The main difference:
project compiled from "SDK-develop" runs fine in js-debug and gives error in js-release and, compiled from "SDK-ROYALE_INTERFACE_INFO" does not launch because of conversion error.
Hiedra
De: Roman Isitua <ro...@gmail.com>
Enviado el: martes, 28 de diciembre de 2021 15:55
Para: users@royale.apache.org
Asunto: Re: Load time is very slow
@Harb
I have checked out the feature/ROYALE_INTERFACE_INFO branch and compiled asjs and compiler. I have rebuilt my application with modules in release mode.
I get the following error when I attempt to launch a module
[cid:image001.png@01D7FC4C.55FAC1D0]
The module loads fine in debug mode
[cid:image002.png@01D7FC4C.55FAC1D0]
Snippets of the log
Overview.js:786 Uncaught TypeError: cm.valuesImpl.init is not a function
at Rr.Mr.yl (Overview.js:786)
at Function.iq.generateMXMLProperties (Overview.js:736)
at Rr.hq.generateMXMLAttributes (Overview.js:546)
at new Rr (Overview.js:804)
at LN.J.loadHandler (FrontEnd.js:1967)
Mr.yl @ Overview.js:786
iq.generateMXMLProperties @ Overview.js:736
hq.generateMXMLAttributes @ Overview.js:546
Rr @ Overview.js:804
J.loadHandler @ FrontEnd.js:1967
load (async)
LN.loadModule @ FrontEnd.js:1965
dN.loadModule @ FrontEnd.js:2406
LD.Un @ FrontEnd.js:1809
ny @ FrontEnd.js:123
ny @ FrontEnd.js:248
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
I have attached the full log to this email.
On Tue, Dec 28, 2021 at 2:51 PM Roman Isitua <ro...@gmail.com>> wrote:
Hi Maria,
Prior to starting this mail discussion "Load time is very slow". I can confirm I have only been compiling in debug mode. My target\javascript\bin\ only had js-debug. It was after I upgraded my royale sdk from 0.9.7 to 0.9.8 that I compiled in release mode.
On Tue, Dec 28, 2021 at 2:24 PM Maria Jose Esteve <mj...@iest.com>> wrote:
Hi, @Roman, I think you are doing a double compile can it be? My times are the same as yours and I always compile in debug and release.
Look at your target folder " target\javascript\bin\" and if you have two folders: js-debug and js-release you are compiling always double.
In my case, the architecture of my project as well as the Maven compilation files (pom.xml) were provided by an external company (we didn't know anything about Maven or Royale at that time) and I understand that this formula was chosen to show us the options we had.
A priori and without doing any test as Harb has done, I think that modularity gives us the advantage of compiling parts of the code once and not compiling them again if they are not modified. So far WITH MY COMPILATION TIMES, sometimes more than 1 minute, this is fundamental. But of course, now we have the problem of minification of the modules and it is really a serious problem because it is impossible for us to deploy in production.
I will try to separate the compiación realese with a profile and if I succeed I will pass it to you @Roman.
@Harb what do you mean by compiling the ROYALE_INTERFACE_INFO branch?
Hiedra
De: Harbs <ha...@gmail.com>>
Enviado el: lunes, 27 de diciembre de 2021 18:32
Para: users@royale.apache.org<ma...@royale.apache.org>
Asunto: Re: Load time is very slow
That doesn’t sound right.
Are you sure you’re compiling debug and not release? That sounds like release build times.
On Dec 27, 2021, at 3:31 PM, Roman Isitua <ro...@gmail.com>> wrote:
Wow ! You are using a workstation with a bleeding edge processor.
I just compiled my app now. It took 44 seconds. (First compilation after ide start up.) Subsequently compilations are usually 19s to 20s.
My application code base is very very small compared to yours. As we continue to add functionality, I expect the compile times to rise.
Re: Load time is very slow
Posted by Roman Isitua <ro...@gmail.com>.
@Harb
I have checked out the feature/ROYALE_INTERFACE_INFO branch and compiled
asjs and compiler. I have rebuilt my application with modules in release
mode.
I get the following error when I attempt to launch a module
[image: image.png]
The module loads fine in debug mode
[image: image.png]
Snippets of the log
Overview.js:786 Uncaught TypeError: cm.valuesImpl.init is not a function
at Rr.Mr.yl (Overview.js:786)
at Function.iq.generateMXMLProperties (Overview.js:736)
at Rr.hq.generateMXMLAttributes (Overview.js:546)
at new Rr (Overview.js:804)
at LN.J.loadHandler (FrontEnd.js:1967)
Mr.yl @ Overview.js:786
iq.generateMXMLProperties @ Overview.js:736
hq.generateMXMLAttributes @ Overview.js:546
Rr @ Overview.js:804
J.loadHandler @ FrontEnd.js:1967
load (async)
LN.loadModule @ FrontEnd.js:1965
dN.loadModule @ FrontEnd.js:2406
LD.Un @ FrontEnd.js:1809
ny @ FrontEnd.js:123
ny @ FrontEnd.js:248
iy @ FrontEnd.js:125
b @ FrontEnd.js:121
I have attached the full log to this email.
On Tue, Dec 28, 2021 at 2:51 PM Roman Isitua <ro...@gmail.com> wrote:
> Hi Maria,
>
> Prior to starting this mail discussion "Load time is very slow". I can
> confirm I have only been compiling in debug mode. My target\javascript\bin\
> only had js-debug. It was after I upgraded my royale sdk from 0.9.7 to
> 0.9.8 that I compiled in release mode.
>
>
>
> On Tue, Dec 28, 2021 at 2:24 PM Maria Jose Esteve <mj...@iest.com>
> wrote:
>
>> Hi, @Roman, I think you are doing a double compile can it be? My times
>> are the same as yours and I always compile in debug and release.
>>
>>
>>
>> Look at your target folder " target\javascript\bin\" and if you have two
>> folders: js-debug and js-release you are compiling always double.
>>
>>
>>
>> In my case, the architecture of my project as well as the Maven
>> compilation files (pom.xml) were provided by an external company (we didn't
>> know anything about Maven or Royale at that time) and I understand that
>> this formula was chosen to show us the options we had.
>>
>>
>>
>> A priori and without doing any test as Harb has done, I think that
>> modularity gives us the advantage of compiling parts of the code once and
>> not compiling them again if they are not modified. So far WITH MY
>> COMPILATION TIMES, sometimes more than 1 minute, this is fundamental. But
>> of course, now we have the problem of minification of the modules and it is
>> really a serious problem because it is impossible for us to deploy in
>> production.
>>
>>
>>
>> I will try to separate the compiación realese with a profile and if I
>> succeed I will pass it to you @Roman.
>>
>>
>>
>> @Harb what do you mean by compiling the ROYALE_INTERFACE_INFO branch?
>>
>>
>>
>> Hiedra
>>
>>
>>
>> *De:* Harbs <ha...@gmail.com>
>> *Enviado el:* lunes, 27 de diciembre de 2021 18:32
>> *Para:* users@royale.apache.org
>> *Asunto:* Re: Load time is very slow
>>
>>
>>
>> That doesn’t sound right.
>>
>>
>>
>> Are you sure you’re compiling debug and not release? That sounds like
>> release build times.
>>
>>
>>
>> On Dec 27, 2021, at 3:31 PM, Roman Isitua <ro...@gmail.com> wrote:
>>
>>
>>
>> Wow ! You are using a workstation with a bleeding edge processor.
>>
>>
>>
>> I just compiled my app now. It took 44 seconds. (First compilation after
>> ide start up.) Subsequently compilations are usually 19s to 20s.
>>
>>
>>
>> My application code base is very very small compared to yours. As we
>> continue to add functionality, I expect the compile times to rise.
>>
>>
>>
>>
>>
>
Re: Load time is very slow
Posted by Roman Isitua <ro...@gmail.com>.
Hi Maria,
Prior to starting this mail discussion "Load time is very slow". I can
confirm I have only been compiling in debug mode. My target\javascript\bin\
only had js-debug. It was after I upgraded my royale sdk from 0.9.7 to
0.9.8 that I compiled in release mode.
On Tue, Dec 28, 2021 at 2:24 PM Maria Jose Esteve <mj...@iest.com> wrote:
> Hi, @Roman, I think you are doing a double compile can it be? My times are
> the same as yours and I always compile in debug and release.
>
>
>
> Look at your target folder " target\javascript\bin\" and if you have two
> folders: js-debug and js-release you are compiling always double.
>
>
>
> In my case, the architecture of my project as well as the Maven
> compilation files (pom.xml) were provided by an external company (we didn't
> know anything about Maven or Royale at that time) and I understand that
> this formula was chosen to show us the options we had.
>
>
>
> A priori and without doing any test as Harb has done, I think that
> modularity gives us the advantage of compiling parts of the code once and
> not compiling them again if they are not modified. So far WITH MY
> COMPILATION TIMES, sometimes more than 1 minute, this is fundamental. But
> of course, now we have the problem of minification of the modules and it is
> really a serious problem because it is impossible for us to deploy in
> production.
>
>
>
> I will try to separate the compiación realese with a profile and if I
> succeed I will pass it to you @Roman.
>
>
>
> @Harb what do you mean by compiling the ROYALE_INTERFACE_INFO branch?
>
>
>
> Hiedra
>
>
>
> *De:* Harbs <ha...@gmail.com>
> *Enviado el:* lunes, 27 de diciembre de 2021 18:32
> *Para:* users@royale.apache.org
> *Asunto:* Re: Load time is very slow
>
>
>
> That doesn’t sound right.
>
>
>
> Are you sure you’re compiling debug and not release? That sounds like
> release build times.
>
>
>
> On Dec 27, 2021, at 3:31 PM, Roman Isitua <ro...@gmail.com> wrote:
>
>
>
> Wow ! You are using a workstation with a bleeding edge processor.
>
>
>
> I just compiled my app now. It took 44 seconds. (First compilation after
> ide start up.) Subsequently compilations are usually 19s to 20s.
>
>
>
> My application code base is very very small compared to yours. As we
> continue to add functionality, I expect the compile times to rise.
>
>
>
>
>
RE: Load time is very slow
Posted by Maria Jose Esteve <mj...@iest.com>.
Hi, @Roman, I think you are doing a double compile can it be? My times are the same as yours and I always compile in debug and release.
Look at your target folder " target\javascript\bin\" and if you have two folders: js-debug and js-release you are compiling always double.
In my case, the architecture of my project as well as the Maven compilation files (pom.xml) were provided by an external company (we didn't know anything about Maven or Royale at that time) and I understand that this formula was chosen to show us the options we had.
A priori and without doing any test as Harb has done, I think that modularity gives us the advantage of compiling parts of the code once and not compiling them again if they are not modified. So far WITH MY COMPILATION TIMES, sometimes more than 1 minute, this is fundamental. But of course, now we have the problem of minification of the modules and it is really a serious problem because it is impossible for us to deploy in production.
I will try to separate the compiación realese with a profile and if I succeed I will pass it to you @Roman.
@Harb what do you mean by compiling the ROYALE_INTERFACE_INFO branch?
Hiedra
De: Harbs <ha...@gmail.com>
Enviado el: lunes, 27 de diciembre de 2021 18:32
Para: users@royale.apache.org
Asunto: Re: Load time is very slow
That doesn’t sound right.
Are you sure you’re compiling debug and not release? That sounds like release build times.
On Dec 27, 2021, at 3:31 PM, Roman Isitua <ro...@gmail.com>> wrote:
Wow ! You are using a workstation with a bleeding edge processor.
I just compiled my app now. It took 44 seconds. (First compilation after ide start up.) Subsequently compilations are usually 19s to 20s.
My application code base is very very small compared to yours. As we continue to add functionality, I expect the compile times to rise.
Re: Load time is very slow
Posted by Harbs <ha...@gmail.com>.
That doesn’t sound right.
Are you sure you’re compiling debug and not release? That sounds like release build times.
> On Dec 27, 2021, at 3:31 PM, Roman Isitua <ro...@gmail.com> wrote:
>
> Wow ! You are using a workstation with a bleeding edge processor.
>
> I just compiled my app now. It took 44 seconds. (First compilation after ide start up.) Subsequently compilations are usually 19s to 20s.
>
> My application code base is very very small compared to yours. As we continue to add functionality, I expect the compile times to rise.
>
Re: Load time is very slow
Posted by Roman Isitua <ro...@gmail.com>.
On Mon, Dec 27, 2021 at 2:11 PM Harbs <ha...@gmail.com> wrote:
> Compile times of debug builds should be very fast. What compile times are
>> you seeing?
>>
>
> What I mean is that, if we develop the entire application using only
> one module, as we add new functionality, compile times will continue to
> increase.
> With the modular approach, functionality is divided into modules.
> modules can be compiled independently thereby reducing compile times.
> Correct me if my understanding is wrong.
>
>
> I have an application which has an estimated 300,000 lines of code in
> close to 1400 classes. Debug compile times are generally less than 10
> seconds.
>
> That said, I’d like for us to add incremental compiles which should make
> updates basically instant.
>
Wow ! You are using a workstation with a bleeding edge processor.
I just compiled my app now. It took 44 seconds. (First compilation after
ide start up.) Subsequently compilations are usually 19s to 20s.
My application code base is very very small compared to yours. As we
continue to add functionality, I expect the compile times to rise.
My laptop specs
Processor Intel(R) Core(TM) i7-6500U CPU @ 2.50GHz 2.59 GHz
Installed RAM 12.0 GB (11.9 GB usable)
My team members' specs are slightly lower than this.
I am currently using version 0.9.8.
Re: Load time is very slow
Posted by Harbs <ha...@gmail.com>.
Four minutes for debug? Wow. Are you sure it’s only JS and debug?
That seems insane.
> On Dec 28, 2021, at 9:13 AM, Yishay Weiss <yi...@hotmail.com> wrote:
>
> We have a client now whose devs are seeing four minutes for each iteration, on top of which they have other startup tasks that can take a few minutes.
RE: Load time is very slow
Posted by Yishay Weiss <yi...@hotmail.com>.
> Debug compile times are generally less than 10 seconds.
That will depend on the hardware and other running processes. I would guess triple the amount of time for the same code is not uncommon. We have a client now whose devs are seeing four minutes for each iteration, on top of which they have other startup tasks that can take a few minutes.
> That said, I’d like for us to add incremental compiles which should make updates basically instant.
That would be huge.
From: Harbs<ma...@gmail.com>
Sent: Monday, December 27, 2021 3:11 PM
To: users@royale.apache.org<ma...@royale.apache.org>
Subject: Re: Load time is very slow
Compile times of debug builds should be very fast. What compile times are you seeing?
What I mean is that, if we develop the entire application using only one module, as we add new functionality, compile times will continue to increase.
With the modular approach, functionality is divided into modules. modules can be compiled independently thereby reducing compile times.
Correct me if my understanding is wrong.
I have an application which has an estimated 300,000 lines of code in close to 1400 classes. Debug compile times are generally less than 10 seconds.
That said, I’d like for us to add incremental compiles which should make updates basically instant.
Re: Load time is very slow
Posted by Harbs <ha...@gmail.com>.
> Compile times of debug builds should be very fast. What compile times are you seeing?
>
> What I mean is that, if we develop the entire application using only one module, as we add new functionality, compile times will continue to increase.
> With the modular approach, functionality is divided into modules. modules can be compiled independently thereby reducing compile times.
> Correct me if my understanding is wrong.
I have an application which has an estimated 300,000 lines of code in close to 1400 classes. Debug compile times are generally less than 10 seconds.
That said, I’d like for us to add incremental compiles which should make updates basically instant.
Re: Load time is very slow
Posted by Roman Isitua <ro...@gmail.com>.
Find my responses below
On Mon, Dec 27, 2021 at 1:40 PM Harbs <ha...@gmail.com> wrote:
>
>
> On Dec 27, 2021, at 2:04 PM, Roman Isitua <ro...@gmail.com> wrote:
>
> - compile times. With modules as I am adding new features to the app,
> compile times will not be affected too much.
> This is very useful for my small team. We are not using the latest
> workstation with bleeding edge processors. My laptop uses
> a 2017 core i7 processor. My other team members have slightly lower specs
> than mine. So compile time is something that we
> are mindful of.
>
>
> Compile times of debug builds should be very fast. What compile times are
> you seeing?
>
What I mean is that, if we develop the entire application using only one
module, as we add new functionality, compile times will continue to
increase.
With the modular approach, functionality is divided into modules. modules
can be compiled independently thereby reducing compile times.
Correct me if my understanding is wrong.
>
> If compile times are slow, we should work on fixing that...
>
> - modules make it easier to share development tasks.
>
>
> Why? We don’t have issues sharing tasks on the same application. I’d like
> to understand better why this is an issue for you.
>
How do you load and unload screens (as a result of side menu click's)
without using modules ? Maybe if I see a working example, I can re-evaluate
my approach. Note: some side menus will initiate screens that implement
Multi Step forms.
>
> I want to believe there will be performance benefits as well. e.g. faster
> load times and memory e.t.c
>
>
>
> I don’t think there will be. I think the opposite might be true.
>
Interesting.
Re: Load time is very slow
Posted by Harbs <ha...@gmail.com>.
> IMO, modularity is a well-proven software development construct.
I’m willing to concede that there might be places where modules in Royale is a good idea. Although I have a hard time wrapping my head around the application size and complexity where you'd hit that threshold.
But applying Flash experience to modules in Royale is not a good strategy IMO. Here’s some points to consider:
1. We saw huge drops in compilation speed when switching from Flash to HTML Royale for the same application.
2. The application size dropped drastically as well, and the whole application became about the size of a single module.
3. Network speeds have improved drastically over the last 10 years.
4. JS caching in the browser is much better than Flash caching was. I have my deployments setup so my application resource files (js, css, etc.) are cached for 30 days and when I deploy a new version, the cache is automatically invalidated.
5. Using modules limits how aggressively code can be minified. Improved minification helps both in deployed code size and speed of code execution. I’ve been working for the last 2-3 weeks pretty heavily on fixing the architecture of both my app and libraries and Royale to make agressive minification work in more scenarios.
6. A large part of application and module size in Flash was caused by embedded assets. In HTML, assets are stored externally and only loaded when/if they are actually needed.
I would be VERY wary of using modules unless there’s a very compelling reason to do so.
I’d also consider very strongly whether you need something like Crux which brings along with it all the baggage associated with Reflection.
My $0.02,
Harbs
> On Dec 28, 2021, at 2:01 AM, Alex Harui <ah...@adobe.com> wrote:
>
> IMO, modularity is a well-proven software development construct. It was key to making some really big Flex apps efficient for both development time as well as initialization time. But like most things, it has to be done properly. Too many small modules will slow initialization time, one huge app without modules may not load in time. Modules allow for pay-as-you=go loading of code which is sometimes quite important.
>
> The trade-offs are a bit different in Royale vs Flex so it won’t always be true that if your Flex app benefited from modules that your Royale app will as well. Or that the thresholds of module size are the same. With minification and gzip transfer over the network and probably some other factors, you can probably get away with fewer large modules in Royale.
>
> That said, performance problems should be analyzed with a profiler.
>
> Of course, I could be wrong…
> -Alex
>
> From: Harbs <ha...@gmail.com>
> Reply-To: "users@royale.apache.org" <us...@royale.apache.org>
> Date: Monday, December 27, 2021 at 4:40 AM
> To: "users@royale.apache.org" <us...@royale.apache.org>
> Subject: Re: Load time is very slow
>
>
>
>
>> On Dec 27, 2021, at 2:04 PM, Roman Isitua <romanisitua@gmail.com <ma...@gmail.com>> wrote:
>>
>> - compile times. With modules as I am adding new features to the app, compile times will not be affected too much.
>> This is very useful for my small team. We are not using the latest workstation with bleeding edge processors. My laptop uses
>> a 2017 core i7 processor. My other team members have slightly lower specs than mine. So compile time is something that we
>> are mindful of.
>
> Compile times of debug builds should be very fast. What compile times are you seeing?
>
> If compile times are slow, we should work on fixing that...
>
>
>> - modules make it easier to share development tasks.
>
> Why? We don’t have issues sharing tasks on the same application. I’d like to understand better why this is an issue for you.
>
>
>> I want to believe there will be performance benefits as well. e.g. faster load times and memory e.t.c
>
>
> I don’t think there will be. I think the opposite might be true.
Re: Load time is very slow
Posted by Alex Harui <ah...@adobe.com>.
IMO, modularity is a well-proven software development construct. It was key to making some really big Flex apps efficient for both development time as well as initialization time. But like most things, it has to be done properly. Too many small modules will slow initialization time, one huge app without modules may not load in time. Modules allow for pay-as-you=go loading of code which is sometimes quite important.
The trade-offs are a bit different in Royale vs Flex so it won’t always be true that if your Flex app benefited from modules that your Royale app will as well. Or that the thresholds of module size are the same. With minification and gzip transfer over the network and probably some other factors, you can probably get away with fewer large modules in Royale.
That said, performance problems should be analyzed with a profiler.
Of course, I could be wrong…
-Alex
From: Harbs <ha...@gmail.com>
Reply-To: "users@royale.apache.org" <us...@royale.apache.org>
Date: Monday, December 27, 2021 at 4:40 AM
To: "users@royale.apache.org" <us...@royale.apache.org>
Subject: Re: Load time is very slow
On Dec 27, 2021, at 2:04 PM, Roman Isitua <ro...@gmail.com>> wrote:
- compile times. With modules as I am adding new features to the app, compile times will not be affected too much.
This is very useful for my small team. We are not using the latest workstation with bleeding edge processors. My laptop uses
a 2017 core i7 processor. My other team members have slightly lower specs than mine. So compile time is something that we
are mindful of.
Compile times of debug builds should be very fast. What compile times are you seeing?
If compile times are slow, we should work on fixing that...
- modules make it easier to share development tasks.
Why? We don’t have issues sharing tasks on the same application. I’d like to understand better why this is an issue for you.
I want to believe there will be performance benefits as well. e.g. faster load times and memory e.t.c
I don’t think there will be. I think the opposite might be true.
Re: Load time is very slow
Posted by Harbs <ha...@gmail.com>.
> On Dec 27, 2021, at 2:04 PM, Roman Isitua <ro...@gmail.com> wrote:
>
> - compile times. With modules as I am adding new features to the app, compile times will not be affected too much.
> This is very useful for my small team. We are not using the latest workstation with bleeding edge processors. My laptop uses
> a 2017 core i7 processor. My other team members have slightly lower specs than mine. So compile time is something that we
> are mindful of.
Compile times of debug builds should be very fast. What compile times are you seeing?
If compile times are slow, we should work on fixing that...
> - modules make it easier to share development tasks.
Why? We don’t have issues sharing tasks on the same application. I’d like to understand better why this is an issue for you.
> I want to believe there will be performance benefits as well. e.g. faster load times and memory e.t.c
I don’t think there will be. I think the opposite might be true.
Re: Load time is very slow
Posted by Roman Isitua <ro...@gmail.com>.
I guess I am in the same situation as you. I am using modules in my app. I
am using modules for two main reasons.
- compile times. With modules as I am adding new features to the app,
compile times will not be affected too much.
This is very useful for my small team. We are not using the latest
workstation with bleeding edge processors. My laptop uses
a 2017 core i7 processor. My other team members have slightly lower specs
than mine. So compile time is something that we
are mindful of.
- modules make it easier to share development tasks. I want to believe
there will be performance benefits as well. e.g. faster load times and
memory e.t.c
As internet speeds in my region are not very fast, deploying the release
version of my app is the only option.
So I definitely need to figure out how to get modules working with
minification.
I have also been following the threads on the developer list on
minification.
On Fri, Dec 24, 2021 at 6:28 PM Maria Jose Esteve <mj...@iest.com> wrote:
> Js-release loads immediately! Very fast.
>
>
>
> I also have the minification problem with Maven modules. It's something I
> was investigating these days ago, on the dev list there are several threads
> about it. In the next few days, I will come back to this because my
> application has a lot of Maven modules and I can't get the release version
> to work.
>
>
>
> Hiedra
>
>
>
> *De:* Roman Isitua <ro...@gmail.com>
> *Enviado el:* viernes, 24 de diciembre de 2021 17:13
> *Para:* users@royale.apache.org
> *Asunto:* Re: Load time is very slow
>
>
>
> Just want to provide an update.
>
>
>
> I successfully upgraded to version 0.9.8. I have deployed the js debug and
> js release respectively. There is a major difference in load times.
>
>
>
> http://132.145.76.98:8081/spaciofm/js-debug/index.html
>
>
>
> http://132.145.76.98:8081/spaciofm/js-release/index.html
>
>
>
> This is a very interesting observation.
>
>
>
> I intend to use maven modules. I have noticed that modules do not work in
> the js release version. I think it is still related to mimification.
>
>
>
> Any idea what compiler settings will correct this ?
>
>
>
> I am using the below
>
>
>
> -source-map=false; -js-default-initializers=true;
> -js-dynamic-access-unknown-members=true; -export-public-symbols=true;
>
>
>
>
>
>
>
> I will now resume work on upgrading to 0.9.9-SNAPSHOT.
>
>
>
> I have attached the poms for the three maven project to this mail.
>
>
>
> Regards,
>
>
>
> On Fri, Dec 24, 2021 at 11:14 AM Piotr Zarzycki <pi...@gmail.com>
> wrote:
>
> Maybe in your pom you are trying to use swf dependency. Show us your whole
> pom - best would be some link to file if possible. Be careful with
> sensitive info cause it’s a public list.
>
>
>
> Maria,
>
>
>
> He is using Maven so SDK and build is the one which he indicates trough
> dependencies.
>
>
>
>
>
> On Fri, 24 Dec 2021 at 10:35, Maria Jose Esteve <mj...@iest.com> wrote:
>
> Hi,
>
> This error tells me that you have dependencies to swf artifacts but your
> SDK "surely" is JS Only can it be?
>
> Hiedra
>
>
>
> *De:* Roman Isitua <ro...@gmail.com>
> *Enviado el:* viernes, 24 de diciembre de 2021 9:59
> *Para:* users@royale.apache.org
> *Asunto:* Re: Load time is very slow
>
>
>
> I have started the upgrade to 0.9.9-SNAPSHOT
>
>
>
> I am getting the following error
>
>
>
> Could not resolve dependencies for project com.spacio:spacio_as3:swc:1.0:
> The following artifacts could not be resolved:
> org.apache.royale.framework:Core:swc:swf:0.9.9-SNAPSHOT,
> org.apache.royale.framework:Reflection:swc:swf:0.9.9-SNAPSHOT,
> org.apache.royale.framework:Network:swc:swf:0.9.9-SNAPSHOT:
> org.apache.royale.framework:Core:swc:swf:0.9.9-SNAPSHOT was not found in
> https://repository.apache.org/content/repositories/snapshots during a
> previous attempt. This failure was cached in the local repository and
> resolution is not reattempted until the update interval of apache-snapshots
> has elapsed or updates are forced
>
>
>
>
>
>
>
>
>
>
>
>
>
> On Thu, Dec 23, 2021 at 8:48 PM Maria Jose Esteve <mj...@iest.com>
> wrote:
>
> Roman, I see you use mx. In version 0.9.9-SNAPSHOT MX has been separated
> into two different projects: MXRoyaleBase and MXRoyale (The first contains
> all the classes that are not visual, and the second the visuals).
>
> You say you are using Materials, so I guess you are not using the MX
> visual controls; you will have to change MXRoyale to MXRoyaleBase and also
> remove
> "<royale.mxroyale.css>-compiler.exclude-defaults-css-files=MXRoyale-0.9.7-js.swc:defaults.css;</royale.mxroyale.css>"
> because you don't need it anymore.
>
>
>
> Let us know how it works for you.
>
> Hiedra
>
>
>
> *De:* Roman Isitua <ro...@gmail.com>
> *Enviado el:* jueves, 23 de diciembre de 2021 18:36
> *Para:* users@royale.apache.org
> *Asunto:* Re: Load time is very slow
>
>
>
> Thanks. I will update my pom with this.
>
> I will try the 0.9.9-snapshot and revert.
>
>
>
>
>
> Regards,
>
>
>
>
>
> On Thu, 23 Dec 2021, 18:30 Maria Jose Esteve, <mj...@iest.com> wrote:
>
> I have like this the artifact download, when I want to force it I change
> "updatePolicy" to "always":
>
>
>
>
>
> <repositories>
>
> <repository>
>
> <id>apache-release</id>
>
> <url>
> https://repository.apache.org/content/repositories/releases</url>
>
> <releases>
>
> <enabled>true</enabled>
>
> *<!--<updatePolicy>always</updatePolicy>-->*
>
> <updatePolicy>daily</updatePolicy>
>
> </releases>
>
> <snapshots>
>
> <enabled>false</enabled>
>
> </snapshots>
>
> </repository>
>
> <repository>
>
> <id>apache-snapshots</id>
>
> <url>
> https://repository.apache.org/content/repositories/snapshots</url>
>
> <releases>
>
> <enabled>false</enabled>
>
> </releases>
>
> <snapshots>
>
> <enabled>true</enabled>
>
> <updatePolicy>daily</updatePolicy>
>
> </snapshots>
>
> </repository>
>
> </repositories>
>
>
>
> <updatePolicy>always
>
> <updatePolicy>daily
>
> <updatePolicy>newer
>
>
>
>
>
> Hiedra
>
>
>
> *De:* Piotr Zarzycki <pi...@gmail.com>
> *Enviado el:* jueves, 23 de diciembre de 2021 18:10
> *Para:* users@royale.apache.org
> *Asunto:* Re: Load time is very slow
>
>
>
> 0.9.8 - is official stable release
>
> 0.9.9-SNAPSHOT - is nightly build
>
>
>
> You do not have to build out of sources in order to have maven artifacts -
> they are stored in maven apache central. It means if you set version in pom
> to 0.9.9-SNAPSHOT - artifacts will be downloaded once a day during first
> build.
>
>
>
> There is a way of forcing downloading artifacts on every build, but I have
> never used that option. Usually that first build and downloaded artifacts
> once is enough.
>
>
>
>
>
>
>
> czw., 23 gru 2021 o 17:57 Roman Isitua <ro...@gmail.com> napisał(a):
>
> I have downloaded 0.9.8 sdk though I am yet to switch to it. I pulled the
> source from git then built it using maven.
>
>
>
> So how can I access the latest sdk ? i.e. 0.9.9 is it in the official
> distribution ?
>
>
>
>
>
>
>
>
>
> On Thu, Dec 23, 2021 at 5:37 PM Maria Jose Esteve <mj...@iest.com>
> wrote:
>
> I have recorded a gif for you to see it yourself [1], about 6 seconds, it
> is not very fast but considering that you are using js-debug, I see it
> acceptable.
>
>
>
> Regarding the sdk change... in principle where you have the literal
> "0.9.7" you should put "0.9.8" are you using the official distribution?
>
> There are many changes from 0.9.7 to 0.9.8 and even more in 0.9.9 which is
> the current one. I advise you to change it to 0.9.9.9 I can help you to
> debug the bugs you get, I also use Maven.
>
>
>
> [1]
> https://drive.google.com/file/d/1Fqr77QN0CEYB6c2KGuvhaliuUtDeR8Ov/view?usp=sharing
>
> Hiedra
>
>
>
> *De:* Roman Isitua <ro...@gmail.com>
> *Enviado el:* jueves, 23 de diciembre de 2021 17:23
> *Para:* users@royale.apache.org
> *Asunto:* Re: Load time is very slow
>
>
>
> Thanks. My team is very new to royale. We have no prior adobe flex
> experience. We are using royale material design.
>
>
>
> How many seconds does it take to load at your end ?
>
>
>
> I will check my internet access speed but I have to get the app to load
> with the internet access speed I am using. Most users will likely be using
> similar internet
>
> connections.
>
>
>
>
>
> I am using maven. To perform an upgrade to version 0.9.8 is it as simple
> as changing the version number in my pom to 0.9.8 ?
>
>
>
> Also, is there a major performance improvement in load time in the newer
> version ?
>
>
>
>
>
>
>
>
>
>
>
>
>
> On Thu, Dec 23, 2021 at 5:10 PM Maria Jose Esteve <mj...@iest.com>
> wrote:
>
> Hi Roman, I like the design you have chosen, it looks great.
>
> It doesn't take me 20 seconds to load, are you sure it's not a question of
> your access?
>
>
>
> I see you are still connected to SDK 0.9.7, couldn't you get it to work
> with the latest one?
>
>
>
> Hiedra
>
>
>
> *De:* Roman Isitua <ro...@gmail.com>
> *Enviado el:* jueves, 23 de diciembre de 2021 16:22
> *Para:* users@royale.apache.org
> *Asunto:* Load time is very slow
>
>
>
> Hi Everyone,
>
>
>
> I am currently working on an app. The app is still in development. I have
> deployed it to a test server online.
>
>
>
> The app can be access on this url below
>
>
>
> http://140.238.127.236:8081/spaciofm/js-debug/index.html
>
>
>
> I noticed that the app loading time is slow. It takes up to 20 seconds to
> load the application. I have checked to see other royale apps
>
> e.g the adobe spectrum demo, jewel tour de jewel demo and the mdl example
> demo. Those apps load much faster.
>
>
>
>
>
>
>
> My maven compilation settings is as follows
>
>
>
> <royale.showbindingWarnings>-compiler.show-binding-warnings=false;</
> royale.showbindingWarnings>
>
> <royale.sourceMapSettings>-source-map=true;</
> royale.sourceMapSettings>
>
> <royale.jsDefaultInitializers>-js-default-initializers=true;</
> royale.jsDefaultInitializers>
>
> <royale.jsDynamicAccessUnknownMembers>
> -js-dynamic-access-unknown-members=true;</
> royale.jsDynamicAccessUnknownMembers>
>
> <royale.targets>JSRoyale</royale.targets>
>
> <royale.debug>true</royale.debug>
>
> <royale.mxroyale.css>
> -compiler.exclude-defaults-css-files=MXRoyale-0.9.7-js.swc:defaults.css;</
> royale.mxroyale.css>
>
>
>
>
>
> I will like to ask what could be the reason for the slow load times ?
>
>
>
> As the app is currently in development is there a need to compile to
> release mode to get fast load times ?
>
>
>
> The file size of the debug version is currently 7mb. I am deploying it in
> a spring boot embedded tomcat server.
>
>
>
>
>
> Any ideas ? I would like to tackle this early in the development phase.
>
>
>
> Regards,
>
>
>
> Roman,
>
>
>
>
>
>
>
>
> --
>
> *Piotr Zarzycki *
>
> --
>
> *Piotr Zarzycki *
>
>
RE: Load time is very slow
Posted by Maria Jose Esteve <mj...@iest.com>.
Js-release loads immediately! Very fast.
I also have the minification problem with Maven modules. It's something I was investigating these days ago, on the dev list there are several threads about it. In the next few days, I will come back to this because my application has a lot of Maven modules and I can't get the release version to work.
Hiedra
De: Roman Isitua <ro...@gmail.com>
Enviado el: viernes, 24 de diciembre de 2021 17:13
Para: users@royale.apache.org
Asunto: Re: Load time is very slow
Just want to provide an update.
I successfully upgraded to version 0.9.8. I have deployed the js debug and js release respectively. There is a major difference in load times.
http://132.145.76.98:8081/spaciofm/js-debug/index.html
http://132.145.76.98:8081/spaciofm/js-release/index.html
This is a very interesting observation.
I intend to use maven modules. I have noticed that modules do not work in the js release version. I think it is still related to mimification.
Any idea what compiler settings will correct this ?
I am using the below
-source-map=false; -js-default-initializers=true; -js-dynamic-access-unknown-members=true; -export-public-symbols=true;
I will now resume work on upgrading to 0.9.9-SNAPSHOT.
I have attached the poms for the three maven project to this mail.
Regards,
On Fri, Dec 24, 2021 at 11:14 AM Piotr Zarzycki <pi...@gmail.com>> wrote:
Maybe in your pom you are trying to use swf dependency. Show us your whole pom - best would be some link to file if possible. Be careful with sensitive info cause it’s a public list.
Maria,
He is using Maven so SDK and build is the one which he indicates trough dependencies.
On Fri, 24 Dec 2021 at 10:35, Maria Jose Esteve <mj...@iest.com>> wrote:
Hi,
This error tells me that you have dependencies to swf artifacts but your SDK "surely" is JS Only can it be?
Hiedra
De: Roman Isitua <ro...@gmail.com>>
Enviado el: viernes, 24 de diciembre de 2021 9:59
Para: users@royale.apache.org<ma...@royale.apache.org>
Asunto: Re: Load time is very slow
I have started the upgrade to 0.9.9-SNAPSHOT
I am getting the following error
Could not resolve dependencies for project com.spacio:spacio_as3:swc:1.0: The following artifacts could not be resolved: org.apache.royale.framework:Core:swc:swf:0.9.9-SNAPSHOT, org.apache.royale.framework:Reflection:swc:swf:0.9.9-SNAPSHOT, org.apache.royale.framework:Network:swc:swf:0.9.9-SNAPSHOT: org.apache.royale.framework:Core:swc:swf:0.9.9-SNAPSHOT was not found in https://repository.apache.org/content/repositories/snapshots during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of apache-snapshots has elapsed or updates are forced
On Thu, Dec 23, 2021 at 8:48 PM Maria Jose Esteve <mj...@iest.com>> wrote:
Roman, I see you use mx. In version 0.9.9-SNAPSHOT MX has been separated into two different projects: MXRoyaleBase and MXRoyale (The first contains all the classes that are not visual, and the second the visuals).
You say you are using Materials, so I guess you are not using the MX visual controls; you will have to change MXRoyale to MXRoyaleBase and also remove "<royale.mxroyale.css>-compiler.exclude-defaults-css-files=MXRoyale-0.9.7-js.swc:defaults.css;</royale.mxroyale.css>" because you don't need it anymore.
Let us know how it works for you.
Hiedra
De: Roman Isitua <ro...@gmail.com>>
Enviado el: jueves, 23 de diciembre de 2021 18:36
Para: users@royale.apache.org<ma...@royale.apache.org>
Asunto: Re: Load time is very slow
Thanks. I will update my pom with this.
I will try the 0.9.9-snapshot and revert.
Regards,
On Thu, 23 Dec 2021, 18:30 Maria Jose Esteve, <mj...@iest.com>> wrote:
I have like this the artifact download, when I want to force it I change "updatePolicy" to "always":
<repositories>
<repository>
<id>apache-release</id>
<url>https://repository.apache.org/content/repositories/releases</url<https://repository.apache.org/content/repositories/releases%3c/url>>
<releases>
<enabled>true</enabled>
<!--<updatePolicy>always</updatePolicy>-->
<updatePolicy>daily</updatePolicy>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>apache-snapshots</id>
<url>https://repository.apache.org/content/repositories/snapshots</url<https://repository.apache.org/content/repositories/snapshots%3c/url>>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
<updatePolicy>daily</updatePolicy>
</snapshots>
</repository>
</repositories>
<updatePolicy>always
<updatePolicy>daily
<updatePolicy>newer
Hiedra
De: Piotr Zarzycki <pi...@gmail.com>>
Enviado el: jueves, 23 de diciembre de 2021 18:10
Para: users@royale.apache.org<ma...@royale.apache.org>
Asunto: Re: Load time is very slow
0.9.8 - is official stable release
0.9.9-SNAPSHOT - is nightly build
You do not have to build out of sources in order to have maven artifacts - they are stored in maven apache central. It means if you set version in pom to 0.9.9-SNAPSHOT - artifacts will be downloaded once a day during first build.
There is a way of forcing downloading artifacts on every build, but I have never used that option. Usually that first build and downloaded artifacts once is enough.
czw., 23 gru 2021 o 17:57 Roman Isitua <ro...@gmail.com>> napisał(a):
I have downloaded 0.9.8 sdk though I am yet to switch to it. I pulled the source from git then built it using maven.
So how can I access the latest sdk ? i.e. 0.9.9 is it in the official distribution ?
On Thu, Dec 23, 2021 at 5:37 PM Maria Jose Esteve <mj...@iest.com>> wrote:
I have recorded a gif for you to see it yourself [1], about 6 seconds, it is not very fast but considering that you are using js-debug, I see it acceptable.
Regarding the sdk change... in principle where you have the literal "0.9.7" you should put "0.9.8" are you using the official distribution?
There are many changes from 0.9.7 to 0.9.8 and even more in 0.9.9 which is the current one. I advise you to change it to 0.9.9.9 I can help you to debug the bugs you get, I also use Maven.
[1] https://drive.google.com/file/d/1Fqr77QN0CEYB6c2KGuvhaliuUtDeR8Ov/view?usp=sharing
Hiedra
De: Roman Isitua <ro...@gmail.com>>
Enviado el: jueves, 23 de diciembre de 2021 17:23
Para: users@royale.apache.org<ma...@royale.apache.org>
Asunto: Re: Load time is very slow
Thanks. My team is very new to royale. We have no prior adobe flex experience. We are using royale material design.
How many seconds does it take to load at your end ?
I will check my internet access speed but I have to get the app to load with the internet access speed I am using. Most users will likely be using similar internet
connections.
I am using maven. To perform an upgrade to version 0.9.8 is it as simple as changing the version number in my pom to 0.9.8 ?
Also, is there a major performance improvement in load time in the newer version ?
On Thu, Dec 23, 2021 at 5:10 PM Maria Jose Esteve <mj...@iest.com>> wrote:
Hi Roman, I like the design you have chosen, it looks great.
It doesn't take me 20 seconds to load, are you sure it's not a question of your access?
I see you are still connected to SDK 0.9.7, couldn't you get it to work with the latest one?
Hiedra
De: Roman Isitua <ro...@gmail.com>>
Enviado el: jueves, 23 de diciembre de 2021 16:22
Para: users@royale.apache.org<ma...@royale.apache.org>
Asunto: Load time is very slow
Hi Everyone,
I am currently working on an app. The app is still in development. I have deployed it to a test server online.
The app can be access on this url below
http://140.238.127.236:8081/spaciofm/js-debug/index.html
I noticed that the app loading time is slow. It takes up to 20 seconds to load the application. I have checked to see other royale apps
e.g the adobe spectrum demo, jewel tour de jewel demo and the mdl example demo. Those apps load much faster.
My maven compilation settings is as follows
<royale.showbindingWarnings>-compiler.show-binding-warnings=false;</royale.showbindingWarnings>
<royale.sourceMapSettings>-source-map=true;</royale.sourceMapSettings>
<royale.jsDefaultInitializers>-js-default-initializers=true;</royale.jsDefaultInitializers>
<royale.jsDynamicAccessUnknownMembers>-js-dynamic-access-unknown-members=true;</royale.jsDynamicAccessUnknownMembers>
<royale.targets>JSRoyale</royale.targets>
<royale.debug>true</royale.debug>
<royale.mxroyale.css>-compiler.exclude-defaults-css-files=MXRoyale-0.9.7-js.swc:defaults.css;</royale.mxroyale.css>
I will like to ask what could be the reason for the slow load times ?
As the app is currently in development is there a need to compile to release mode to get fast load times ?
The file size of the debug version is currently 7mb. I am deploying it in a spring boot embedded tomcat server.
Any ideas ? I would like to tackle this early in the development phase.
Regards,
Roman,
--
Piotr Zarzycki
--
Piotr Zarzycki
Re: Load time is very slow
Posted by Roman Isitua <ro...@gmail.com>.
Just want to provide an update.
I successfully upgraded to version 0.9.8. I have deployed the js debug and
js release respectively. There is a major difference in load times.
http://132.145.76.98:8081/spaciofm/js-debug/index.html
http://132.145.76.98:8081/spaciofm/js-release/index.html
This is a very interesting observation.
I intend to use maven modules. I have noticed that modules do not work in
the js release version. I think it is still related to mimification.
Any idea what compiler settings will correct this ?
I am using the below
-source-map=false; -js-default-initializers=true;
-js-dynamic-access-unknown-members=true; -export-public-symbols=true;
I will now resume work on upgrading to 0.9.9-SNAPSHOT.
I have attached the poms for the three maven project to this mail.
Regards,
On Fri, Dec 24, 2021 at 11:14 AM Piotr Zarzycki <pi...@gmail.com>
wrote:
> Maybe in your pom you are trying to use swf dependency. Show us your whole
> pom - best would be some link to file if possible. Be careful with
> sensitive info cause it’s a public list.
>
> Maria,
>
> He is using Maven so SDK and build is the one which he indicates trough
> dependencies.
>
>
> On Fri, 24 Dec 2021 at 10:35, Maria Jose Esteve <mj...@iest.com> wrote:
>
>> Hi,
>>
>> This error tells me that you have dependencies to swf artifacts but your
>> SDK "surely" is JS Only can it be?
>>
>> Hiedra
>>
>>
>>
>> *De:* Roman Isitua <ro...@gmail.com>
>> *Enviado el:* viernes, 24 de diciembre de 2021 9:59
>> *Para:* users@royale.apache.org
>> *Asunto:* Re: Load time is very slow
>>
>>
>>
>> I have started the upgrade to 0.9.9-SNAPSHOT
>>
>>
>>
>> I am getting the following error
>>
>>
>>
>> Could not resolve dependencies for project com.spacio:spacio_as3:swc:1.0:
>> The following artifacts could not be resolved:
>> org.apache.royale.framework:Core:swc:swf:0.9.9-SNAPSHOT,
>> org.apache.royale.framework:Reflection:swc:swf:0.9.9-SNAPSHOT,
>> org.apache.royale.framework:Network:swc:swf:0.9.9-SNAPSHOT:
>> org.apache.royale.framework:Core:swc:swf:0.9.9-SNAPSHOT was not found in
>> https://repository.apache.org/content/repositories/snapshots during a
>> previous attempt. This failure was cached in the local repository and
>> resolution is not reattempted until the update interval of apache-snapshots
>> has elapsed or updates are forced
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> On Thu, Dec 23, 2021 at 8:48 PM Maria Jose Esteve <mj...@iest.com>
>> wrote:
>>
>> Roman, I see you use mx. In version 0.9.9-SNAPSHOT MX has been separated
>> into two different projects: MXRoyaleBase and MXRoyale (The first contains
>> all the classes that are not visual, and the second the visuals).
>>
>> You say you are using Materials, so I guess you are not using the MX
>> visual controls; you will have to change MXRoyale to MXRoyaleBase and also
>> remove
>> "<royale.mxroyale.css>-compiler.exclude-defaults-css-files=MXRoyale-0.9.7-js.swc:defaults.css;</royale.mxroyale.css>"
>> because you don't need it anymore.
>>
>>
>>
>> Let us know how it works for you.
>>
>> Hiedra
>>
>>
>>
>> *De:* Roman Isitua <ro...@gmail.com>
>> *Enviado el:* jueves, 23 de diciembre de 2021 18:36
>> *Para:* users@royale.apache.org
>> *Asunto:* Re: Load time is very slow
>>
>>
>>
>> Thanks. I will update my pom with this.
>>
>> I will try the 0.9.9-snapshot and revert.
>>
>>
>>
>>
>>
>> Regards,
>>
>>
>>
>>
>>
>> On Thu, 23 Dec 2021, 18:30 Maria Jose Esteve, <mj...@iest.com> wrote:
>>
>> I have like this the artifact download, when I want to force it I change
>> "updatePolicy" to "always":
>>
>>
>>
>>
>>
>> <repositories>
>>
>> <repository>
>>
>> <id>apache-release</id>
>>
>> <url>
>> https://repository.apache.org/content/repositories/releases</url>
>>
>> <releases>
>>
>> <enabled>true</enabled>
>>
>> *<!--<updatePolicy>always</updatePolicy>-->*
>>
>> <updatePolicy>daily</updatePolicy>
>>
>> </releases>
>>
>> <snapshots>
>>
>> <enabled>false</enabled>
>>
>> </snapshots>
>>
>> </repository>
>>
>> <repository>
>>
>> <id>apache-snapshots</id>
>>
>> <url>
>> https://repository.apache.org/content/repositories/snapshots</url>
>>
>> <releases>
>>
>> <enabled>false</enabled>
>>
>> </releases>
>>
>> <snapshots>
>>
>> <enabled>true</enabled>
>>
>> <updatePolicy>daily</updatePolicy>
>>
>> </snapshots>
>>
>> </repository>
>>
>> </repositories>
>>
>>
>>
>> <updatePolicy>always
>>
>> <updatePolicy>daily
>>
>> <updatePolicy>newer
>>
>>
>>
>>
>>
>> Hiedra
>>
>>
>>
>> *De:* Piotr Zarzycki <pi...@gmail.com>
>> *Enviado el:* jueves, 23 de diciembre de 2021 18:10
>> *Para:* users@royale.apache.org
>> *Asunto:* Re: Load time is very slow
>>
>>
>>
>> 0.9.8 - is official stable release
>>
>> 0.9.9-SNAPSHOT - is nightly build
>>
>>
>>
>> You do not have to build out of sources in order to have maven artifacts
>> - they are stored in maven apache central. It means if you set version in
>> pom to 0.9.9-SNAPSHOT - artifacts will be downloaded once a day during
>> first build.
>>
>>
>>
>> There is a way of forcing downloading artifacts on every build, but I
>> have never used that option. Usually that first build and downloaded
>> artifacts once is enough.
>>
>>
>>
>>
>>
>>
>>
>> czw., 23 gru 2021 o 17:57 Roman Isitua <ro...@gmail.com>
>> napisał(a):
>>
>> I have downloaded 0.9.8 sdk though I am yet to switch to it. I pulled the
>> source from git then built it using maven.
>>
>>
>>
>> So how can I access the latest sdk ? i.e. 0.9.9 is it in the official
>> distribution ?
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> On Thu, Dec 23, 2021 at 5:37 PM Maria Jose Esteve <mj...@iest.com>
>> wrote:
>>
>> I have recorded a gif for you to see it yourself [1], about 6 seconds, it
>> is not very fast but considering that you are using js-debug, I see it
>> acceptable.
>>
>>
>>
>> Regarding the sdk change... in principle where you have the literal
>> "0.9.7" you should put "0.9.8" are you using the official distribution?
>>
>> There are many changes from 0.9.7 to 0.9.8 and even more in 0.9.9 which
>> is the current one. I advise you to change it to 0.9.9.9 I can help you to
>> debug the bugs you get, I also use Maven.
>>
>>
>>
>> [1]
>> https://drive.google.com/file/d/1Fqr77QN0CEYB6c2KGuvhaliuUtDeR8Ov/view?usp=sharing
>>
>> Hiedra
>>
>>
>>
>> *De:* Roman Isitua <ro...@gmail.com>
>> *Enviado el:* jueves, 23 de diciembre de 2021 17:23
>> *Para:* users@royale.apache.org
>> *Asunto:* Re: Load time is very slow
>>
>>
>>
>> Thanks. My team is very new to royale. We have no prior adobe flex
>> experience. We are using royale material design.
>>
>>
>>
>> How many seconds does it take to load at your end ?
>>
>>
>>
>> I will check my internet access speed but I have to get the app to load
>> with the internet access speed I am using. Most users will likely be using
>> similar internet
>>
>> connections.
>>
>>
>>
>>
>>
>> I am using maven. To perform an upgrade to version 0.9.8 is it as simple
>> as changing the version number in my pom to 0.9.8 ?
>>
>>
>>
>> Also, is there a major performance improvement in load time in the newer
>> version ?
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> On Thu, Dec 23, 2021 at 5:10 PM Maria Jose Esteve <mj...@iest.com>
>> wrote:
>>
>> Hi Roman, I like the design you have chosen, it looks great.
>>
>> It doesn't take me 20 seconds to load, are you sure it's not a question
>> of your access?
>>
>>
>>
>> I see you are still connected to SDK 0.9.7, couldn't you get it to work
>> with the latest one?
>>
>>
>>
>> Hiedra
>>
>>
>>
>> *De:* Roman Isitua <ro...@gmail.com>
>> *Enviado el:* jueves, 23 de diciembre de 2021 16:22
>> *Para:* users@royale.apache.org
>> *Asunto:* Load time is very slow
>>
>>
>>
>> Hi Everyone,
>>
>>
>>
>> I am currently working on an app. The app is still in development. I have
>> deployed it to a test server online.
>>
>>
>>
>> The app can be access on this url below
>>
>>
>>
>> http://140.238.127.236:8081/spaciofm/js-debug/index.html
>>
>>
>>
>> I noticed that the app loading time is slow. It takes up to 20 seconds
>> to load the application. I have checked to see other royale apps
>>
>> e.g the adobe spectrum demo, jewel tour de jewel demo and the mdl example
>> demo. Those apps load much faster.
>>
>>
>>
>>
>>
>>
>>
>> My maven compilation settings is as follows
>>
>>
>>
>> <royale.showbindingWarnings>-compiler.show-binding-warnings=false;</
>> royale.showbindingWarnings>
>>
>> <royale.sourceMapSettings>-source-map=true;</
>> royale.sourceMapSettings>
>>
>> <royale.jsDefaultInitializers>-js-default-initializers=true;</
>> royale.jsDefaultInitializers>
>>
>> <royale.jsDynamicAccessUnknownMembers>
>> -js-dynamic-access-unknown-members=true;</
>> royale.jsDynamicAccessUnknownMembers>
>>
>> <royale.targets>JSRoyale</royale.targets>
>>
>> <royale.debug>true</royale.debug>
>>
>> <royale.mxroyale.css>
>> -compiler.exclude-defaults-css-files=MXRoyale-0.9.7-js.swc:defaults.css;
>> </royale.mxroyale.css>
>>
>>
>>
>>
>>
>> I will like to ask what could be the reason for the slow load times ?
>>
>>
>>
>> As the app is currently in development is there a need to compile to
>> release mode to get fast load times ?
>>
>>
>>
>> The file size of the debug version is currently 7mb. I am deploying it in
>> a spring boot embedded tomcat server.
>>
>>
>>
>>
>>
>> Any ideas ? I would like to tackle this early in the development phase.
>>
>>
>>
>> Regards,
>>
>>
>>
>> Roman,
>>
>>
>>
>>
>>
>>
>>
>>
>> --
>>
>> *Piotr Zarzycki *
>>
>> --
>
> Piotr Zarzycki
>
Re: Load time is very slow
Posted by Piotr Zarzycki <pi...@gmail.com>.
Maybe in your pom you are trying to use swf dependency. Show us your whole
pom - best would be some link to file if possible. Be careful with
sensitive info cause it’s a public list.
Maria,
He is using Maven so SDK and build is the one which he indicates trough
dependencies.
On Fri, 24 Dec 2021 at 10:35, Maria Jose Esteve <mj...@iest.com> wrote:
> Hi,
>
> This error tells me that you have dependencies to swf artifacts but your
> SDK "surely" is JS Only can it be?
>
> Hiedra
>
>
>
> *De:* Roman Isitua <ro...@gmail.com>
> *Enviado el:* viernes, 24 de diciembre de 2021 9:59
> *Para:* users@royale.apache.org
> *Asunto:* Re: Load time is very slow
>
>
>
> I have started the upgrade to 0.9.9-SNAPSHOT
>
>
>
> I am getting the following error
>
>
>
> Could not resolve dependencies for project com.spacio:spacio_as3:swc:1.0:
> The following artifacts could not be resolved:
> org.apache.royale.framework:Core:swc:swf:0.9.9-SNAPSHOT,
> org.apache.royale.framework:Reflection:swc:swf:0.9.9-SNAPSHOT,
> org.apache.royale.framework:Network:swc:swf:0.9.9-SNAPSHOT:
> org.apache.royale.framework:Core:swc:swf:0.9.9-SNAPSHOT was not found in
> https://repository.apache.org/content/repositories/snapshots during a
> previous attempt. This failure was cached in the local repository and
> resolution is not reattempted until the update interval of apache-snapshots
> has elapsed or updates are forced
>
>
>
>
>
>
>
>
>
>
>
>
>
> On Thu, Dec 23, 2021 at 8:48 PM Maria Jose Esteve <mj...@iest.com>
> wrote:
>
> Roman, I see you use mx. In version 0.9.9-SNAPSHOT MX has been separated
> into two different projects: MXRoyaleBase and MXRoyale (The first contains
> all the classes that are not visual, and the second the visuals).
>
> You say you are using Materials, so I guess you are not using the MX
> visual controls; you will have to change MXRoyale to MXRoyaleBase and also
> remove
> "<royale.mxroyale.css>-compiler.exclude-defaults-css-files=MXRoyale-0.9.7-js.swc:defaults.css;</royale.mxroyale.css>"
> because you don't need it anymore.
>
>
>
> Let us know how it works for you.
>
> Hiedra
>
>
>
> *De:* Roman Isitua <ro...@gmail.com>
> *Enviado el:* jueves, 23 de diciembre de 2021 18:36
> *Para:* users@royale.apache.org
> *Asunto:* Re: Load time is very slow
>
>
>
> Thanks. I will update my pom with this.
>
> I will try the 0.9.9-snapshot and revert.
>
>
>
>
>
> Regards,
>
>
>
>
>
> On Thu, 23 Dec 2021, 18:30 Maria Jose Esteve, <mj...@iest.com> wrote:
>
> I have like this the artifact download, when I want to force it I change
> "updatePolicy" to "always":
>
>
>
>
>
> <repositories>
>
> <repository>
>
> <id>apache-release</id>
>
> <url>
> https://repository.apache.org/content/repositories/releases</url>
>
> <releases>
>
> <enabled>true</enabled>
>
> *<!--<updatePolicy>always</updatePolicy>-->*
>
> <updatePolicy>daily</updatePolicy>
>
> </releases>
>
> <snapshots>
>
> <enabled>false</enabled>
>
> </snapshots>
>
> </repository>
>
> <repository>
>
> <id>apache-snapshots</id>
>
> <url>
> https://repository.apache.org/content/repositories/snapshots</url>
>
> <releases>
>
> <enabled>false</enabled>
>
> </releases>
>
> <snapshots>
>
> <enabled>true</enabled>
>
> <updatePolicy>daily</updatePolicy>
>
> </snapshots>
>
> </repository>
>
> </repositories>
>
>
>
> <updatePolicy>always
>
> <updatePolicy>daily
>
> <updatePolicy>newer
>
>
>
>
>
> Hiedra
>
>
>
> *De:* Piotr Zarzycki <pi...@gmail.com>
> *Enviado el:* jueves, 23 de diciembre de 2021 18:10
> *Para:* users@royale.apache.org
> *Asunto:* Re: Load time is very slow
>
>
>
> 0.9.8 - is official stable release
>
> 0.9.9-SNAPSHOT - is nightly build
>
>
>
> You do not have to build out of sources in order to have maven artifacts -
> they are stored in maven apache central. It means if you set version in pom
> to 0.9.9-SNAPSHOT - artifacts will be downloaded once a day during first
> build.
>
>
>
> There is a way of forcing downloading artifacts on every build, but I have
> never used that option. Usually that first build and downloaded artifacts
> once is enough.
>
>
>
>
>
>
>
> czw., 23 gru 2021 o 17:57 Roman Isitua <ro...@gmail.com> napisał(a):
>
> I have downloaded 0.9.8 sdk though I am yet to switch to it. I pulled the
> source from git then built it using maven.
>
>
>
> So how can I access the latest sdk ? i.e. 0.9.9 is it in the official
> distribution ?
>
>
>
>
>
>
>
>
>
> On Thu, Dec 23, 2021 at 5:37 PM Maria Jose Esteve <mj...@iest.com>
> wrote:
>
> I have recorded a gif for you to see it yourself [1], about 6 seconds, it
> is not very fast but considering that you are using js-debug, I see it
> acceptable.
>
>
>
> Regarding the sdk change... in principle where you have the literal
> "0.9.7" you should put "0.9.8" are you using the official distribution?
>
> There are many changes from 0.9.7 to 0.9.8 and even more in 0.9.9 which is
> the current one. I advise you to change it to 0.9.9.9 I can help you to
> debug the bugs you get, I also use Maven.
>
>
>
> [1]
> https://drive.google.com/file/d/1Fqr77QN0CEYB6c2KGuvhaliuUtDeR8Ov/view?usp=sharing
>
> Hiedra
>
>
>
> *De:* Roman Isitua <ro...@gmail.com>
> *Enviado el:* jueves, 23 de diciembre de 2021 17:23
> *Para:* users@royale.apache.org
> *Asunto:* Re: Load time is very slow
>
>
>
> Thanks. My team is very new to royale. We have no prior adobe flex
> experience. We are using royale material design.
>
>
>
> How many seconds does it take to load at your end ?
>
>
>
> I will check my internet access speed but I have to get the app to load
> with the internet access speed I am using. Most users will likely be using
> similar internet
>
> connections.
>
>
>
>
>
> I am using maven. To perform an upgrade to version 0.9.8 is it as simple
> as changing the version number in my pom to 0.9.8 ?
>
>
>
> Also, is there a major performance improvement in load time in the newer
> version ?
>
>
>
>
>
>
>
>
>
>
>
>
>
> On Thu, Dec 23, 2021 at 5:10 PM Maria Jose Esteve <mj...@iest.com>
> wrote:
>
> Hi Roman, I like the design you have chosen, it looks great.
>
> It doesn't take me 20 seconds to load, are you sure it's not a question of
> your access?
>
>
>
> I see you are still connected to SDK 0.9.7, couldn't you get it to work
> with the latest one?
>
>
>
> Hiedra
>
>
>
> *De:* Roman Isitua <ro...@gmail.com>
> *Enviado el:* jueves, 23 de diciembre de 2021 16:22
> *Para:* users@royale.apache.org
> *Asunto:* Load time is very slow
>
>
>
> Hi Everyone,
>
>
>
> I am currently working on an app. The app is still in development. I have
> deployed it to a test server online.
>
>
>
> The app can be access on this url below
>
>
>
> http://140.238.127.236:8081/spaciofm/js-debug/index.html
>
>
>
> I noticed that the app loading time is slow. It takes up to 20 seconds to
> load the application. I have checked to see other royale apps
>
> e.g the adobe spectrum demo, jewel tour de jewel demo and the mdl example
> demo. Those apps load much faster.
>
>
>
>
>
>
>
> My maven compilation settings is as follows
>
>
>
> <royale.showbindingWarnings>-compiler.show-binding-warnings=false;</
> royale.showbindingWarnings>
>
> <royale.sourceMapSettings>-source-map=true;</
> royale.sourceMapSettings>
>
> <royale.jsDefaultInitializers>-js-default-initializers=true;</
> royale.jsDefaultInitializers>
>
> <royale.jsDynamicAccessUnknownMembers>
> -js-dynamic-access-unknown-members=true;</
> royale.jsDynamicAccessUnknownMembers>
>
> <royale.targets>JSRoyale</royale.targets>
>
> <royale.debug>true</royale.debug>
>
> <royale.mxroyale.css>
> -compiler.exclude-defaults-css-files=MXRoyale-0.9.7-js.swc:defaults.css;</
> royale.mxroyale.css>
>
>
>
>
>
> I will like to ask what could be the reason for the slow load times ?
>
>
>
> As the app is currently in development is there a need to compile to
> release mode to get fast load times ?
>
>
>
> The file size of the debug version is currently 7mb. I am deploying it in
> a spring boot embedded tomcat server.
>
>
>
>
>
> Any ideas ? I would like to tackle this early in the development phase.
>
>
>
> Regards,
>
>
>
> Roman,
>
>
>
>
>
>
>
>
> --
>
> *Piotr Zarzycki *
>
> --
Piotr Zarzycki
RE: Load time is very slow
Posted by Maria Jose Esteve <mj...@iest.com>.
Hi,
This error tells me that you have dependencies to swf artifacts but your SDK "surely" is JS Only can it be?
Hiedra
De: Roman Isitua <ro...@gmail.com>
Enviado el: viernes, 24 de diciembre de 2021 9:59
Para: users@royale.apache.org
Asunto: Re: Load time is very slow
I have started the upgrade to 0.9.9-SNAPSHOT
I am getting the following error
Could not resolve dependencies for project com.spacio:spacio_as3:swc:1.0: The following artifacts could not be resolved: org.apache.royale.framework:Core:swc:swf:0.9.9-SNAPSHOT, org.apache.royale.framework:Reflection:swc:swf:0.9.9-SNAPSHOT, org.apache.royale.framework:Network:swc:swf:0.9.9-SNAPSHOT: org.apache.royale.framework:Core:swc:swf:0.9.9-SNAPSHOT was not found in https://repository.apache.org/content/repositories/snapshots during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of apache-snapshots has elapsed or updates are forced
On Thu, Dec 23, 2021 at 8:48 PM Maria Jose Esteve <mj...@iest.com>> wrote:
Roman, I see you use mx. In version 0.9.9-SNAPSHOT MX has been separated into two different projects: MXRoyaleBase and MXRoyale (The first contains all the classes that are not visual, and the second the visuals).
You say you are using Materials, so I guess you are not using the MX visual controls; you will have to change MXRoyale to MXRoyaleBase and also remove "<royale.mxroyale.css>-compiler.exclude-defaults-css-files=MXRoyale-0.9.7-js.swc:defaults.css;</royale.mxroyale.css>" because you don't need it anymore.
Let us know how it works for you.
Hiedra
De: Roman Isitua <ro...@gmail.com>>
Enviado el: jueves, 23 de diciembre de 2021 18:36
Para: users@royale.apache.org<ma...@royale.apache.org>
Asunto: Re: Load time is very slow
Thanks. I will update my pom with this.
I will try the 0.9.9-snapshot and revert.
Regards,
On Thu, 23 Dec 2021, 18:30 Maria Jose Esteve, <mj...@iest.com>> wrote:
I have like this the artifact download, when I want to force it I change "updatePolicy" to "always":
<repositories>
<repository>
<id>apache-release</id>
<url>https://repository.apache.org/content/repositories/releases</url<https://repository.apache.org/content/repositories/releases%3c/url>>
<releases>
<enabled>true</enabled>
<!--<updatePolicy>always</updatePolicy>-->
<updatePolicy>daily</updatePolicy>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>apache-snapshots</id>
<url>https://repository.apache.org/content/repositories/snapshots</url<https://repository.apache.org/content/repositories/snapshots%3c/url>>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
<updatePolicy>daily</updatePolicy>
</snapshots>
</repository>
</repositories>
<updatePolicy>always
<updatePolicy>daily
<updatePolicy>newer
Hiedra
De: Piotr Zarzycki <pi...@gmail.com>>
Enviado el: jueves, 23 de diciembre de 2021 18:10
Para: users@royale.apache.org<ma...@royale.apache.org>
Asunto: Re: Load time is very slow
0.9.8 - is official stable release
0.9.9-SNAPSHOT - is nightly build
You do not have to build out of sources in order to have maven artifacts - they are stored in maven apache central. It means if you set version in pom to 0.9.9-SNAPSHOT - artifacts will be downloaded once a day during first build.
There is a way of forcing downloading artifacts on every build, but I have never used that option. Usually that first build and downloaded artifacts once is enough.
czw., 23 gru 2021 o 17:57 Roman Isitua <ro...@gmail.com>> napisał(a):
I have downloaded 0.9.8 sdk though I am yet to switch to it. I pulled the source from git then built it using maven.
So how can I access the latest sdk ? i.e. 0.9.9 is it in the official distribution ?
On Thu, Dec 23, 2021 at 5:37 PM Maria Jose Esteve <mj...@iest.com>> wrote:
I have recorded a gif for you to see it yourself [1], about 6 seconds, it is not very fast but considering that you are using js-debug, I see it acceptable.
Regarding the sdk change... in principle where you have the literal "0.9.7" you should put "0.9.8" are you using the official distribution?
There are many changes from 0.9.7 to 0.9.8 and even more in 0.9.9 which is the current one. I advise you to change it to 0.9.9.9 I can help you to debug the bugs you get, I also use Maven.
[1] https://drive.google.com/file/d/1Fqr77QN0CEYB6c2KGuvhaliuUtDeR8Ov/view?usp=sharing
Hiedra
De: Roman Isitua <ro...@gmail.com>>
Enviado el: jueves, 23 de diciembre de 2021 17:23
Para: users@royale.apache.org<ma...@royale.apache.org>
Asunto: Re: Load time is very slow
Thanks. My team is very new to royale. We have no prior adobe flex experience. We are using royale material design.
How many seconds does it take to load at your end ?
I will check my internet access speed but I have to get the app to load with the internet access speed I am using. Most users will likely be using similar internet
connections.
I am using maven. To perform an upgrade to version 0.9.8 is it as simple as changing the version number in my pom to 0.9.8 ?
Also, is there a major performance improvement in load time in the newer version ?
On Thu, Dec 23, 2021 at 5:10 PM Maria Jose Esteve <mj...@iest.com>> wrote:
Hi Roman, I like the design you have chosen, it looks great.
It doesn't take me 20 seconds to load, are you sure it's not a question of your access?
I see you are still connected to SDK 0.9.7, couldn't you get it to work with the latest one?
Hiedra
De: Roman Isitua <ro...@gmail.com>>
Enviado el: jueves, 23 de diciembre de 2021 16:22
Para: users@royale.apache.org<ma...@royale.apache.org>
Asunto: Load time is very slow
Hi Everyone,
I am currently working on an app. The app is still in development. I have deployed it to a test server online.
The app can be access on this url below
http://140.238.127.236:8081/spaciofm/js-debug/index.html
I noticed that the app loading time is slow. It takes up to 20 seconds to load the application. I have checked to see other royale apps
e.g the adobe spectrum demo, jewel tour de jewel demo and the mdl example demo. Those apps load much faster.
My maven compilation settings is as follows
<royale.showbindingWarnings>-compiler.show-binding-warnings=false;</royale.showbindingWarnings>
<royale.sourceMapSettings>-source-map=true;</royale.sourceMapSettings>
<royale.jsDefaultInitializers>-js-default-initializers=true;</royale.jsDefaultInitializers>
<royale.jsDynamicAccessUnknownMembers>-js-dynamic-access-unknown-members=true;</royale.jsDynamicAccessUnknownMembers>
<royale.targets>JSRoyale</royale.targets>
<royale.debug>true</royale.debug>
<royale.mxroyale.css>-compiler.exclude-defaults-css-files=MXRoyale-0.9.7-js.swc:defaults.css;</royale.mxroyale.css>
I will like to ask what could be the reason for the slow load times ?
As the app is currently in development is there a need to compile to release mode to get fast load times ?
The file size of the debug version is currently 7mb. I am deploying it in a spring boot embedded tomcat server.
Any ideas ? I would like to tackle this early in the development phase.
Regards,
Roman,
--
Piotr Zarzycki
Re: Load time is very slow
Posted by Roman Isitua <ro...@gmail.com>.
I have started the upgrade to 0.9.9-SNAPSHOT
I am getting the following error
Could not resolve dependencies for project com.spacio:spacio_as3:swc:1.0:
The following artifacts could not be resolved:
org.apache.royale.framework:Core:swc:swf:0.9.9-SNAPSHOT,
org.apache.royale.framework:Reflection:swc:swf:0.9.9-SNAPSHOT,
org.apache.royale.framework:Network:swc:swf:0.9.9-SNAPSHOT:
org.apache.royale.framework:Core:swc:swf:0.9.9-SNAPSHOT was not found in
https://repository.apache.org/content/repositories/snapshots during a
previous attempt. This failure was cached in the local repository and
resolution is not reattempted until the update interval of apache-snapshots
has elapsed or updates are forced
On Thu, Dec 23, 2021 at 8:48 PM Maria Jose Esteve <mj...@iest.com> wrote:
> Roman, I see you use mx. In version 0.9.9-SNAPSHOT MX has been separated
> into two different projects: MXRoyaleBase and MXRoyale (The first contains
> all the classes that are not visual, and the second the visuals).
>
> You say you are using Materials, so I guess you are not using the MX
> visual controls; you will have to change MXRoyale to MXRoyaleBase and also
> remove
> "<royale.mxroyale.css>-compiler.exclude-defaults-css-files=MXRoyale-0.9.7-js.swc:defaults.css;</royale.mxroyale.css>"
> because you don't need it anymore.
>
>
>
> Let us know how it works for you.
>
> Hiedra
>
>
>
> *De:* Roman Isitua <ro...@gmail.com>
> *Enviado el:* jueves, 23 de diciembre de 2021 18:36
> *Para:* users@royale.apache.org
> *Asunto:* Re: Load time is very slow
>
>
>
> Thanks. I will update my pom with this.
>
> I will try the 0.9.9-snapshot and revert.
>
>
>
>
>
> Regards,
>
>
>
>
>
> On Thu, 23 Dec 2021, 18:30 Maria Jose Esteve, <mj...@iest.com> wrote:
>
> I have like this the artifact download, when I want to force it I change
> "updatePolicy" to "always":
>
>
>
>
>
> <repositories>
>
> <repository>
>
> <id>apache-release</id>
>
> <url>
> https://repository.apache.org/content/repositories/releases</url>
>
> <releases>
>
> <enabled>true</enabled>
>
> *<!--<updatePolicy>always</updatePolicy>-->*
>
> <updatePolicy>daily</updatePolicy>
>
> </releases>
>
> <snapshots>
>
> <enabled>false</enabled>
>
> </snapshots>
>
> </repository>
>
> <repository>
>
> <id>apache-snapshots</id>
>
> <url>
> https://repository.apache.org/content/repositories/snapshots</url>
>
> <releases>
>
> <enabled>false</enabled>
>
> </releases>
>
> <snapshots>
>
> <enabled>true</enabled>
>
> <updatePolicy>daily</updatePolicy>
>
> </snapshots>
>
> </repository>
>
> </repositories>
>
>
>
> <updatePolicy>always
>
> <updatePolicy>daily
>
> <updatePolicy>newer
>
>
>
>
>
> Hiedra
>
>
>
> *De:* Piotr Zarzycki <pi...@gmail.com>
> *Enviado el:* jueves, 23 de diciembre de 2021 18:10
> *Para:* users@royale.apache.org
> *Asunto:* Re: Load time is very slow
>
>
>
> 0.9.8 - is official stable release
>
> 0.9.9-SNAPSHOT - is nightly build
>
>
>
> You do not have to build out of sources in order to have maven artifacts -
> they are stored in maven apache central. It means if you set version in pom
> to 0.9.9-SNAPSHOT - artifacts will be downloaded once a day during first
> build.
>
>
>
> There is a way of forcing downloading artifacts on every build, but I have
> never used that option. Usually that first build and downloaded artifacts
> once is enough.
>
>
>
>
>
>
>
> czw., 23 gru 2021 o 17:57 Roman Isitua <ro...@gmail.com> napisał(a):
>
> I have downloaded 0.9.8 sdk though I am yet to switch to it. I pulled the
> source from git then built it using maven.
>
>
>
> So how can I access the latest sdk ? i.e. 0.9.9 is it in the official
> distribution ?
>
>
>
>
>
>
>
>
>
> On Thu, Dec 23, 2021 at 5:37 PM Maria Jose Esteve <mj...@iest.com>
> wrote:
>
> I have recorded a gif for you to see it yourself [1], about 6 seconds, it
> is not very fast but considering that you are using js-debug, I see it
> acceptable.
>
>
>
> Regarding the sdk change... in principle where you have the literal
> "0.9.7" you should put "0.9.8" are you using the official distribution?
>
> There are many changes from 0.9.7 to 0.9.8 and even more in 0.9.9 which is
> the current one. I advise you to change it to 0.9.9.9 I can help you to
> debug the bugs you get, I also use Maven.
>
>
>
> [1]
> https://drive.google.com/file/d/1Fqr77QN0CEYB6c2KGuvhaliuUtDeR8Ov/view?usp=sharing
>
> Hiedra
>
>
>
> *De:* Roman Isitua <ro...@gmail.com>
> *Enviado el:* jueves, 23 de diciembre de 2021 17:23
> *Para:* users@royale.apache.org
> *Asunto:* Re: Load time is very slow
>
>
>
> Thanks. My team is very new to royale. We have no prior adobe flex
> experience. We are using royale material design.
>
>
>
> How many seconds does it take to load at your end ?
>
>
>
> I will check my internet access speed but I have to get the app to load
> with the internet access speed I am using. Most users will likely be using
> similar internet
>
> connections.
>
>
>
>
>
> I am using maven. To perform an upgrade to version 0.9.8 is it as simple
> as changing the version number in my pom to 0.9.8 ?
>
>
>
> Also, is there a major performance improvement in load time in the newer
> version ?
>
>
>
>
>
>
>
>
>
>
>
>
>
> On Thu, Dec 23, 2021 at 5:10 PM Maria Jose Esteve <mj...@iest.com>
> wrote:
>
> Hi Roman, I like the design you have chosen, it looks great.
>
> It doesn't take me 20 seconds to load, are you sure it's not a question of
> your access?
>
>
>
> I see you are still connected to SDK 0.9.7, couldn't you get it to work
> with the latest one?
>
>
>
> Hiedra
>
>
>
> *De:* Roman Isitua <ro...@gmail.com>
> *Enviado el:* jueves, 23 de diciembre de 2021 16:22
> *Para:* users@royale.apache.org
> *Asunto:* Load time is very slow
>
>
>
> Hi Everyone,
>
>
>
> I am currently working on an app. The app is still in development. I have
> deployed it to a test server online.
>
>
>
> The app can be access on this url below
>
>
>
> http://140.238.127.236:8081/spaciofm/js-debug/index.html
>
>
>
> I noticed that the app loading time is slow. It takes up to 20 seconds to
> load the application. I have checked to see other royale apps
>
> e.g the adobe spectrum demo, jewel tour de jewel demo and the mdl example
> demo. Those apps load much faster.
>
>
>
>
>
>
>
> My maven compilation settings is as follows
>
>
>
> <royale.showbindingWarnings>-compiler.show-binding-warnings=false;</
> royale.showbindingWarnings>
>
> <royale.sourceMapSettings>-source-map=true;</
> royale.sourceMapSettings>
>
> <royale.jsDefaultInitializers>-js-default-initializers=true;</
> royale.jsDefaultInitializers>
>
> <royale.jsDynamicAccessUnknownMembers>
> -js-dynamic-access-unknown-members=true;</
> royale.jsDynamicAccessUnknownMembers>
>
> <royale.targets>JSRoyale</royale.targets>
>
> <royale.debug>true</royale.debug>
>
> <royale.mxroyale.css>
> -compiler.exclude-defaults-css-files=MXRoyale-0.9.7-js.swc:defaults.css;</
> royale.mxroyale.css>
>
>
>
>
>
> I will like to ask what could be the reason for the slow load times ?
>
>
>
> As the app is currently in development is there a need to compile to
> release mode to get fast load times ?
>
>
>
> The file size of the debug version is currently 7mb. I am deploying it in
> a spring boot embedded tomcat server.
>
>
>
>
>
> Any ideas ? I would like to tackle this early in the development phase.
>
>
>
> Regards,
>
>
>
> Roman,
>
>
>
>
>
>
>
>
> --
>
> *Piotr Zarzycki *
>
>
RE: Load time is very slow
Posted by Maria Jose Esteve <mj...@iest.com>.
Roman, I see you use mx. In version 0.9.9-SNAPSHOT MX has been separated into two different projects: MXRoyaleBase and MXRoyale (The first contains all the classes that are not visual, and the second the visuals).
You say you are using Materials, so I guess you are not using the MX visual controls; you will have to change MXRoyale to MXRoyaleBase and also remove "<royale.mxroyale.css>-compiler.exclude-defaults-css-files=MXRoyale-0.9.7-js.swc:defaults.css;</royale.mxroyale.css>" because you don't need it anymore.
Let us know how it works for you.
Hiedra
De: Roman Isitua <ro...@gmail.com>
Enviado el: jueves, 23 de diciembre de 2021 18:36
Para: users@royale.apache.org
Asunto: Re: Load time is very slow
Thanks. I will update my pom with this.
I will try the 0.9.9-snapshot and revert.
Regards,
On Thu, 23 Dec 2021, 18:30 Maria Jose Esteve, <mj...@iest.com>> wrote:
I have like this the artifact download, when I want to force it I change "updatePolicy" to "always":
<repositories>
<repository>
<id>apache-release</id>
<url>https://repository.apache.org/content/repositories/releases</url<https://repository.apache.org/content/repositories/releases%3c/url>>
<releases>
<enabled>true</enabled>
<!--<updatePolicy>always</updatePolicy>-->
<updatePolicy>daily</updatePolicy>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>apache-snapshots</id>
<url>https://repository.apache.org/content/repositories/snapshots</url<https://repository.apache.org/content/repositories/snapshots%3c/url>>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
<updatePolicy>daily</updatePolicy>
</snapshots>
</repository>
</repositories>
<updatePolicy>always
<updatePolicy>daily
<updatePolicy>newer
Hiedra
De: Piotr Zarzycki <pi...@gmail.com>>
Enviado el: jueves, 23 de diciembre de 2021 18:10
Para: users@royale.apache.org<ma...@royale.apache.org>
Asunto: Re: Load time is very slow
0.9.8 - is official stable release
0.9.9-SNAPSHOT - is nightly build
You do not have to build out of sources in order to have maven artifacts - they are stored in maven apache central. It means if you set version in pom to 0.9.9-SNAPSHOT - artifacts will be downloaded once a day during first build.
There is a way of forcing downloading artifacts on every build, but I have never used that option. Usually that first build and downloaded artifacts once is enough.
czw., 23 gru 2021 o 17:57 Roman Isitua <ro...@gmail.com>> napisał(a):
I have downloaded 0.9.8 sdk though I am yet to switch to it. I pulled the source from git then built it using maven.
So how can I access the latest sdk ? i.e. 0.9.9 is it in the official distribution ?
On Thu, Dec 23, 2021 at 5:37 PM Maria Jose Esteve <mj...@iest.com>> wrote:
I have recorded a gif for you to see it yourself [1], about 6 seconds, it is not very fast but considering that you are using js-debug, I see it acceptable.
Regarding the sdk change... in principle where you have the literal "0.9.7" you should put "0.9.8" are you using the official distribution?
There are many changes from 0.9.7 to 0.9.8 and even more in 0.9.9 which is the current one. I advise you to change it to 0.9.9.9 I can help you to debug the bugs you get, I also use Maven.
[1] https://drive.google.com/file/d/1Fqr77QN0CEYB6c2KGuvhaliuUtDeR8Ov/view?usp=sharing
Hiedra
De: Roman Isitua <ro...@gmail.com>>
Enviado el: jueves, 23 de diciembre de 2021 17:23
Para: users@royale.apache.org<ma...@royale.apache.org>
Asunto: Re: Load time is very slow
Thanks. My team is very new to royale. We have no prior adobe flex experience. We are using royale material design.
How many seconds does it take to load at your end ?
I will check my internet access speed but I have to get the app to load with the internet access speed I am using. Most users will likely be using similar internet
connections.
I am using maven. To perform an upgrade to version 0.9.8 is it as simple as changing the version number in my pom to 0.9.8 ?
Also, is there a major performance improvement in load time in the newer version ?
On Thu, Dec 23, 2021 at 5:10 PM Maria Jose Esteve <mj...@iest.com>> wrote:
Hi Roman, I like the design you have chosen, it looks great.
It doesn't take me 20 seconds to load, are you sure it's not a question of your access?
I see you are still connected to SDK 0.9.7, couldn't you get it to work with the latest one?
Hiedra
De: Roman Isitua <ro...@gmail.com>>
Enviado el: jueves, 23 de diciembre de 2021 16:22
Para: users@royale.apache.org<ma...@royale.apache.org>
Asunto: Load time is very slow
Hi Everyone,
I am currently working on an app. The app is still in development. I have deployed it to a test server online.
The app can be access on this url below
http://140.238.127.236:8081/spaciofm/js-debug/index.html
I noticed that the app loading time is slow. It takes up to 20 seconds to load the application. I have checked to see other royale apps
e.g the adobe spectrum demo, jewel tour de jewel demo and the mdl example demo. Those apps load much faster.
My maven compilation settings is as follows
<royale.showbindingWarnings>-compiler.show-binding-warnings=false;</royale.showbindingWarnings>
<royale.sourceMapSettings>-source-map=true;</royale.sourceMapSettings>
<royale.jsDefaultInitializers>-js-default-initializers=true;</royale.jsDefaultInitializers>
<royale.jsDynamicAccessUnknownMembers>-js-dynamic-access-unknown-members=true;</royale.jsDynamicAccessUnknownMembers>
<royale.targets>JSRoyale</royale.targets>
<royale.debug>true</royale.debug>
<royale.mxroyale.css>-compiler.exclude-defaults-css-files=MXRoyale-0.9.7-js.swc:defaults.css;</royale.mxroyale.css>
I will like to ask what could be the reason for the slow load times ?
As the app is currently in development is there a need to compile to release mode to get fast load times ?
The file size of the debug version is currently 7mb. I am deploying it in a spring boot embedded tomcat server.
Any ideas ? I would like to tackle this early in the development phase.
Regards,
Roman,
--
Piotr Zarzycki
Re: Load time is very slow
Posted by Roman Isitua <ro...@gmail.com>.
Thanks. I will update my pom with this.
I will try the 0.9.9-snapshot and revert.
Regards,
On Thu, 23 Dec 2021, 18:30 Maria Jose Esteve, <mj...@iest.com> wrote:
> I have like this the artifact download, when I want to force it I change
> "updatePolicy" to "always":
>
>
>
>
>
> <repositories>
>
> <repository>
>
> <id>apache-release</id>
>
> <url>
> https://repository.apache.org/content/repositories/releases</url>
>
> <releases>
>
> <enabled>true</enabled>
>
> *<!--<updatePolicy>always</updatePolicy>-->*
>
> <updatePolicy>daily</updatePolicy>
>
> </releases>
>
> <snapshots>
>
> <enabled>false</enabled>
>
> </snapshots>
>
> </repository>
>
> <repository>
>
> <id>apache-snapshots</id>
>
> <url>
> https://repository.apache.org/content/repositories/snapshots</url>
>
> <releases>
>
> <enabled>false</enabled>
>
> </releases>
>
> <snapshots>
>
> <enabled>true</enabled>
>
> <updatePolicy>daily</updatePolicy>
>
> </snapshots>
>
> </repository>
>
> </repositories>
>
>
>
> <updatePolicy>always
>
> <updatePolicy>daily
>
> <updatePolicy>newer
>
>
>
>
>
> Hiedra
>
>
>
> *De:* Piotr Zarzycki <pi...@gmail.com>
> *Enviado el:* jueves, 23 de diciembre de 2021 18:10
> *Para:* users@royale.apache.org
> *Asunto:* Re: Load time is very slow
>
>
>
> 0.9.8 - is official stable release
>
> 0.9.9-SNAPSHOT - is nightly build
>
>
>
> You do not have to build out of sources in order to have maven artifacts -
> they are stored in maven apache central. It means if you set version in pom
> to 0.9.9-SNAPSHOT - artifacts will be downloaded once a day during first
> build.
>
>
>
> There is a way of forcing downloading artifacts on every build, but I have
> never used that option. Usually that first build and downloaded artifacts
> once is enough.
>
>
>
>
>
>
>
> czw., 23 gru 2021 o 17:57 Roman Isitua <ro...@gmail.com> napisał(a):
>
> I have downloaded 0.9.8 sdk though I am yet to switch to it. I pulled the
> source from git then built it using maven.
>
>
>
> So how can I access the latest sdk ? i.e. 0.9.9 is it in the official
> distribution ?
>
>
>
>
>
>
>
>
>
> On Thu, Dec 23, 2021 at 5:37 PM Maria Jose Esteve <mj...@iest.com>
> wrote:
>
> I have recorded a gif for you to see it yourself [1], about 6 seconds, it
> is not very fast but considering that you are using js-debug, I see it
> acceptable.
>
>
>
> Regarding the sdk change... in principle where you have the literal
> "0.9.7" you should put "0.9.8" are you using the official distribution?
>
> There are many changes from 0.9.7 to 0.9.8 and even more in 0.9.9 which is
> the current one. I advise you to change it to 0.9.9.9 I can help you to
> debug the bugs you get, I also use Maven.
>
>
>
> [1]
> https://drive.google.com/file/d/1Fqr77QN0CEYB6c2KGuvhaliuUtDeR8Ov/view?usp=sharing
>
> Hiedra
>
>
>
> *De:* Roman Isitua <ro...@gmail.com>
> *Enviado el:* jueves, 23 de diciembre de 2021 17:23
> *Para:* users@royale.apache.org
> *Asunto:* Re: Load time is very slow
>
>
>
> Thanks. My team is very new to royale. We have no prior adobe flex
> experience. We are using royale material design.
>
>
>
> How many seconds does it take to load at your end ?
>
>
>
> I will check my internet access speed but I have to get the app to load
> with the internet access speed I am using. Most users will likely be using
> similar internet
>
> connections.
>
>
>
>
>
> I am using maven. To perform an upgrade to version 0.9.8 is it as simple
> as changing the version number in my pom to 0.9.8 ?
>
>
>
> Also, is there a major performance improvement in load time in the newer
> version ?
>
>
>
>
>
>
>
>
>
>
>
>
>
> On Thu, Dec 23, 2021 at 5:10 PM Maria Jose Esteve <mj...@iest.com>
> wrote:
>
> Hi Roman, I like the design you have chosen, it looks great.
>
> It doesn't take me 20 seconds to load, are you sure it's not a question of
> your access?
>
>
>
> I see you are still connected to SDK 0.9.7, couldn't you get it to work
> with the latest one?
>
>
>
> Hiedra
>
>
>
> *De:* Roman Isitua <ro...@gmail.com>
> *Enviado el:* jueves, 23 de diciembre de 2021 16:22
> *Para:* users@royale.apache.org
> *Asunto:* Load time is very slow
>
>
>
> Hi Everyone,
>
>
>
> I am currently working on an app. The app is still in development. I have
> deployed it to a test server online.
>
>
>
> The app can be access on this url below
>
>
>
> http://140.238.127.236:8081/spaciofm/js-debug/index.html
>
>
>
> I noticed that the app loading time is slow. It takes up to 20 seconds to
> load the application. I have checked to see other royale apps
>
> e.g the adobe spectrum demo, jewel tour de jewel demo and the mdl example
> demo. Those apps load much faster.
>
>
>
>
>
>
>
> My maven compilation settings is as follows
>
>
>
> <royale.showbindingWarnings>-compiler.show-binding-warnings=false;</
> royale.showbindingWarnings>
>
> <royale.sourceMapSettings>-source-map=true;</
> royale.sourceMapSettings>
>
> <royale.jsDefaultInitializers>-js-default-initializers=true;</
> royale.jsDefaultInitializers>
>
> <royale.jsDynamicAccessUnknownMembers>
> -js-dynamic-access-unknown-members=true;</
> royale.jsDynamicAccessUnknownMembers>
>
> <royale.targets>JSRoyale</royale.targets>
>
> <royale.debug>true</royale.debug>
>
> <royale.mxroyale.css>
> -compiler.exclude-defaults-css-files=MXRoyale-0.9.7-js.swc:defaults.css;</
> royale.mxroyale.css>
>
>
>
>
>
> I will like to ask what could be the reason for the slow load times ?
>
>
>
> As the app is currently in development is there a need to compile to
> release mode to get fast load times ?
>
>
>
> The file size of the debug version is currently 7mb. I am deploying it in
> a spring boot embedded tomcat server.
>
>
>
>
>
> Any ideas ? I would like to tackle this early in the development phase.
>
>
>
> Regards,
>
>
>
> Roman,
>
>
>
>
>
>
>
>
> --
>
> *Piotr Zarzycki *
>
RE: Load time is very slow
Posted by Maria Jose Esteve <mj...@iest.com>.
I have like this the artifact download, when I want to force it I change "updatePolicy" to "always":
<repositories>
<repository>
<id>apache-release</id>
<url>https://repository.apache.org/content/repositories/releases</url<https://repository.apache.org/content/repositories/releases%3c/url>>
<releases>
<enabled>true</enabled>
<!--<updatePolicy>always</updatePolicy>-->
<updatePolicy>daily</updatePolicy>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>apache-snapshots</id>
<url>https://repository.apache.org/content/repositories/snapshots</url<https://repository.apache.org/content/repositories/snapshots%3c/url>>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
<updatePolicy>daily</updatePolicy>
</snapshots>
</repository>
</repositories>
<updatePolicy>always
<updatePolicy>daily
<updatePolicy>newer
Hiedra
De: Piotr Zarzycki <pi...@gmail.com>
Enviado el: jueves, 23 de diciembre de 2021 18:10
Para: users@royale.apache.org
Asunto: Re: Load time is very slow
0.9.8 - is official stable release
0.9.9-SNAPSHOT - is nightly build
You do not have to build out of sources in order to have maven artifacts - they are stored in maven apache central. It means if you set version in pom to 0.9.9-SNAPSHOT - artifacts will be downloaded once a day during first build.
There is a way of forcing downloading artifacts on every build, but I have never used that option. Usually that first build and downloaded artifacts once is enough.
czw., 23 gru 2021 o 17:57 Roman Isitua <ro...@gmail.com>> napisał(a):
I have downloaded 0.9.8 sdk though I am yet to switch to it. I pulled the source from git then built it using maven.
So how can I access the latest sdk ? i.e. 0.9.9 is it in the official distribution ?
On Thu, Dec 23, 2021 at 5:37 PM Maria Jose Esteve <mj...@iest.com>> wrote:
I have recorded a gif for you to see it yourself [1], about 6 seconds, it is not very fast but considering that you are using js-debug, I see it acceptable.
Regarding the sdk change... in principle where you have the literal "0.9.7" you should put "0.9.8" are you using the official distribution?
There are many changes from 0.9.7 to 0.9.8 and even more in 0.9.9 which is the current one. I advise you to change it to 0.9.9.9 I can help you to debug the bugs you get, I also use Maven.
[1] https://drive.google.com/file/d/1Fqr77QN0CEYB6c2KGuvhaliuUtDeR8Ov/view?usp=sharing
Hiedra
De: Roman Isitua <ro...@gmail.com>>
Enviado el: jueves, 23 de diciembre de 2021 17:23
Para: users@royale.apache.org<ma...@royale.apache.org>
Asunto: Re: Load time is very slow
Thanks. My team is very new to royale. We have no prior adobe flex experience. We are using royale material design.
How many seconds does it take to load at your end ?
I will check my internet access speed but I have to get the app to load with the internet access speed I am using. Most users will likely be using similar internet
connections.
I am using maven. To perform an upgrade to version 0.9.8 is it as simple as changing the version number in my pom to 0.9.8 ?
Also, is there a major performance improvement in load time in the newer version ?
On Thu, Dec 23, 2021 at 5:10 PM Maria Jose Esteve <mj...@iest.com>> wrote:
Hi Roman, I like the design you have chosen, it looks great.
It doesn't take me 20 seconds to load, are you sure it's not a question of your access?
I see you are still connected to SDK 0.9.7, couldn't you get it to work with the latest one?
Hiedra
De: Roman Isitua <ro...@gmail.com>>
Enviado el: jueves, 23 de diciembre de 2021 16:22
Para: users@royale.apache.org<ma...@royale.apache.org>
Asunto: Load time is very slow
Hi Everyone,
I am currently working on an app. The app is still in development. I have deployed it to a test server online.
The app can be access on this url below
http://140.238.127.236:8081/spaciofm/js-debug/index.html
I noticed that the app loading time is slow. It takes up to 20 seconds to load the application. I have checked to see other royale apps
e.g the adobe spectrum demo, jewel tour de jewel demo and the mdl example demo. Those apps load much faster.
My maven compilation settings is as follows
<royale.showbindingWarnings>-compiler.show-binding-warnings=false;</royale.showbindingWarnings>
<royale.sourceMapSettings>-source-map=true;</royale.sourceMapSettings>
<royale.jsDefaultInitializers>-js-default-initializers=true;</royale.jsDefaultInitializers>
<royale.jsDynamicAccessUnknownMembers>-js-dynamic-access-unknown-members=true;</royale.jsDynamicAccessUnknownMembers>
<royale.targets>JSRoyale</royale.targets>
<royale.debug>true</royale.debug>
<royale.mxroyale.css>-compiler.exclude-defaults-css-files=MXRoyale-0.9.7-js.swc:defaults.css;</royale.mxroyale.css>
I will like to ask what could be the reason for the slow load times ?
As the app is currently in development is there a need to compile to release mode to get fast load times ?
The file size of the debug version is currently 7mb. I am deploying it in a spring boot embedded tomcat server.
Any ideas ? I would like to tackle this early in the development phase.
Regards,
Roman,
--
Piotr Zarzycki
Re: Load time is very slow
Posted by Piotr Zarzycki <pi...@gmail.com>.
0.9.8 - is official stable release
0.9.9-SNAPSHOT - is nightly build
You do not have to build out of sources in order to have maven artifacts -
they are stored in maven apache central. It means if you set version in pom
to 0.9.9-SNAPSHOT - artifacts will be downloaded once a day during first
build.
There is a way of forcing downloading artifacts on every build, but I have
never used that option. Usually that first build and downloaded artifacts
once is enough.
czw., 23 gru 2021 o 17:57 Roman Isitua <ro...@gmail.com> napisał(a):
> I have downloaded 0.9.8 sdk though I am yet to switch to it. I pulled the
> source from git then built it using maven.
>
> So how can I access the latest sdk ? i.e. 0.9.9 is it in the official
> distribution ?
>
>
>
>
> On Thu, Dec 23, 2021 at 5:37 PM Maria Jose Esteve <mj...@iest.com>
> wrote:
>
>> I have recorded a gif for you to see it yourself [1], about 6 seconds, it
>> is not very fast but considering that you are using js-debug, I see it
>> acceptable.
>>
>>
>>
>> Regarding the sdk change... in principle where you have the literal
>> "0.9.7" you should put "0.9.8" are you using the official distribution?
>>
>> There are many changes from 0.9.7 to 0.9.8 and even more in 0.9.9 which
>> is the current one. I advise you to change it to 0.9.9.9 I can help you to
>> debug the bugs you get, I also use Maven.
>>
>>
>>
>> [1]
>> https://drive.google.com/file/d/1Fqr77QN0CEYB6c2KGuvhaliuUtDeR8Ov/view?usp=sharing
>>
>> Hiedra
>>
>>
>>
>> *De:* Roman Isitua <ro...@gmail.com>
>> *Enviado el:* jueves, 23 de diciembre de 2021 17:23
>> *Para:* users@royale.apache.org
>> *Asunto:* Re: Load time is very slow
>>
>>
>>
>> Thanks. My team is very new to royale. We have no prior adobe flex
>> experience. We are using royale material design.
>>
>>
>>
>> How many seconds does it take to load at your end ?
>>
>>
>>
>> I will check my internet access speed but I have to get the app to load
>> with the internet access speed I am using. Most users will likely be using
>> similar internet
>>
>> connections.
>>
>>
>>
>>
>>
>> I am using maven. To perform an upgrade to version 0.9.8 is it as simple
>> as changing the version number in my pom to 0.9.8 ?
>>
>>
>>
>> Also, is there a major performance improvement in load time in the newer
>> version ?
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> On Thu, Dec 23, 2021 at 5:10 PM Maria Jose Esteve <mj...@iest.com>
>> wrote:
>>
>> Hi Roman, I like the design you have chosen, it looks great.
>>
>> It doesn't take me 20 seconds to load, are you sure it's not a question
>> of your access?
>>
>>
>>
>> I see you are still connected to SDK 0.9.7, couldn't you get it to work
>> with the latest one?
>>
>>
>>
>> Hiedra
>>
>>
>>
>> *De:* Roman Isitua <ro...@gmail.com>
>> *Enviado el:* jueves, 23 de diciembre de 2021 16:22
>> *Para:* users@royale.apache.org
>> *Asunto:* Load time is very slow
>>
>>
>>
>> Hi Everyone,
>>
>>
>>
>> I am currently working on an app. The app is still in development. I have
>> deployed it to a test server online.
>>
>>
>>
>> The app can be access on this url below
>>
>>
>>
>> http://140.238.127.236:8081/spaciofm/js-debug/index.html
>>
>>
>>
>> I noticed that the app loading time is slow. It takes up to 20 seconds
>> to load the application. I have checked to see other royale apps
>>
>> e.g the adobe spectrum demo, jewel tour de jewel demo and the mdl example
>> demo. Those apps load much faster.
>>
>>
>>
>>
>>
>>
>>
>> My maven compilation settings is as follows
>>
>>
>>
>> <royale.showbindingWarnings>-compiler.show-binding-warnings=false;</
>> royale.showbindingWarnings>
>>
>> <royale.sourceMapSettings>-source-map=true;</
>> royale.sourceMapSettings>
>>
>> <royale.jsDefaultInitializers>-js-default-initializers=true;</
>> royale.jsDefaultInitializers>
>>
>> <royale.jsDynamicAccessUnknownMembers>
>> -js-dynamic-access-unknown-members=true;</
>> royale.jsDynamicAccessUnknownMembers>
>>
>> <royale.targets>JSRoyale</royale.targets>
>>
>> <royale.debug>true</royale.debug>
>>
>> <royale.mxroyale.css>
>> -compiler.exclude-defaults-css-files=MXRoyale-0.9.7-js.swc:defaults.css;
>> </royale.mxroyale.css>
>>
>>
>>
>>
>>
>> I will like to ask what could be the reason for the slow load times ?
>>
>>
>>
>> As the app is currently in development is there a need to compile to
>> release mode to get fast load times ?
>>
>>
>>
>> The file size of the debug version is currently 7mb. I am deploying it in
>> a spring boot embedded tomcat server.
>>
>>
>>
>>
>>
>> Any ideas ? I would like to tackle this early in the development phase.
>>
>>
>>
>> Regards,
>>
>>
>>
>> Roman,
>>
>>
>>
>>
>>
>>
--
Piotr Zarzycki
Re: Load time is very slow
Posted by Roman Isitua <ro...@gmail.com>.
I have downloaded 0.9.8 sdk though I am yet to switch to it. I pulled the
source from git then built it using maven.
So how can I access the latest sdk ? i.e. 0.9.9 is it in the official
distribution ?
On Thu, Dec 23, 2021 at 5:37 PM Maria Jose Esteve <mj...@iest.com> wrote:
> I have recorded a gif for you to see it yourself [1], about 6 seconds, it
> is not very fast but considering that you are using js-debug, I see it
> acceptable.
>
>
>
> Regarding the sdk change... in principle where you have the literal
> "0.9.7" you should put "0.9.8" are you using the official distribution?
>
> There are many changes from 0.9.7 to 0.9.8 and even more in 0.9.9 which is
> the current one. I advise you to change it to 0.9.9.9 I can help you to
> debug the bugs you get, I also use Maven.
>
>
>
> [1]
> https://drive.google.com/file/d/1Fqr77QN0CEYB6c2KGuvhaliuUtDeR8Ov/view?usp=sharing
>
> Hiedra
>
>
>
> *De:* Roman Isitua <ro...@gmail.com>
> *Enviado el:* jueves, 23 de diciembre de 2021 17:23
> *Para:* users@royale.apache.org
> *Asunto:* Re: Load time is very slow
>
>
>
> Thanks. My team is very new to royale. We have no prior adobe flex
> experience. We are using royale material design.
>
>
>
> How many seconds does it take to load at your end ?
>
>
>
> I will check my internet access speed but I have to get the app to load
> with the internet access speed I am using. Most users will likely be using
> similar internet
>
> connections.
>
>
>
>
>
> I am using maven. To perform an upgrade to version 0.9.8 is it as simple
> as changing the version number in my pom to 0.9.8 ?
>
>
>
> Also, is there a major performance improvement in load time in the newer
> version ?
>
>
>
>
>
>
>
>
>
>
>
>
>
> On Thu, Dec 23, 2021 at 5:10 PM Maria Jose Esteve <mj...@iest.com>
> wrote:
>
> Hi Roman, I like the design you have chosen, it looks great.
>
> It doesn't take me 20 seconds to load, are you sure it's not a question of
> your access?
>
>
>
> I see you are still connected to SDK 0.9.7, couldn't you get it to work
> with the latest one?
>
>
>
> Hiedra
>
>
>
> *De:* Roman Isitua <ro...@gmail.com>
> *Enviado el:* jueves, 23 de diciembre de 2021 16:22
> *Para:* users@royale.apache.org
> *Asunto:* Load time is very slow
>
>
>
> Hi Everyone,
>
>
>
> I am currently working on an app. The app is still in development. I have
> deployed it to a test server online.
>
>
>
> The app can be access on this url below
>
>
>
> http://140.238.127.236:8081/spaciofm/js-debug/index.html
>
>
>
> I noticed that the app loading time is slow. It takes up to 20 seconds to
> load the application. I have checked to see other royale apps
>
> e.g the adobe spectrum demo, jewel tour de jewel demo and the mdl example
> demo. Those apps load much faster.
>
>
>
>
>
>
>
> My maven compilation settings is as follows
>
>
>
> <royale.showbindingWarnings>-compiler.show-binding-warnings=false;</
> royale.showbindingWarnings>
>
> <royale.sourceMapSettings>-source-map=true;</
> royale.sourceMapSettings>
>
> <royale.jsDefaultInitializers>-js-default-initializers=true;</
> royale.jsDefaultInitializers>
>
> <royale.jsDynamicAccessUnknownMembers>
> -js-dynamic-access-unknown-members=true;</
> royale.jsDynamicAccessUnknownMembers>
>
> <royale.targets>JSRoyale</royale.targets>
>
> <royale.debug>true</royale.debug>
>
> <royale.mxroyale.css>
> -compiler.exclude-defaults-css-files=MXRoyale-0.9.7-js.swc:defaults.css;</
> royale.mxroyale.css>
>
>
>
>
>
> I will like to ask what could be the reason for the slow load times ?
>
>
>
> As the app is currently in development is there a need to compile to
> release mode to get fast load times ?
>
>
>
> The file size of the debug version is currently 7mb. I am deploying it in
> a spring boot embedded tomcat server.
>
>
>
>
>
> Any ideas ? I would like to tackle this early in the development phase.
>
>
>
> Regards,
>
>
>
> Roman,
>
>
>
>
>
>
RE: Load time is very slow
Posted by Maria Jose Esteve <mj...@iest.com>.
I have recorded a gif for you to see it yourself [1], about 6 seconds, it is not very fast but considering that you are using js-debug, I see it acceptable.
Regarding the sdk change... in principle where you have the literal "0.9.7" you should put "0.9.8" are you using the official distribution?
There are many changes from 0.9.7 to 0.9.8 and even more in 0.9.9 which is the current one. I advise you to change it to 0.9.9.9 I can help you to debug the bugs you get, I also use Maven.
[1] https://drive.google.com/file/d/1Fqr77QN0CEYB6c2KGuvhaliuUtDeR8Ov/view?usp=sharing
Hiedra
De: Roman Isitua <ro...@gmail.com>
Enviado el: jueves, 23 de diciembre de 2021 17:23
Para: users@royale.apache.org
Asunto: Re: Load time is very slow
Thanks. My team is very new to royale. We have no prior adobe flex experience. We are using royale material design.
How many seconds does it take to load at your end ?
I will check my internet access speed but I have to get the app to load with the internet access speed I am using. Most users will likely be using similar internet
connections.
I am using maven. To perform an upgrade to version 0.9.8 is it as simple as changing the version number in my pom to 0.9.8 ?
Also, is there a major performance improvement in load time in the newer version ?
On Thu, Dec 23, 2021 at 5:10 PM Maria Jose Esteve <mj...@iest.com>> wrote:
Hi Roman, I like the design you have chosen, it looks great.
It doesn't take me 20 seconds to load, are you sure it's not a question of your access?
I see you are still connected to SDK 0.9.7, couldn't you get it to work with the latest one?
Hiedra
De: Roman Isitua <ro...@gmail.com>>
Enviado el: jueves, 23 de diciembre de 2021 16:22
Para: users@royale.apache.org<ma...@royale.apache.org>
Asunto: Load time is very slow
Hi Everyone,
I am currently working on an app. The app is still in development. I have deployed it to a test server online.
The app can be access on this url below
http://140.238.127.236:8081/spaciofm/js-debug/index.html
I noticed that the app loading time is slow. It takes up to 20 seconds to load the application. I have checked to see other royale apps
e.g the adobe spectrum demo, jewel tour de jewel demo and the mdl example demo. Those apps load much faster.
My maven compilation settings is as follows
<royale.showbindingWarnings>-compiler.show-binding-warnings=false;</royale.showbindingWarnings>
<royale.sourceMapSettings>-source-map=true;</royale.sourceMapSettings>
<royale.jsDefaultInitializers>-js-default-initializers=true;</royale.jsDefaultInitializers>
<royale.jsDynamicAccessUnknownMembers>-js-dynamic-access-unknown-members=true;</royale.jsDynamicAccessUnknownMembers>
<royale.targets>JSRoyale</royale.targets>
<royale.debug>true</royale.debug>
<royale.mxroyale.css>-compiler.exclude-defaults-css-files=MXRoyale-0.9.7-js.swc:defaults.css;</royale.mxroyale.css>
I will like to ask what could be the reason for the slow load times ?
As the app is currently in development is there a need to compile to release mode to get fast load times ?
The file size of the debug version is currently 7mb. I am deploying it in a spring boot embedded tomcat server.
Any ideas ? I would like to tackle this early in the development phase.
Regards,
Roman,
Re: Load time is very slow
Posted by Roman Isitua <ro...@gmail.com>.
Unfortunately the js release version does not work. So I am yet to test it.
It compiles but when running it I get an error which I have no idea how to
debug since the code is mimified.
Here is the log
FrontEnd.js:1491 Uncaught TypeError: Cannot read properties of undefined
(reading 'generic')
at gy (FrontEnd.js:1491)
at cQ.o (FrontEnd.js:2003)
at cQ.B (FrontEnd.js:2003)
at uQ (FrontEnd.js:2064)
at SA (FrontEnd.js:2062)
at dz (FrontEnd.js:2065)
at SQ.DN.N (FrontEnd.js:1640)
at new SQ (FrontEnd.js:2156)
at index.html:33
gy @ FrontEnd.js:1491
cQ.o @ FrontEnd.js:2003
cQ.B @ FrontEnd.js:2003
uQ @ FrontEnd.js:2064
SA @ FrontEnd.js:2062
dz @ FrontEnd.js:2065
DN.N @ FrontEnd.js:1640
SQ @ FrontEnd.js:2156
(anonymous) @ index.html:33
Any idea how to debug js release code ?
For this app, I wrote two stand alone libraries that are registered as
maven dependencies in the main application. I think this error is from one
of the stand alone libraries. Is there some setting I need to change when
compiling those libraries for js release ?
Note: js debug works fine, no error at all.
On Thu, Dec 23, 2021 at 5:36 PM Piotr Zarzycki <pi...@gmail.com>
wrote:
> Hi Roman,
>
> Definitely change SDK to newest one - there is a lot improvements. In case
> of your test I think you should use what was produced in bin/js-release -
> does that version load 20 second ?
>
> If you are using Maven it should be a matter of changing version in pom.
>
> Thanks,
> Piotr
>
> czw., 23 gru 2021 o 17:23 Roman Isitua <ro...@gmail.com> napisał(a):
>
>> Thanks. My team is very new to royale. We have no prior adobe flex
>> experience. We are using royale material design.
>>
>> How many seconds does it take to load at your end ?
>>
>> I will check my internet access speed but I have to get the app to load
>> with the internet access speed I am using. Most users will likely be using
>> similar internet
>> connections.
>>
>>
>> I am using maven. To perform an upgrade to version 0.9.8 is it as simple
>> as changing the version number in my pom to 0.9.8 ?
>>
>> Also, is there a major performance improvement in load time in the newer
>> version ?
>>
>>
>>
>>
>>
>>
>> On Thu, Dec 23, 2021 at 5:10 PM Maria Jose Esteve <mj...@iest.com>
>> wrote:
>>
>>> Hi Roman, I like the design you have chosen, it looks great.
>>>
>>> It doesn't take me 20 seconds to load, are you sure it's not a question
>>> of your access?
>>>
>>>
>>>
>>> I see you are still connected to SDK 0.9.7, couldn't you get it to work
>>> with the latest one?
>>>
>>>
>>>
>>> Hiedra
>>>
>>>
>>>
>>> *De:* Roman Isitua <ro...@gmail.com>
>>> *Enviado el:* jueves, 23 de diciembre de 2021 16:22
>>> *Para:* users@royale.apache.org
>>> *Asunto:* Load time is very slow
>>>
>>>
>>>
>>> Hi Everyone,
>>>
>>>
>>>
>>> I am currently working on an app. The app is still in development. I
>>> have deployed it to a test server online.
>>>
>>>
>>>
>>> The app can be access on this url below
>>>
>>>
>>>
>>> http://140.238.127.236:8081/spaciofm/js-debug/index.html
>>>
>>>
>>>
>>> I noticed that the app loading time is slow. It takes up to 20 seconds
>>> to load the application. I have checked to see other royale apps
>>>
>>> e.g the adobe spectrum demo, jewel tour de jewel demo and the mdl
>>> example demo. Those apps load much faster.
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> My maven compilation settings is as follows
>>>
>>>
>>>
>>> <royale.showbindingWarnings>-compiler.show-binding-warnings=false;</
>>> royale.showbindingWarnings>
>>>
>>> <royale.sourceMapSettings>-source-map=true;</
>>> royale.sourceMapSettings>
>>>
>>> <royale.jsDefaultInitializers>-js-default-initializers=true;</
>>> royale.jsDefaultInitializers>
>>>
>>> <royale.jsDynamicAccessUnknownMembers>
>>> -js-dynamic-access-unknown-members=true;</
>>> royale.jsDynamicAccessUnknownMembers>
>>>
>>> <royale.targets>JSRoyale</royale.targets>
>>>
>>> <royale.debug>true</royale.debug>
>>>
>>> <royale.mxroyale.css>
>>> -compiler.exclude-defaults-css-files=MXRoyale-0.9.7-js.swc:defaults.css;
>>> </royale.mxroyale.css>
>>>
>>>
>>>
>>>
>>>
>>> I will like to ask what could be the reason for the slow load times ?
>>>
>>>
>>>
>>> As the app is currently in development is there a need to compile to
>>> release mode to get fast load times ?
>>>
>>>
>>>
>>> The file size of the debug version is currently 7mb. I am deploying it
>>> in a spring boot embedded tomcat server.
>>>
>>>
>>>
>>>
>>>
>>> Any ideas ? I would like to tackle this early in the development phase.
>>>
>>>
>>>
>>> Regards,
>>>
>>>
>>>
>>> Roman,
>>>
>>>
>>>
>>>
>>>
>>
>
> --
>
> Piotr Zarzycki
>
Re: Load time is very slow
Posted by Piotr Zarzycki <pi...@gmail.com>.
Hi Roman,
Definitely change SDK to newest one - there is a lot improvements. In case
of your test I think you should use what was produced in bin/js-release -
does that version load 20 second ?
If you are using Maven it should be a matter of changing version in pom.
Thanks,
Piotr
czw., 23 gru 2021 o 17:23 Roman Isitua <ro...@gmail.com> napisał(a):
> Thanks. My team is very new to royale. We have no prior adobe flex
> experience. We are using royale material design.
>
> How many seconds does it take to load at your end ?
>
> I will check my internet access speed but I have to get the app to load
> with the internet access speed I am using. Most users will likely be using
> similar internet
> connections.
>
>
> I am using maven. To perform an upgrade to version 0.9.8 is it as simple
> as changing the version number in my pom to 0.9.8 ?
>
> Also, is there a major performance improvement in load time in the newer
> version ?
>
>
>
>
>
>
> On Thu, Dec 23, 2021 at 5:10 PM Maria Jose Esteve <mj...@iest.com>
> wrote:
>
>> Hi Roman, I like the design you have chosen, it looks great.
>>
>> It doesn't take me 20 seconds to load, are you sure it's not a question
>> of your access?
>>
>>
>>
>> I see you are still connected to SDK 0.9.7, couldn't you get it to work
>> with the latest one?
>>
>>
>>
>> Hiedra
>>
>>
>>
>> *De:* Roman Isitua <ro...@gmail.com>
>> *Enviado el:* jueves, 23 de diciembre de 2021 16:22
>> *Para:* users@royale.apache.org
>> *Asunto:* Load time is very slow
>>
>>
>>
>> Hi Everyone,
>>
>>
>>
>> I am currently working on an app. The app is still in development. I have
>> deployed it to a test server online.
>>
>>
>>
>> The app can be access on this url below
>>
>>
>>
>> http://140.238.127.236:8081/spaciofm/js-debug/index.html
>>
>>
>>
>> I noticed that the app loading time is slow. It takes up to 20 seconds
>> to load the application. I have checked to see other royale apps
>>
>> e.g the adobe spectrum demo, jewel tour de jewel demo and the mdl example
>> demo. Those apps load much faster.
>>
>>
>>
>>
>>
>>
>>
>> My maven compilation settings is as follows
>>
>>
>>
>> <royale.showbindingWarnings>-compiler.show-binding-warnings=false;</
>> royale.showbindingWarnings>
>>
>> <royale.sourceMapSettings>-source-map=true;</
>> royale.sourceMapSettings>
>>
>> <royale.jsDefaultInitializers>-js-default-initializers=true;</
>> royale.jsDefaultInitializers>
>>
>> <royale.jsDynamicAccessUnknownMembers>
>> -js-dynamic-access-unknown-members=true;</
>> royale.jsDynamicAccessUnknownMembers>
>>
>> <royale.targets>JSRoyale</royale.targets>
>>
>> <royale.debug>true</royale.debug>
>>
>> <royale.mxroyale.css>
>> -compiler.exclude-defaults-css-files=MXRoyale-0.9.7-js.swc:defaults.css;
>> </royale.mxroyale.css>
>>
>>
>>
>>
>>
>> I will like to ask what could be the reason for the slow load times ?
>>
>>
>>
>> As the app is currently in development is there a need to compile to
>> release mode to get fast load times ?
>>
>>
>>
>> The file size of the debug version is currently 7mb. I am deploying it in
>> a spring boot embedded tomcat server.
>>
>>
>>
>>
>>
>> Any ideas ? I would like to tackle this early in the development phase.
>>
>>
>>
>> Regards,
>>
>>
>>
>> Roman,
>>
>>
>>
>>
>>
>
--
Piotr Zarzycki
Re: Load time is very slow
Posted by Roman Isitua <ro...@gmail.com>.
Thanks. My team is very new to royale. We have no prior adobe flex
experience. We are using royale material design.
How many seconds does it take to load at your end ?
I will check my internet access speed but I have to get the app to load
with the internet access speed I am using. Most users will likely be using
similar internet
connections.
I am using maven. To perform an upgrade to version 0.9.8 is it as simple as
changing the version number in my pom to 0.9.8 ?
Also, is there a major performance improvement in load time in the newer
version ?
On Thu, Dec 23, 2021 at 5:10 PM Maria Jose Esteve <mj...@iest.com> wrote:
> Hi Roman, I like the design you have chosen, it looks great.
>
> It doesn't take me 20 seconds to load, are you sure it's not a question of
> your access?
>
>
>
> I see you are still connected to SDK 0.9.7, couldn't you get it to work
> with the latest one?
>
>
>
> Hiedra
>
>
>
> *De:* Roman Isitua <ro...@gmail.com>
> *Enviado el:* jueves, 23 de diciembre de 2021 16:22
> *Para:* users@royale.apache.org
> *Asunto:* Load time is very slow
>
>
>
> Hi Everyone,
>
>
>
> I am currently working on an app. The app is still in development. I have
> deployed it to a test server online.
>
>
>
> The app can be access on this url below
>
>
>
> http://140.238.127.236:8081/spaciofm/js-debug/index.html
>
>
>
> I noticed that the app loading time is slow. It takes up to 20 seconds to
> load the application. I have checked to see other royale apps
>
> e.g the adobe spectrum demo, jewel tour de jewel demo and the mdl example
> demo. Those apps load much faster.
>
>
>
>
>
>
>
> My maven compilation settings is as follows
>
>
>
> <royale.showbindingWarnings>-compiler.show-binding-warnings=false;</
> royale.showbindingWarnings>
>
> <royale.sourceMapSettings>-source-map=true;</
> royale.sourceMapSettings>
>
> <royale.jsDefaultInitializers>-js-default-initializers=true;</
> royale.jsDefaultInitializers>
>
> <royale.jsDynamicAccessUnknownMembers>
> -js-dynamic-access-unknown-members=true;</
> royale.jsDynamicAccessUnknownMembers>
>
> <royale.targets>JSRoyale</royale.targets>
>
> <royale.debug>true</royale.debug>
>
> <royale.mxroyale.css>
> -compiler.exclude-defaults-css-files=MXRoyale-0.9.7-js.swc:defaults.css;</
> royale.mxroyale.css>
>
>
>
>
>
> I will like to ask what could be the reason for the slow load times ?
>
>
>
> As the app is currently in development is there a need to compile to
> release mode to get fast load times ?
>
>
>
> The file size of the debug version is currently 7mb. I am deploying it in
> a spring boot embedded tomcat server.
>
>
>
>
>
> Any ideas ? I would like to tackle this early in the development phase.
>
>
>
> Regards,
>
>
>
> Roman,
>
>
>
>
>
RE: Load time is very slow
Posted by Maria Jose Esteve <mj...@iest.com>.
Hi Roman, I like the design you have chosen, it looks great.
It doesn't take me 20 seconds to load, are you sure it's not a question of your access?
I see you are still connected to SDK 0.9.7, couldn't you get it to work with the latest one?
Hiedra
De: Roman Isitua <ro...@gmail.com>
Enviado el: jueves, 23 de diciembre de 2021 16:22
Para: users@royale.apache.org
Asunto: Load time is very slow
Hi Everyone,
I am currently working on an app. The app is still in development. I have deployed it to a test server online.
The app can be access on this url below
http://140.238.127.236:8081/spaciofm/js-debug/index.html
I noticed that the app loading time is slow. It takes up to 20 seconds to load the application. I have checked to see other royale apps
e.g the adobe spectrum demo, jewel tour de jewel demo and the mdl example demo. Those apps load much faster.
My maven compilation settings is as follows
<royale.showbindingWarnings>-compiler.show-binding-warnings=false;</royale.showbindingWarnings>
<royale.sourceMapSettings>-source-map=true;</royale.sourceMapSettings>
<royale.jsDefaultInitializers>-js-default-initializers=true;</royale.jsDefaultInitializers>
<royale.jsDynamicAccessUnknownMembers>-js-dynamic-access-unknown-members=true;</royale.jsDynamicAccessUnknownMembers>
<royale.targets>JSRoyale</royale.targets>
<royale.debug>true</royale.debug>
<royale.mxroyale.css>-compiler.exclude-defaults-css-files=MXRoyale-0.9.7-js.swc:defaults.css;</royale.mxroyale.css>
I will like to ask what could be the reason for the slow load times ?
As the app is currently in development is there a need to compile to release mode to get fast load times ?
The file size of the debug version is currently 7mb. I am deploying it in a spring boot embedded tomcat server.
Any ideas ? I would like to tackle this early in the development phase.
Regards,
Roman,