I looked into this.

Because A is the first file loaded, it must require B in order to load B.
B extends A so it must require A otherwise you get a warning from Google
Closure Compiler.  That's why -remove-circulars won't remove B's require
of A.

So, unless Google Closure Compiler changes their code, I think we have to
continue to manage circularities this way.  It seems strange for a base
class to directly reference extended classes.  IMO, a base class shouldn't
know about any extensions.

If you compile B first, then -remove-circulars will remove A's require of
B.

We could provide another option that would remove B's require of A and let
you ignore the warning.

I don't think we want to put all code into one file.  It makes debugging
really painful.

What do others think?
-Alex

On 1/17/16, 11:24 PM, "lizhi" <s...@qq.com> wrote:

><java jar="${FLEXJS_HOME}/js/lib/mxmlc.jar" resultProperty="errorCode"
>            fork="true">
>................
>.................................
> <arg value="-remove-circulars"></arg>//new line
>        </java
>
>
>
>--
>View this message in context:
>http://apache-flex-development.2333347.n4.nabble.com/ERROR-Circular-depend
>ency-detected-A-B-A-tp51298p51319.html
>Sent from the Apache Flex Development mailing list archive at Nabble.com.

Reply via email to