Thanks Alex,

I confirm this fixed things with the problem I described. I rebuilt Falcon
using maven, and after that, compiling without remove-circulars does not
have the issue I experienced prior.

It was important to clean the local project first (I only mention this
because I often forget to do this myself and others reading this may need
to remember to do the same).

FWIW I tried with remove-circulars again but that broke on 'No GoogDep for
console' this time, but I guess you are still working on this.

BTW I expect to be able to be more active on the project in the coming
weeks, but I won't be able to do very much specifically within the next
week or two because of looming client deadlines.
I will add tickets as I notice things (I can see some additional fixes in
the reflection area for instance, just have not investigated enough yet to
articulate them)


On Wed, Mar 29, 2017 at 6:13 AM, Alex Harui <aha...@adobe.com> wrote:

>
>
> On 3/28/17, 12:59 AM, "Greg Dove" <gregd...@apache.org> wrote:
>
> >Hi Alex, if you have time, perhaps you can shed some light on this?
> >
> >I have an mxml component using states, that implements an Interface,
> >IFormSequence.
> >
> >the generated CLASS_INFO looks like this:
> >FLEXJS_CLASS_INFO = { names: [{ name: 'ActionForm', qName:
> >'components.forms.ActionForm', kind: 'class'  }], interfaces:
> >[components.forms.IFormSequence] };
> >
> >and the goog.require for the interface is there at the top
> >goog.require('components.forms.IFormSequence');
> >
> >I notice that the
> >goog.addDependency('../../../components/forms/IFormSequence.js',
> >['components.forms.IFormSequence'], []);
> >
> >appears after the
> >goog.addDependency('../../../components/forms/ActionForm.js',
> >['components.forms.ActionForm'], ['org.apache.flex.html.Group']);
> >in the index.html.
> >Perhaps the order here is not important and goog resolves everything
> >somehow, but I did wonder if the dependency chain in for ActionForm.js
> >above should also contain the interface (that's a question, not a
> >suggestion - I don't know what is right here). At the moment there is an
> >issue where there is an interface check on startup when states or styles
> >or something like this are being initialized (it is actually a check for
> >a different interface, but because the 'interfaces' array is defined and
> >has length in CLASS_INFO it looks there and tries to follow follow the
> >inheritance chain on the undefined Interface reference, causing mayhem).
> >Because the reference inside the CLASS_INFO evaluates to undefined, I
> >know the dependencies are not loading in the right order.
>
> AFAIK, the order of addDependency not important.  The addDependency calls
> appear to build a lookup table that doesn't get used until evaluating the
> first goog.require.
>
> Without -remove-circulars, any class or interface reference that is
> actually used in the output should have a goog.require for it.  In the
> compiler, the usedNames list keeps track of which classes and interfaces
> are in the output.  Type references do not always end up in the output.
> For example, if the only reference in AS is "var foo:IMyInterface" then
> IMyInterface doesn't go in the output because we don't generate
> type-checking code.
>
> Starting last week, With -remove-circulars, only references via extends,
> implements, and static initializers go in the dependency list and retain
> goog.requires in the output.  But in this case, the interface should still
> be in the list.
>
> Anyway, the list of dependencies was broken until about two commits ago.
> So try again and see if it works.
> And not handling native JS types in static initializers was causing the
> exception in GetListOFFiles until my most recent commit.
>
> So pull down everything and see if the interface appears in the
> addDependency list again (without remove-circulars).
>
> HTH,
> -Alex
>
>

Reply via email to