flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christofer Dutz <christofer.d...@c-ware.de>
Subject AW: AW: AW: AW: [FLEXJS] Problem compiling Core extern
Date Wed, 04 May 2016 14:45:12 GMT

Ok ... So I probably invested yet another day in cleaning things up, but still I can't report
any success.
While in the flex-falcon module all seems to be ok and working nicely in the flex-asjs I am
having great problems. So instead of asking 10000000 questions after another, I'll try to
aggregate all into this one mail:

1. COMPJSC is the JavaScript counterpart to COMPC for compiling libraries?
1a) If it is, shouldn't it compile all classes in the project as libraries don't contain Application
entry points from which you could start scanning which classes are referenced. Anyway you
usually want everything in a library to go in the SWC. This is the behaviour I am experiencing
1b) As far as I understood it, with MXMLC you could force it to include files it would have
left away because it thought the class was not referenced.
1c) If COMPJSC should work more like MXMLC, which is the switch that changes the way it works
in the Ant build?

2. The execution code in Ant for doing the JavaScript compilation is:
        <java jar="${FALCONJX_HOME}/lib/compc.jar" fork="true" >
            <jvmarg value="-Xmx384m" />
            <jvmarg value="-Dsun.io.useCanonCaches=false" />
            <jvmarg value="-Dflexcompiler=${FALCONJX_HOME}/../compiler" />
            <jvmarg value="-Dflexlib=${FLEXJS_HOME}/frameworks" />
            <arg value="+flexlib=${FLEX_HOME}/frameworks" />
            <arg value="-js-output-type=FLEXJS" />
            <arg value="-keep-asdoc" /><!-- allows compiler to see @flexjsignorecoercion
annotations -->
            <arg value="-output=${basedir}/target/generated-sources/flexjs" />
            <arg value="-load-config=${basedir}/target/compile-js-config.xml" />
            <arg value="+playerglobal.version=${playerglobal.version}" />
            <arg value="+env.PLAYERGLOBAL_HOME=${env.PLAYERGLOBAL_HOME}" />
            <arg value="+env.AIR_HOME=${env.AIR_HOME}" />
            <arg value="-external-library-path+=${JS.SWC}" />
            <!-- this is not on external-library path otherwise goog.requires are not generated
            <arg value="-library-path+=${GCL.SWC}" />
            <arg value="-define=COMPILE::AS3,false" />
            <arg value="-define=COMPILE::JS,true" />
2a) Why is one framework directory passed in using a Java variable and the other one as a
compiler argument?
2b) Are both needed?
2c) What are they needed for? Couldn't the manifest files be referenced in another way?
2d) Why are  playerglobal.version, env.PLAYERGLOBAL_HOME, env.AIR_HOME needed?
2e) Is it ok that I create up to 4 config files during the build (externc AS generation from
JavaScript), JavaScript generation from ActionScript, ActionScript compilation for SWC, ActionScript
compilation for extern SWC and move: the defines, output, library additions, external library
additions, keep-output into these and not provide them as arguments to the compiler.
2f) What is the compiler argument "flexcompiler" used for? If I look at COMPJSC I can't see
why we need such a property? I couldn't even see a reference to "flexcompiler" anywhere in
the code?
2g) Is there a way to configure the js-output-type in the config.xml? I would like to reduce
the call to the compiler to just passing in the path of the config file.
2h) Is there a way to configure the "keep-as-doc" in the config.xml?

3: The config-xmls contain some library declarations, and then for each usage some others
are added using command line arguments. Which libraries are actually needed in which step.
If I include both the SWC and externSWC we have double declarations of most classes, which
causes problems.
3a) I am currently following the approach that I have double dependencies to a module ...
once as normal SWC dependency and a second one with "classifier=extern". Then I generate the
list of libraries by filtering out the non extern libs for JS=true compilations and I filter
out the externs for AS=true ... is this a valid approach?

4: A lot of files contain duplicate imports of the same class, but with different packages
(Mainly the class "Event") I am getting compilation errors because of ambiguous type declarations,
which I find an absolutely valid error message
4a) Why doesn't the Ant build get these errors?

5: If you look at classes like IFlexJSElement.as ... I can't imagine why it has to be that
complicated, except that the JS version had one property, that was removed, but none bothered
to clean up the file. There seem to be code-elements like this all over the place.

I would have tried to run the Ant build and compare that with Maven, but today seems to be
a Bad-Build-Day ... I gave up to compile the project after about 2 hours of wasted time. Currently
it seems that I am unable to build flex-asjs with Ant.

.... Well it's not the 1000000 Questions I mentioned at the beginning, but I'm just stopping
here for now. 


Von: Alex Harui <aharui@adobe.com>
Gesendet: Mittwoch, 4. Mai 2016 08:47:07
An: dev@flex.apache.org
Betreff: Re: AW: AW: AW: [FLEXJS] Problem compiling Core extern

On 5/3/16, 10:58 PM, "Christofer Dutz" <christofer.dutz@c-ware.de> wrote:

>Hi Alex,
>I am actually having problems on all levels. When compiling the
>JavaScript from the ActionScript I have a problem with CSSTextField as
>this is missing the TextField declaration. If I comment out the
>COMPILE::JS it works ... this is the same problem I am having for
>compiling the extern for Core.
>The Problem I am having with compiling the ActionScript code to SWC is in
>ApplicationBase in code that's marked COMPILE::AS3 so I guess in general
>I am piping the right code into the different parts of the compiler.

Let's try this:  In the Ant builds, the steps are (and this is different
than the actual placement of targets in the build.xml):

1) compjsc + js.swc (no playerglobal or airglobal) + COMPILE::AS3,false +
COMPILE::JS,true + compile-js-config.xml -> pile of JS files
2) compc + js.swc (no playerglobal or airglobal) + COMPILE::AS3,false +
COMPILE::JS,true + compile-js-config.xml -> externs SWC
3) compc + (playerglobal or airglobal) + COMPILE::AS3,true +
COMPILE::JS,false + compile-as-config.xml -> "final SWC"

It seems like you are still compiling every file in the folder instead of
the ones specified by the -manifest.xml and XXXClasses.as file, and I'd
guess that you are using JS.SWC with COMPILE::AS3,true


View raw message