Yeah I had considered the same thing - simply Adding concrete references in
the TestClasses.as. It's a simple enough 'fix, just slightly less 'elegant'
(which is fine).

I didn't actually add those formatting calls that ultimately added to
usedNames from the footer. I believe I just fixed the names they were
passing which then ended up not being filtered out (can't remember the
details), so I had assumed that at some point someone wanted them to work
as they were.

I agree though, reflection alone is not a sufficient justification for this.

I don't know offhand if there are other scenarios outside of the way the
test classes are set up that would require this level of dependency without
at least concrete references somewhere else in the project.

I did have another somewhat related thought.... I can't check it now, but
if GCC removes 'dead code' (methods or properties not explicitly referenced
anywhere in the project) do the @export and @expose markers protect against
that?

I haven't seen this happen so perhaps they are safe. Otherwise that could
break reflection too, when the reflection data still represents the full
set of things that should be there and attempts are made for access the
fields dynamically..

Anyhow, have a great week, ttyl

cheers
Greg




On Fri, Sep 30, 2016 at 7:43 PM, Alex Harui <aha...@adobe.com> wrote:

>
>
> On 9/29/16, 9:04 PM, "Greg Dove" <greg.d...@gmail.com> wrote:
>
> >Please check with the GenericTests manual test after that change.
> >
> >I thought I saw that the return types of the methods or variable types
> >were
> >not affecting usedNames directly during output and it was only be picked
> >up
> >in the reflection data.
> >
> >If GenericTests works fine after your changes then I am very wrong!
>
> I tried GenericTests.  It fails to find some classes because, in order to
> reduce the likelihood of circularities (and reduce output size), the
> FalconJX code doesn't include classes that are only referenced via a type
> declaration instead of a concrete reference to the class.
>
> I suppose we could offer an option to change the logic, but my thinking is
> that, since JS isn't strongly typed in the runtime, it doesn't make sense
> to drag in code just for a parameter or variable type.  Nothing will check
> that code except for reflection-oriented things like this test and this
> test could just make a concrete reference.
>
> I'm done for tonight.  If you are already out on vacation and I don't hear
> from you I'll probably just make concrete references in GenericTests and
> commit everything.
>
> Thoughts?
> -Alex
>
>

Reply via email to