Similar to other situations, if a flag like js-default-initializers makes an 
unexpected difference in your app, save copies of the bin/js-debug that work 
and don't work and compare them.

I've lost track of which thread this was being discussed in, but AIUI, the use 
of strings in the bin/js-debug JS files affect renaming during minification.  
If Google Closure Compiler sees certain usages of strings, it no longer renames 
properties with that string name.  The most interesting place we see that is in 
which getter/setters are in the JS output.  The Object.defineProperties 
structures are objects with the getter/setter names as keys and so IIRC, no 
getter/setter property names are currently renamed in Royale minified output.  
That can be weird because adding some getter/setter to a framework class can 
affect whether something with a similar name used in a completely different 
class gets renamed in the app.  And I think the MXML id/localId usage will 
become getter/setters and also affect the renaming so adding id="foo" in MXML 
can suddenly cause other uses of "foo" to no longer be renamed.

That should theoretically never break the operation of the app, so again, if it 
does, save a working vs non-working copy of bin/js-debug and compare.

HTH,
-Alex


On 7/2/19, 11:36 AM, "Carlos Rovira" <[email protected]> wrote:

    We need to use -js-default-initializers=false in our Royale real project
    too.
    Seems once a project start to grow it needs to be false?
    Hope, others that could document this option (and others) could add it to
    Royale-docs.
    I think we need to have a good reference for this kind of compiler options.
    
    El lun., 1 jul. 2019 a las 13:14, Harbs (<[email protected]>) escribió:
    
    > I found the source of the problem.
    >
    > js-default-initializers needs to be set to false.
    >
    > > On Jul 1, 2019, at 1:36 PM, Harbs <[email protected]> wrote:
    > >
    > > FYI,
    > >
    > > The latest builds of the compiler changes something related to
    > minification.
    > >
    > > I have a library with many untyped references and I’m getting new null
    > reference RTE errors because public vars are undefined.
    >
    >
    
    -- 
    Carlos Rovira
    
https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&amp;data=02%7C01%7Caharui%40adobe.com%7C41bdf8775fc54407eb5708d6ff1c273e%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C1%7C636976893719765798&amp;sdata=kKRdiHItrDWgyRydIv60W1S2%2FhHGfQtgi72RDoGB%2Bp4%3D&amp;reserved=0
    

Reply via email to