I compile with Maven:

<additionalCompilerOptions>
                        -js-default-initializers=true;
                -source-map=true;
                        -js-dynamic-access-unknown-members=true <!-- to access 
JSON object graph subobjects -->
                        
-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
                        -prevent-rename-public-static-methods=false
                        -prevent-rename-public-instance-methods=false
</additionalCompilerOptions>

As you will see I use some of the new options Josh introduced to reduce the 
output size... I have read your conversation about it, but I haven't modified 
anything because the option that seems to give problems I don't have . 

I am modifying the recovery, as suggested by Greg (via xmlData['xxx'] instead 
of xmlData.child('xxxx') and this seems to fix it BUT I want to know why and if 
I can avoid it because until not long ago this worked fine in release.
As soon as I have verified it works I will go back and test by removing each of 
the compiler options to see if they are interfering. Any suggestions? :P

Hiedra

-----Mensaje original-----
De: Harbs <harbs.li...@gmail.com> 
Enviado el: martes, 14 de diciembre de 2021 10:54
Para: dev@royale.apache.org
Asunto: Re: Differences between bebug and release

What is the full list of compiler options you are using?

> On Dec 14, 2021, at 10:46 AM, Maria Jose Esteve <mjest...@iest.com> wrote:
> 
> The option -js-dynamic-access-unknown-members=true I have it, I will check 
> the rest you tell me....
> 
> Thx.
> Hiedra
> 
> 
> -----Mensaje original-----
> De: Greg Dove <greg.d...@gmail.com>
> Enviado el: martes, 14 de diciembre de 2021 9:36
> Para: Apache Royale Development <dev@royale.apache.org>
> Asunto: Re: Differences between bebug and release
> 
> It's not obvious when you encounter these issues.
> 
> I would probably try:
> 
> new XML (e.target['data']);
> just in case that is being renamed.
> 
> or perhaps the -js-dynamic-access-unknown-members=true that Harbs and others 
> have mentioned.
> 
> If that doesn't work I would try something like:
> 
> var xmlData:XML = new XML (e.target.data); COMPILE::JS{ 
> console.log('js-release check of xml:', xmlData); }
> 
> to see in the js console what an XML instance looks like in release mode.
> If there is no 'child' method on that, then I think there is some other 
> problem there.
> 
> 
> On Tue, Dec 14, 2021 at 9:17 PM Maria Jose Esteve <mjest...@iest.com> wrote:
> 
>> Hello,
>> I had not come back to this error...
>> Yes Greg, just one, with which I load the backend configuration.... 
>> On line 40 ...
>> 
>>        private function loadXML(e:Event):void{
>>                var xmlData:XML = new XML (e.target.data);
>>        /* Procesar datos del XML */
>>        servicesConfig.WPWebService.source = 
>> xmlData.child("source").toString(); <-- Line 40
>>        servicesConfig.loginChannel.channelId = 
>> xmlData.child("channelId").toString();
>> 
>> The fact is that this is in the application, almost from the 
>> beginning and had not given me any errors previously when running the 
>> release version.
>> Could you explain a bit more? Maybe for you it's obvious but I don't 
>> see it :P
>> 
>> Thx.
>> Hiedra
>> 
>> -----Mensaje original-----
>> De: Greg Dove <greg.d...@gmail.com>
>> Enviado el: martes, 14 de diciembre de 2021 2:05
>> Para: Apache Royale Development <dev@royale.apache.org>
>> Asunto: Re: Differences between bebug and release
>> 
>> Hi Maria,
>> 
>> Do you use any XML in your app?
>> 
>> And/or what code is line 40 in your App.mxml ? Is it an event handler 
>> for a service call?
>> 
>> 
>> 
>> 
>> On Sat, Dec 11, 2021 at 4:11 AM Maria Jose Esteve <mjest...@iest.com>
>> wrote:
>> 
>>> As I mentioned in another post, my release version doesn't work 
>>> either (a few months ago I did a test deployment and it worked, with 
>>> less code of course). In my case I get this error:
>>> 
>>> 
>>> 
>>> App.mxml:40 Uncaught TypeError: a.child is not a function
>>> 
>>>    at $$.J.Zwa (App.mxml:40)
>>> 
>>>    at B4.J.HA (EventDispatcher.as:131)
>>> 
>>>    at Jxa (eventtarget.js:381)
>>> 
>>>    at B4.J.dispatchEvent (EventDispatcher.as:108)
>>> 
>>>    at B4.J.nLa (URLLoader.as:367)
>>> 
>>> 
>>> 
>>> My build is maven, different from Hugo's, but could the errors be
>> related?
>>> 
>>> @Harbs, could this be related to the comments made lately when minifying?
>>> 
>>> 
>>> 
>>> I can tell this is all hyper-mega-new to me? 😝
>>> 
>>> 
>>> 
>>> Hiedra
>>> 
>>> 
>>> 
>>> -----Mensaje original-----
>>> De: Harbs <harbs.li...@gmail.com>
>>> Enviado el: viernes, 10 de diciembre de 2021 14:05
>>> Para: dev@royale.apache.org
>>> Asunto: Re: Differences between bebug and release
>>> 
>>> 
>>> 
>>> You can try setting -js-dynamic-access-unknown-members=true although 
>>> normally it shouldn’t be necessary with the current defaults.
>>> 
>>> 
>>> 
>>> 
>>> https://apache.github.io/royale-docs/compiler/compiler-options.html#
>>> js
>>> -dynamic-access-unknown-members
>>> 
>>> 
>>> 
>>>> On Dec 10, 2021, at 2:43 PM, Hugo Ferreira <hferreira...@gmail.com
>>> <mailto:hferreira...@gmail.com>> wrote:
>>> 
>>>> 
>>> 
>>>> I only see an error in console that does not seems related:
>>> 
>>>> 
>>> 
>>>> telemetryproxy.html:1 Failed to load resource: the server responded
>>> 
>>>> with a status of 404 ()
>>> 
>>>> 
>>> 
>>>> What's the option to build in release without minify to check if 
>>>> that
>>> 
>>>> is really the case?
>>> 
>>>> 
>>> 
>>>> Harbs <harbs.li...@gmail.com<mailto:harbs.li...@gmail.com>>
>>>> escreveu no
>>> dia sexta, 10/12/2021 Ă (s) 09:08:
>>> 
>>>> 
>>> 
>>>>> I meant in your browser. Is there an error in the browser console?
>>> 
>>>>> 
>>> 
>>>>>> On Dec 10, 2021, at 3:17 AM, Hugo Ferreira 
>>>>>> <hferreira...@gmail.com
>>> <mailto:hferreira...@gmail.com>>
>>> 
>>>>> wrote:
>>> 
>>>>>> 
>>> 
>>>>>> Hi,
>>> 
>>>>>> 
>>> 
>>>>>> This is the full log from my dev tool (Visual Studio Code):
>>> 
>>>>>> 
>>> 
>>>>>>> Executing task: /usr/bin/java -jar
>>> 
>>>>>> 
>>> 
>>>>> /Users/hugo/.vscode/extensions/bowlerhatllc.vscode-as3mxml-1.10.0
>>>>> /b
>>>>> in
>>> 
>>>>> /asconfigc.jar
>>> 
>>>>>> --sdk /Volumes/Data/SDK/apache-royale-src/apache-royale
>>> 
>>>>>> --debug=false --project
>>> 
>>>>>> /Volumes/Data/CloudDrive/Projects/GC/AddIn/asconfig.json <
>>> 
>>>>>> 
>>> 
>>>>>> MXMLJSC
>>> 
>>>>>> +royalelib=/Volumes/Data/SDK/apache-royale-src/apache-royale/fra
>>>>>> +me
>>>>>> +wo
>>> 
>>>>>> +rks
>>> 
>>>>>> --debug=false
>>> 
>>>>>> +configname=royale
>>> 
>>>>>> --targets=JSRoyale
>>> 
>>>>>> --source-map=true
>>> 
>>>>>> --html-template=src/resources/jewel-example-index-template.html
>>> 
>>>>>> 
>>> 
>>>>> --theme=${royalelib}/themes/Jewel-Light-NoFlat-Primary-Blue-Theme
>>>>> /s
>>>>> rc
>>> 
>>>>> /main/resources/defaults.css
>>> 
>>>>>> --js-library-path+=${royalelib}/js/libs/MXRoyaleJS.swc
>>> 
>>>>>> -remove-circulars
>>> 
>>>>>> -js-output-optimization=skipAsCoercions
>>> 
>>>>>> -compiler.exclude-defaults-css-files=MXRoyale-0.9.9-js.swc:defaults.
>>> 
>>>>>> css
>>> 
>>>>>> -keep-as3-metadata+=Transient
>>> 
>>>>>> --
>>> 
>>>>>> src/App.mxml
>>> 
>>>>>> Dec 10, 2021 1:14:43 AM
>>> 
>>>>>> com.google.javascript.jscomp.LoggerErrorManager
>>> 
>>>>>> printSummary
>>> 
>>>>>> INFO: 0 error(s), 0 warning(s), 98.0% typed The project 'App' 
>>>>>> has
>>> 
>>>>>> been successfully compiled and optimized.
>>> 
>>>>>> 44.034354896 seconds
>>> 
>>>>>> 
>>> 
>>>>>> Terminal will be reused by tasks, press any key to close it.
>>> 
>>>>>> 
>>> 
>>>>>> No errors.
>>> 
>>>>>> No warning.
>>> 
>>>>>> But custom itemerrors not appear and a few features do not show.
>>> 
>>>>>> Building in debug mode and all works perfectly.
>>> 
>>>>>> 
>>> 
>>>>>> 
>>> 
>>>>>> Harbs <harbs.li...@gmail.com<mailto:harbs.li...@gmail.com>>
>>>>>> escreveu
>>> no dia quinta, 9/12/2021 Ă (s)
>>> 
>>>>> 00:05:
>>> 
>>>>>> 
>>> 
>>>>>>> Differences in release mode is generally because of renaming 
>>>>>>> when
>>> 
>>>>>>> minifying. Do you get an error in the dev tools?
>>> 
>>>>>>> 
>>> 
>>>>>>> Make sure you’re using typedefs correctly for external APIs.
>>> 
>>>>>>> 
>>> 
>>>>>>> Harbs
>>> 
>>>>>>> 
>>> 
>>>>>>>> On Dec 9, 2021, at 1:52 AM, Hugo Ferreira 
>>>>>>>> <hferreira...@gmail.com
>>> <mailto:hferreira...@gmail.com>>
>>> 
>>>>>>> wrote:
>>> 
>>>>>>>> 
>>> 
>>>>>>>> Hi,
>>> 
>>>>>>>> 
>>> 
>>>>>>>> I just finished my first Royale Add-In application that was 
>>>>>>>> tested
>>> 
>>>>>>>> only
>>> 
>>>>>>> in
>>> 
>>>>>>>> debug mode.
>>> 
>>>>>>>> Now I compiled in release mode and when I was testing I saw 
>>>>>>>> that
>>> 
>>>>>>>> custom item renderers did not appear.
>>> 
>>>>>>>> Probably this is not merged to the App.js single file ?
>>> 
>>>>>>> 
>>> 
>>>>>>> 
>>> 
>>>>> 
>>> 
>>>>> 
>>> 
>>> 
>>> 
>> 

Reply via email to