Ok ... so today I started having a look at the Unit tests. Turns out the reason 
for them failing is quite obvious :-)
The test classes make heavy uses of those Environment Variables that I am so 
unhappy with to build the paths to the swc files of the flex sdk. Most tests I 
had a look at all trace back to MXMLNodeBaseTests which does the path 
assembling. 
As replacing a parent class isn't as easy as overriding, I would have to adjust 
the MXMLNodeBaseTests class itself. Would it be ok to refactor the 
build-system-dependent-code into a helper class and to have multiple 
implementations of this adapter? So we could have an AntTestAdapter and a 
MavenTestAdapter? The Ant one could be used per default and the maven one could 
be activated via System property, which is automatically set by Maven.

What do you think?

Chris

________________________________________
Von: Christofer Dutz <christofer.d...@c-ware.de>
Gesendet: Freitag, 19. Februar 2016 21:50
An: dev@flex.apache.org
Betreff: AW: AW: [FALCONJX]Compiling Falcon with externs problems

Ok ... so what do you think of this? ;-)

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 14.472 s
[INFO] Finished at: 2016-02-19T21:35:49+01:00
[INFO] Final Memory: 29M/387M
[INFO] ------------------------------------------------------------------------

And the cool thing ... without a single environment variable ;-)

I finally managed to build the falcon.jar completely with maven.
Besides moving stuff around, I did need to create two additional artifacts:
1. A maven plugin (falcon-unknown-tree-handler-generator-maven-plugin) that 
generates some strange class from an xml file for that I moved the 
org.apache.flex.compiler.internal.as.codegen.UnknownTreePatternInputOutput 
class to that plugin (A code generation helper shouldn't be part of the falcon 
jar anyway)
2. I needed to move the interface 
org.apache.flex.compiler.internal.as.codegen.IASNodeAdapter into a dedicated 
jar as this class needs to be compiled in order for JBurg to be able to run.

Additionally I needed to change one thing in JBurg as JBurg 1.10.2 uses 
SystemClassloader to load things and I needed to change it to use the context 
classloader.

One thing that's really ugly though, is that Antlr seems to look for the 
vocabulary files "ImportMetadataTokenTypes.txt" in the directory where the VM 
is started. Which is the root of the maven project ... have to figure out 
something how I can avoid that. Will dig in to the sources of the Antlr plugin 
and hopefully sort that out soon.

But one thing that could be good, would  be to streamline the used generators a 
little ... we are using Antlr2, Antlr3, JFlex, JBurg and our own custom one ... 
think that's not really nice for useablity. But for now I'll focus on the maven 
migration.

Chris



________________________________________
Von: Alex Harui <aha...@adobe.com>
Gesendet: Freitag, 19. Februar 2016 07:00
An: dev@flex.apache.org
Betreff: Re: AW: [FALCONJX]Compiling Falcon with externs problems

Cool.  Makes me think maybe the conversion won't be as hard as I thought.
I'll wait until you get through all the modules.  Is the Maven script
going to generate a Flex SDK like the one currently output to
compiler/generated/dist/sdk?

-Alex

On 2/18/16, 9:58 AM, "Christofer Dutz" <christofer.d...@c-ware.de> wrote:

>Well I did some great progress in the train today.
>
>I managed to setup a script that moves stuff around into a Maven
>structure and wrote a pom.xml that does all of the generation steps
>(JFlex, Antlr2, Antlr3, JBurg) in Maven.
>
>If all goes well, all you should need to do, would be to run the
>migration script and run "mvn install".
>
>But I need to do a little refactoring as jburg currently needs some
>classes of the same project compiled in order to run. Need to move them
>in a separate jar.
>
>Let's see how far I come in the next few days. As soon as the compiler
>module is done, I'd continue with the others.
>
>Chris
>
>
>
>Von meinem Samsung Galaxy Smartphone gesendet.
>
>
>-------- Ursprüngliche Nachricht --------
>Von: Alex Harui <aha...@adobe.com>
>Datum: 18.02.2016 16:18 (GMT+01:00)
>An: dev@flex.apache.org
>Betreff: Re: [FALCONJX]Compiling Falcon with externs problems
>
>
>
>On 2/18/16, 6:33 AM, "Harbs" <harbs.li...@gmail.com> wrote:
>
>>From my perspective, any solution to make this happen and allow progress
>>to be made on Falcon is good.
>>
>>The migration script sounds like a good idea. It actually might have a
>>side-benefit that folks like me can read the script to help understand
>>what you’re doing.
>
>Agreed.  If this is what you need to do to make progress, it sound
>reasonable to me.  I will say, though, that Git handled renames much
>better than I expected when doing the refactor for flex-asjs.  So if you
>think it is better to just take a branch and work there, that is also fine
>with me.  I don't have major changes planned for flex-falcon at this time.
> Are you planning to change the set of dependencies or just make sure they
>are all sourced from Maven Central?
>
>When it does become time to try to apply the script to the develop branch
>for real, I would do it in a branch anyway.  There will be conflicts where
>we both changed a file, but I think I will know enough to resolve them
>quickly.
>
>-Alex
>
>

Reply via email to