> for example the "MasterConfigSystemModel" is inside the library in the
module "royaleconfigsystem") that are compiled with these options:
> <additionalCompilerOptions>
>            -js-default-initializers=true;
>            -source-map=true;
>            -source-map-source-root=${project.basedir}/src/main/royale/;
> </additionalCompilerOptions>

I see that you use -js-dynamic-access-unknown-members=true in your
application's additionalCompilerOptions, but not in your library's. You
should try adding it to your library too. If you have multiple libraries,
it may be worth trying to add it to all of them.

--
Josh Tynjala
Bowler Hat LLC <https://bowlerhat.dev>


On Tue, Dec 14, 2021 at 9:14 AM Maria Jose Esteve <mjest...@iest.com> wrote:

> Thanks for the explanation Harb, I really didn't understand the term
> Reflection in this context.
> I understand that with " The default compiler options should work with
> Crux and Reflection. Can you test that?" you mean to remove all additional
> compiler options?
>
> I have left only these options:
>
> <additionalCompilerOptions>
>         -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;
> </additionalCompilerOptions>
>
> With these options it has not worked either, but the message has changed a
> little:
>
> An exception occurred: ReferenceError: Error #1065: Variable
> com.iest.winplusweb.models.MasterConfigSystemModel is not defined.
>   at aR (http://localhost:8080/WPWebRelease/App.js:4280:1727)
>     at Function.I$.getMetadataHost (
> http://localhost:8080/WPWebRelease/App.js:6262:45)
>     at H9.getMetadataHost (
> http://localhost:8080/WPWebRelease/App.js:6666:147)
>     at H9.getMetadataHosts (
> http://localhost:8080/WPWebRelease/App.js:6665:299)
>     at H9.fromTypeDefinition (
> http://localhost:8080/WPWebRelease/App.js:6666:381)
>     at Function.HT.getTypeDescriptor (
> http://localhost:8080/WPWebRelease/App.js:5445:880)
>     at Function.WW.constructBean (
> http://localhost:8080/WPWebRelease/App.js:2723:296)
>     at n$.initializeBeans (
> http://localhost:8080/WPWebRelease/App.js:5962:1046)
>     at n$.initialize (http://localhost:8080/WPWebRelease/App.js:5962:915)
>     at EW.constructProviders (
> http://localhost:8080/WPWebRelease/App.js:1149:254)
>
> These options are the ones I use in the pom of the application (views) but
> I have a library with independent modules (the models, controllers,
> services, components, ... for example the "MasterConfigSystemModel" is
> inside the library in the module "royaleconfigsystem") that are compiled
> with these options:
>
> <additionalCompilerOptions>
>             -js-default-initializers=true;
>             -source-map=true;
>             -source-map-source-root=${project.basedir}/src/main/royale/;
> </additionalCompilerOptions>
>
> I don't identify any problematic options.... how do you see it?
>
> Now I'm going to pull from the crux thread... I will study how are the
> pom's of the SDK examples, compile and test in realease mode.
> Thank you very much Harb. I'll keep posting my progress in case it can
> help someone else.
>
> Hiedra
>
> -----Mensaje original-----
> De: Harbs <harbs.li...@gmail.com>
> Enviado el: martes, 14 de diciembre de 2021 14:05
> Para: dev@royale.apache.org
> Asunto: Re: Differences between bebug and release
>
> My guess is you are using Crux. Correct?
>
> As I understand it Crux relies heavily on Reflection. Reflection is used
> to examine your classes at runtime. Part of the minification process can
> rename public pieces of your classes. When that happens, some information
> is lost. As long as the references are preserved everything works.
> Reflection relies on getting information about classes from strings when
> those strings are renamed, the reflection classes will not be able to find
> thew correct classes.
>
> The default compiler options should work with Crux and Reflection. Can you
> test that?
>
> I’m not sure exactly which names are needed for Reflection, so I can’t
> give you a more precise answer on which options you can safely add.
>
> > On Dec 14, 2021, at 1:54 PM, Maria Jose Esteve <mjest...@iest.com>
> wrote:
> >
> >> ..., This means that you can’t rename them without breaking things.
> >
> > Hahahahaha, you've made me a lot calmer.... hahahahahaha
> >
> >> Which rename options do you still have? One of them is causing your
> class paths to be lost.
> >
> > I really don't know what you mean :( The only thing I know is that I
> need the dependency to the Reflexion artifact and I have it specified in
> the pom :P where can I find this information?
> > I will change everything that needs to be changed...
> >
> > Hiedra
> >
> > -----Mensaje original-----
> > De: Harbs <harbs.li...@gmail.com>
> > Enviado el: martes, 14 de diciembre de 2021 12:24
> > Para: dev@royale.apache.org
> > Asunto: Re: Differences between bebug and release
> >
> > We really need a documentation page which explains the minification
> options and its effects.
> >
> > In your specific case, you are using Reflection. Reflection relies on
> the public names in classes, This means that you can’t rename them without
> breaking things. Use of Reflection greatly limits which minification
> options you can use.
> >
> > Which rename options do you still have? One of them is causing your
> class paths to be lost.
> >
> > Harbs
> >
> >> On Dec 14, 2021, at 1:17 PM, Maria Jose Esteve <mjest...@iest.com>
> wrote:
> >>
> >> I have removed the 3 compiler options and the initial errors with XML
> >> now do not occur, however, I still get an error in the model [1]
> >>
> >> [1]
> >> https://drive.google.com/file/d/1gFr4JtsfFRPKo8uQdZ-W64RmofsrJwfc/vie
> >> w
> >> ?usp=sharing
> >>
> >> I would love to "understand" all this, I'm sure it would bother you a
> lot less... excuse me, but I have no idea where to go from here...
> >>
> >> Hiedra.
> >>
> >> -----Mensaje original-----
> >> De: Harbs <harbs.li...@gmail.com>
> >> Enviado el: martes, 14 de diciembre de 2021 11:20
> >> Para: Apache Royale Development <dev@royale.apache.org>
> >> Asunto: Re: Differences between bebug and release
> >>
> >> Actually, you can probably keep -export-public-symbols=false, but
> >> remove -prevent-rename-public-static-methods=false and/or
> >> -prevent-rename-public-instance-methods=false
> >>
> >>> On Dec 14, 2021, at 12:18 PM, Harbs <harbs.li...@gmail.com> wrote:
> >>>
> >>> Try removing  -export-public-symbols=false
> >>>
> >>> You might also need to remove
> >>> -prevent-rename-public-static-methods=false and/or
> >>> -prevent-rename-public-instance-methods=false
> >>>
> >>>> On Dec 14, 2021, at 12:12 PM, Maria Jose Esteve <mjest...@iest.com>
> wrote:
> >>>>
> >>>> 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.h
> >>>>>>> t
> >>>>>>> m
> >>>>>>> l#
> >>>>>>> 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/
> >>>>>>>>>> +f
> >>>>>>>>>> +r
> >>>>>>>>>> +a
> >>>>>>>>>> +me
> >>>>>>>>>> +wo
> >>>>>>>
> >>>>>>>>>> +rks
> >>>>>>>
> >>>>>>>>>> --debug=false
> >>>>>>>
> >>>>>>>>>> +configname=royale
> >>>>>>>
> >>>>>>>>>> --targets=JSRoyale
> >>>>>>>
> >>>>>>>>>> --source-map=true
> >>>>>>>
> >>>>>>>>>> --html-template=src/resources/jewel-example-index-template.ht
> >>>>>>>>>> m
> >>>>>>>>>> l
> >>>>>>>
> >>>>>>>>>>
> >>>>>>>
> >>>>>>>>> --theme=${royalelib}/themes/Jewel-Light-NoFlat-Primary-Blue-Th
> >>>>>>>>> e
> >>>>>>>>> m
> >>>>>>>>> e
> >>>>>>>>> /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