I suspect that the following is happening: 1. Language.as uses ROYALE_CLASS_INFO to find interfaces. 2. That makes Closure Compiler assume ROYALE_CLASS_INFO is needed. 3. All the info from ROYALE_CLASS_INFO including the class name and qname is preserved.
Perhaps we should have two variables: 1. ROYALE_CLASS_INFO for the name and qname 2. ROYALE_INTERFACE_INFO for the interface dependency That should free up ROYALE_CLASS_INFO to be removed unless Reflection is used. Thoughts? > On Dec 1, 2021, at 7:50 PM, Harbs <harbs.li...@gmail.com> wrote: > > It looks to me like that’s it. > > We have this included in the minified code which should not be there: > > ke.prototype.g={names:[{name:'IStyleObject',h:fb,kind:k}]}; > >> On Dec 1, 2021, at 7:46 PM, Harbs <harbs.li...@gmail.com> wrote: >> >> Hmm. Maybe. >> >> Greg, I think that’s your area of expertise. >> >>> On Dec 1, 2021, at 7:45 PM, Josh Tynjala <joshtynj...@bowlerhat.dev> wrote: >>> >>> Could those be the qname strings added to the ROYALE_CLASS_INFO object? >>> >>> For example, I assume that this one: >>> >>> fb='org.apache.royale.core.IStyleObject' >>> >>> Comes from here: >>> >>> /** >>> * Metadata >>> * >>> * @type {Object.<string, Array.<Object>>} >>> */ >>> org.apache.royale.core.IStyleObject.prototype.ROYALE_CLASS_INFO = { names: >>> [{ name: 'IStyleObject', qName: 'org.apache.royale.core.IStyleObject', >>> kind: 'interface' }] }; >>> >>> I'm not super familiar with the reflection system, so that's just a guess. >>> >>> -- >>> Josh Tynjala >>> Bowler Hat LLC <https://bowlerhat.dev> >>> >>> >>> On Wed, Dec 1, 2021 at 9:25 AM Harbs <harbs.li...@gmail.com> wrote: >>> >>>> Maybe I’m missing a compiler option, but I compiled this: >>>> >>>> <?xml version="1.0" encoding="utf-8"?> >>>> <js:Application xmlns:fx="http://ns.adobe.com/mxml/2009" >>>> xmlns:js="library://ns.apache.org/royale/basic" >>>> applicationComplete="onComplete()"> >>>> <fx:Script> >>>> <![CDATA[ >>>> private function onComplete():void{ >>>> trace("foo"); >>>> } >>>> ]]> >>>> </fx:Script> >>>> <js:valuesImpl> >>>> <js:SimpleCSSValuesImpl /> >>>> </js:valuesImpl> >>>> <js:initialView> >>>> <js:View> >>>> <js:Label text="ID" id="id1" localId="id1" /> >>>> </js:View> >>>> </js:initialView> >>>> </js:Application> >>>> >>>> with this: >>>> >>>> { >>>> "config": "royale", >>>> "compilerOptions": { >>>> "debug": true, >>>> "targets": ["JSRoyale"], >>>> "source-map": true, >>>> "remove-circulars": true >>>> }, >>>> "additionalOptions": "-js-output-optimization=skipAsCoercions >>>> -allow-abstract-classes=true -js-vector-emulation-class=Array >>>> -js-vector-index-checks=false -js-complex-implicit-coercions=false >>>> -export-public-symbols=false -prevent-rename-protected-symbols=false >>>> -prevent-rename-public-static-methods=false >>>> -prevent-rename-public-instance-methods=false >>>> -prevent-rename-public-static-variables=false >>>> -prevent-rename-public-instance-variables=false >>>> -prevent-rename-public-instance-accessors=false", >>>> "files": >>>> [ >>>> "src/test_project.mxml" >>>> ] >>>> } >>>> >>>> And got this at the top of the minified code: >>>> >>>> >>>> var aa='Error #1034: Type Coercion failed: cannot convert >>>> ',ba='applicationComplete',ca='array',da='backgroundImage',ea='border-box',fa='childrenAdded',f='class',ha='deferredSizeHandler',ia='explicitHeightChanged',ja='explicitWidthChanged',h='function',ka='handleInitComplete',la='handleSizeChange',ma='heightChanged',na='inherit',oa='initComplete',k='interface',pa='number',qa='object',ra='org.apache.royale.core.Application',sa='org.apache.royale.core.ApplicationBase',ta='org.apache.royale.core.Bead', >>>> >>>> ua='org.apache.royale.core.BeadViewBase',va='org.apache.royale.core.DispatcherBead',wa='org.apache.royale.core.ElementWrapper',xa='org.apache.royale.core.GroupBase',ya='org.apache.royale.core.HTMLElementWrapper',za='org.apache.royale.core.IApplicationView',Aa='org.apache.royale.core.IBead',Ba='org.apache.royale.core.IBeadController',Ca='org.apache.royale.core.IBeadLayout',Da='org.apache.royale.core.IBeadModel',Ea='org.apache.royale.core.IBeadView',Fa='org.apache.royale.core.IBorderPaddingMarginValuesImpl', >>>> >>>> Ga='org.apache.royale.core.ICSSImpl',Ha='org.apache.royale.core.IChild',Ia='org.apache.royale.core.IContainer',Ja='org.apache.royale.core.IContentViewHost',Ka='org.apache.royale.core.IDocument',La='org.apache.royale.core.IFlexInfo',Ma='org.apache.royale.core.IId',Na='org.apache.royale.core.IInitialViewApplication',Oa='org.apache.royale.core.ILayoutChild',Pa='org.apache.royale.core.ILayoutHost',Qa='org.apache.royale.core.ILayoutParent',Ra='org.apache.royale.core.ILayoutView',Sa='org.apache.royale.core.IMXMLDocument', >>>> >>>> Ta='org.apache.royale.core.IMeasurementBead',Ua='org.apache.royale.core.IParent',Va='org.apache.royale.core.IParentIUIBase',Wa='org.apache.royale.core.IPopUpHost',Xa='org.apache.royale.core.IPopUpHostParent',Ya='org.apache.royale.core.IRenderedObject',Za='org.apache.royale.core.IRoyaleElement',$a='org.apache.royale.core.IState',ab='org.apache.royale.core.IStatesImpl',bb='org.apache.royale.core.IStatesObject',cb='org.apache.royale.core.IStrand',db='org.apache.royale.core.IStrandWithModel',eb='org.apache.royale.core.IStrandWithModelView', >>>> >>>> fb='org.apache.royale.core.IStyleObject',gb='org.apache.royale.core.IStyleableObject',hb='org.apache.royale.core.IUIBase',ib='org.apache.royale.core.IValuesImpl',jb='org.apache.royale.core.LayoutBase',kb='org.apache.royale.core.SimpleCSSValuesImpl',lb='org.apache.royale.core.UIBase',mb='org.apache.royale.core.ValuesManager',nb='org.apache.royale.core.View',ob='org.apache.royale.core.ViewBase',pb='org.apache.royale.core.WrappedHTMLElement',qb='org.apache.royale.core.layout.EdgeData',rb='org.apache.royale.core.layout.LayoutData', >>>> >>>> sb='org.apache.royale.core.layout.MarginData',tb='org.apache.royale.core.styles.BorderStyles',ub='org.apache.royale.events.BrowserEvent',vb='org.apache.royale.events.ElementEvents',wb='org.apache.royale.events.Event',xb='org.apache.royale.events.EventDispatcher',yb='org.apache.royale.events.IBrowserEvent',zb='org.apache.royale.events.IEventDispatcher',Ab='org.apache.royale.events.IRoyaleEvent',Bb='org.apache.royale.events.ValueChangeEvent',Cb='org.apache.royale.events.ValueEvent',Db='org.apache.royale.events.utils.EventUtils', >>>> Eb='org.apache.royale.html.Label',Fb='org.apache.royale.html.beads.GroupView',Gb='org.apache.royale.html.beads.layouts.BasicLayout',Hb='org.apache.royale.utils.CSSUtils',Ib='org.apache.royale.utils.MXMLDataInterpreter',Jb='org.apache.royale.utils.StringPadder',Kb='org.apache.royale.utils.Timer',Lb='percentHeightChanged',Mb='percentWidthChanged',Nb='resizeHandler',Ob='sizeChanged',Pb='string',Qb='test_project',Rb='viewChanged',Sb='widthChanged';function >>>> l(){return function(){}} >>>> >>>>> On Dec 1, 2021, at 7:14 PM, Josh Tynjala <joshtynj...@bowlerhat.dev> >>>> wrote: >>>>> >>>>>> I also noticed that none of these options seem to allow class names to >>>> be >>>>> dropped. That’s a lot of baggage being carried around for no apparent >>>>> reason. >>>>> >>>>> It's certainly possible that I accidentally overlooked class renaming, >>>> but >>>>> that doesn't sound right to me. I'll double-check. >>>> >>>> >> >