When a file is first compiled, it does not contain a "Royale Dependency List".  
 It contains goog.requires and maybe a "Royale Static Dependency List" that 
contains a list of classes used as static dependencies.  The compiler's 
'remove-circulars' handler then processes all of the goog.requires in a file 
and tries to figure out what can be moved to the main application's list of 
goog.requires and what goog.requires must stay in the file in order to satisfy 
the minifier, which tries to match certain goog.requires with other JSDoc like 
@extends and @implements.  Anything not required to be in the file for the 
minifier is put in the "Royale Dependency List".  Any class listed in Royale 
Dependency List should end up in the main application's list of goog.requires.

On the first compile after clean, JS files are being pulled out of SWCs with 
only goog.requires and no "Royale Dependency List" and placed in bin/js-debug.  
The compiler then does what I described above and leaves the JS files from SWCs 
with a "Royale Dependency List".  Files in the source path are transpiled and 
the output contains only goog.requires and no "Royale Dependency List" and then 
they are also processed as described above and given a "Royale Dependency List".

One the subsequent compile, the compiler sees that certain files have a "Royale 
Dependency List" and skips the thinking about what is or isn't required to be 
in the file.   Files in the source path were re-transpiled and only have 
goog.requires and no "Royale Dependency List".   The compiler should be able to 
build up the same list of goog.requires that need to be added to the main 
application's list of goog.requires, and the same list of goog.addDependency 
calls that go in index.html from the information "cached" in the Royale 
Dependency Lists.

I had thought I had gotten rid of duplicate goog.addDependency calls in 
index.html, so verify that you are on the latest compiler.  But I'm not 
surprised there are issues with the cache missing some information.  All of the 
logic should be in GoogDepsWriter.

Is there a goog.addDependency for ApplicationBase.js in the working and 
non-working index.html, and are they different?

-Alex

On 12/18/18, 1:24 PM, "Harbs" <harbs.li...@gmail.com> wrote:

    The dependency list in Application.as is confusing to me:
    
    goog.provide('org.apache.royale.core.Application');
    /* Royale Dependency List: 
org.apache.royale.core.IApplicationView,org.apache.royale.core.IBead,org.apache.royale.core.IChild,org.apache.royale.core.IUIBase,org.apache.royale.core.IValuesImpl,org.apache.royale.core.UIBase,org.apache.royale.core.ValuesManager,org.apache.royale.events.Event,org.apache.royale.utils.MXMLDataInterpreter,org.apache.royale.utils.Timer,org.apache.royale.utils.Language*/
    
    goog.require('org.apache.royale.core.ApplicationBase');
    goog.require('org.apache.royale.core.IParent');
    goog.require('org.apache.royale.core.IPopUpHost');
    goog.require('org.apache.royale.core.IPopUpHostParent');
    goog.require('org.apache.royale.core.IInitialViewApplication');
    goog.require('org.apache.royale.core.IRenderedObject');
    goog.require('org.apache.royale.core.IStrand');
    goog.require('org.apache.royale.events.IEventDispatcher');
    
    Why is the list of requires not included in the dependency list?
    
    > On Dec 18, 2018, at 9:46 PM, Harbs <harbs.li...@gmail.com> wrote:
    > 
    > Yes.
    > 
    > Here’s the references I have to ApplicationBase (besides ApplicationBase 
itself):
    > 
    > line 35 of index.html: 
goog.addDependency('../../../org/apache/royale/core/Application.js', 
['org.apache.royale.core.Application'], 
['org.apache.royale.core.ApplicationBase', 'org.apache.royale.core.IStrand', 
'org.apache.royale.core.IParent', 'org.apache.royale.events.IEventDispatcher', 
'org.apache.royale.core.IInitialViewApplication', 
'org.apache.royale.core.IPopUpHost', 'org.apache.royale.core.IPopUpHostParent', 
'org.apache.royale.core.IRenderedObject']);
    > line 138 of index.html: 
goog.addDependency('../../../org/apache/royale/core/Application.js', 
['org.apache.royale.core.Application'], 
['org.apache.royale.core.ApplicationBase', 'org.apache.royale.core.IStrand', 
'org.apache.royale.core.IParent', 'org.apache.royale.events.IEventDispatcher', 
'org.apache.royale.core.IInitialViewApplication', 
'org.apache.royale.core.IPopUpHost', 'org.apache.royale.core.IPopUpHostParent', 
'org.apache.royale.core.IRenderedObject']);
    > 
    > line 13 of Application.js (it's missing from the Royale Dependency List): 
goog.require('org.apache.royale.core.ApplicationBase');
    > Line 32 same file:  * @extends {org.apache.royale.core.ApplicationBase}
    > Line 47: goog.inherits(org.apache.royale.core.Application, 
org.apache.royale.core.ApplicationBase);
    > 
    > The require of Application is before the one for ApplicationBase. I’m 
assuming that might be the source of the problem.
    > 
    > I also noticed that the index.html files are very different and the order 
of the addDependencies are totally different. The working file is 1269 lines 
and the broken one is 975.
    > 
    > I’m out of time right now. I’ll spend more time in the morning…
    > 
    > Thanks,
    > Harbs
    > 
    >> On Dec 18, 2018, at 9:27 PM, Alex Harui <aha...@adobe.com.INVALID> wrote:
    >> 
    >> Do you still get the ApplicationBase error when loading the 
bin/js-debug/index.html?
    >> 
    >> On 12/18/18, 11:23 AM, "Harbs" <harbs.li...@gmail.com> wrote:
    >> 
    >>   The non-cleaned one is missing these lines from my main application 
file:
    >>   goog.require('org.apache.royale.events.getTargetWrapper');
    >>   goog.require('org.apache.royale.events.utils.EventUtils');
    >>   goog.require('org.apache.royale.utils.PointUtils');
    >>   goog.require('org.apache.royale.geom.Point');
    >> 
    >>   These classes are also missing from the index file.
    >> 
    >>   It also reordered some css.
    >> 
    >>   A quick look shows no other differences. I’m clueless on what’s 
special about these files...
    >> 
    >>   I’m downloading UltraCompare to see if a thorough folder compare turns 
up any other differences.
    >> 
    >>   Harbs
    >> 
    >>> On Dec 18, 2018, at 8:48 PM, Greg Dove <greg.d...@gmail.com> wrote:
    >>> 
    >>> fwiw I have seen this issue also Harbs. I always clean before any build 
to
    >>> avoid issues.
    >>> 
    >>> On Wed, Dec 19, 2018 at 7:26 AM Harbs <harbs.li...@gmail.com> wrote:
    >>> 
    >>>> OK.
    >>>> 
    >>>> I take it that the answer to my question is no. I’ll do the research 
and
    >>>> report my findings.
    >>>> 
    >>>> Thanks,
    >>>> Harbs
    >>>> 
    >>>>> On Dec 18, 2018, at 8:24 PM, Alex Harui <aha...@adobe.com.INVALID>
    >>>> wrote:
    >>>>> 
    >>>>> Try saving the bin/js-debug folder after a clean and compare it to a
    >>>> build without a clean.  The cached dependency information must be 
losing
    >>>> something.
    >>>>> 
    >>>>> -Alex
    >>>>> 
    >>>>> On 12/18/18, 10:14 AM, "Harbs" <harbs.li...@gmail.com> wrote:
    >>>>> 
    >>>>> A few weeks ago I noticed that I needed to clean every time I do a
    >>>> release build. (I get errors during minification.)
    >>>>> 
    >>>>> Now I see that even the debug build is not working without cleaning
    >>>> first. I’m currently getting:
    >>>>> 
    >>>>> Uncaught Error: Undefined nameToPath for
    >>>> org.apache.royale.core.ApplicationBase
    >>>>> at visitNode (base.js:1356)
    >>>>> 
    >>>>> Is this a known problem?
    >>>>> 
    >>>>> Harbs
    >>>>> 
    >>>> 
    >>>> 
    >> 
    >> 
    >> 
    > 
    
    

Reply via email to