Hi Alex, but I sort of get at least 3 runs: 1. Sort of generate JavaScript from the ActionScript 2. Compile the ActionScript and include the JavaScript 3. Compile the extern
So in Maven-speak I would propose to compile the normal swc to the main artifact for a module and compile the extern to the same module, but use a classifier "extern" for this (I know that probably the "classifier" will not ring a bell for you, but I hope it will soon). I could implement the compiler that for each swc it tries to resolve the "extern" artifact for the same module, if it gets one, it adds that to the library path, if not, it doesn't. The Problem is that Maven will probably handle this, but I doubt the IDEs will. In any other solution this including the different parts of the same module is going to drive people nuts. We deffinitely have to fix this. Chris ________________________________________ Von: Alex Harui <aha...@adobe.com> Gesendet: Freitag, 29. April 2016 17:03:27 An: dev@flex.apache.org Betreff: Re: AW: AW: AW: AW: [ASJS] Merging to Maven On 4/29/16, 2:45 AM, "Christofer Dutz" <christofer.d...@c-ware.de> wrote: > >Ok ... so it turned out that it wasn't quite that easy ... > >While Core now builds nicely I had problems with all of the others. Till >I noticed that I don't have to reference Core in frameworks, but Core in >externs ... So it seems each project is compiled 3-4 times: AS --> JS, JS >--> Extern, AS + JS --> SWC then I need all different types of >dependencies to SWCs containing Flash and JS code and then ones to >Externs containing just Flash ... We definitely need to work on this. There shouldn't be 4 compiles in a project. Where did you see that? I wrote this up a few weeks back [1] to try to explain the process. Basically, the set of APIs a library may want to present to downstream libraries can be different if compiling to run on Flash vs run in the browser. For example, the parent property is a flash.display.DisplayObjectContainer in Flash, and an org.apache.flex.core.IUIBase in the browser. And thus, each library should produce a SWC with COMPILE::AS3=true,COMPILE::JS=false, and for COMPILE::AS3=false,COMPILE::JS=true. Both of those use compc. The first compile uses compjsc to actually generate .JS files from the .AS with COMPILE::AS3=false,COMPILE::JS=true. Right now the frameworks/libs folder holds SWCs with COMPILE::AS3=true,COMPILE::JS=false, that contain the generated .JS files from the compjsc compile. At some point, we could teach compjsc to pack its output in a SWC so the order you run the compiles doesn't matter as much. The frameworks/externs folder holds SWCs built with COMPILE::AS3=false,COMPILE::JS=true. If you want to add some suffix or prefix to the names of the those SWCs that should be fine with me. The Application developer should only use the SWCs in frameworks/libs because the APIs they need to use should be the same in both SWCs. In theory, it is only the developers of downstream libraries that should need the SWCs currently in frameworks/externs. Maybe there is a better way to do this, but this is what I've been able to do given our current circumstances. HTH, -Alex [1] https://cwiki.apache.org/confluence/display/FLEX/Creating+SWCs