Thanks for noticing that.  So does that mean a workaround for 0.8.0 is to
define in additional compiler options:

     -js-output-type=FLEXJS

-Alex

On 7/6/17, 11:46 AM, "Josh Tynjala" <joshtynj...@gmail.com> wrote:

>Okay, I made a commit that seems to get things working in IntelliJ IDEA
>again. It looks like MxmlJSC and CompJSC in flex-compiler-oem.jar no
>longer
>need to create the backend manually, and MXMLJSC or COMPJSC can figure out
>what to do automatically based on the value of -targets now.
>
>I was able to successfully build some projects in IntelliJ with -targets
>set to JSFlex, SWF, and also JS.
>
>- Josh
>
>On Thu, Jul 6, 2017 at 11:21 AM, Josh Tynjala <joshtynj...@gmail.com>
>wrote:
>
>> The problem looks to be related to this line:
>>
>> compiler = COMPILER.getDeclaredConstructor(IBackend.class).newInstance(
>> backend);
>>
>> It's looking for a constructor on MXMLJSC (not to be confused with
>> MxmlJSC) that takes an IBackend as a parameter. There is no longer a
>> constructor like that in 0.8.0. If I understand the dual changes
>>correctly,
>> MXMLJSC now automatically creates an IBackend based on the -targets
>>value.
>> It looks like this code does indeed still need changes to support dual.
>>
>> - Josh
>>
>>
>> On Wed, Jul 5, 2017 at 3:09 PM, Josh Tynjala <joshtynj...@gmail.com>
>> wrote:
>>
>>> I'm trying to create a new FlexJS 0.8.0 project in IntelliJ IDEA, and
>>>I'm
>>> getting the following output when I try to build the project:
>>>
>>> Information:[HelloIDEA]: Starting Flex compiler:
>>> "/Applications/IntelliJ
>>>IDEA.app/Contents/jdk/Contents/Home/jre/bin/java"
>>> 
>>>-Dapplication.home=/Users/joshtynjala/Development/Flex/sdks/flexjs-0.8.0
>>> -Dfile.encoding=UTF-8 -Djava.awt.headless=true -Duser.language=en
>>> -Duser.region=en -Xmx512m -classpath "/Applications/IntelliJ
>>> 
>>>IDEA.app/Contents/plugins/flex/lib/idea-flex-compiler-fix.jar:/Applicati
>>>ons/IntelliJ
>>> IDEA.app/Contents/plugins/flex/lib/flex-compiler.jar:/Users/
>>> 
>>>joshtynjala/Development/Flex/sdks/flexjs-0.8.0/lib/flex-compiler-oem.jar
>>>"
>>> com.intellij.flex.compiler.FlexCompiler 54900
>>> Information:[HelloIDEA]: mxmlc -load-config=/Users/joshtynjal
>>> a/Library/Caches/IntelliJIdea2017.1/compile-server/
>>> helloidea_6d5abd99/_temp_/IntelliJ_IDEA/idea-B028A5AE-12E86E20.xml
>>> -load-config+=/Users/joshtynjala/Development/Flex/sdks/
>>> flexjs-0.8.0/ide/IDEA/intellij-config.xml
>>> Information:[HelloIDEA]: unknown error
>>> Information:[HelloIDEA]: at java.lang.Class.getConstructor
>>> 0(Class.java:3082)
>>> Information:[HelloIDEA]: at java.lang.Class.getDeclaredCon
>>> structor(Class.java:2178)
>>> Information:[HelloIDEA]: at flex2.tools.MxmlJSC.getCompile
>>> rInstance(MxmlJSC.java:48)
>>> Information:[HelloIDEA]: at
>>>flex2.tools.MxmlJSC.execute(MxmlJSC.java:89)
>>> Information:[HelloIDEA]: at flex2.tools.Tool.compile(Tool.java:68)
>>> Information:[HelloIDEA]: at flex2.tools.Mxmlc.mxmlc(Mxmlc.java:73)
>>> Information:[HelloIDEA]: at com.intellij.flex.compiler.fle
>>> x4.Flex4Handler.compileSwf(Flex4Handler.java:81)
>>> Information:[HelloIDEA]: at com.intellij.flex.compiler.Com
>>> pilationThread.run(CompilationThread.java:48)
>>> Information:[HelloIDEA]: Compilation failed
>>> Information:7/5/17, 2:56 PM - Compilation completed with 1 error and 0
>>> warnings in 595ms
>>> Error:[HelloIDEA]: java.lang.NoSuchMethodException:
>>> org.apache.flex.compiler.clients.MXMLJSC.<init>(org.apache.
>>> flex.compiler.driver.IBackend)
>>>
>>> I followed the steps in these instructions that worked correctly with
>>> 0.7.0:
>>>
>>> 
>>>https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcwiki.a
>>>pache.org%2Fconfluence%2Fdisplay%2FFLEX%2FUsing%2BFlexJ&data=02%7C01%7C%
>>>7C0db52a1b085d40a0d99008d4c49f7cf7%7Cfa7b1b5a7b34438794aed2c178decee1%7C
>>>0%7C0%7C636349636715390181&sdata=SMfsugjsJKZI9AKay2Dn0qhk7srWdH%2BkTtrlo
>>>GXiw34%3D&reserved=0
>>> S+with+IntelliJ+IDEA
>>>
>>> I'm not very familiar with this part of the code, but it looks to me
>>>like
>>> the call to MxmlJSC.getCompilerInstance() can't find IBackend? Could
>>>it be
>>> that flex-compiler-oem.jar is missing something in its classpath?
>>>
>>> - Josh
>>>
>>
>>

Reply via email to