Yeah,

I was going to amend what I said about the fileNode not being created, when I stepped through it I realized your fileNode was created but there was no children, thats why I pasted the tree structure.

As far as the problem... It has to be an obvious error but I can't seem to understand where it is going wrong.

My guess is that a file node as abstract so it WILL be created, the problem I would guess lies in the MXML tokenizer is what is messing up. Since a file node is automatically created for the compilation unit, there is an error happening within that branch of execution.

Mike

Quoting Erik de Bruin <e...@ixsoftware.nl>:

Stepped through it, and this is what I found:

A file is created in 'temp', and it has a MXML structure in it
(Sprite->Declaration->[nodeTypeToTest]).

A valid 'fileNode' is created, BUT only the top level node seems to be parsed:

MXMLFileNode(MXMLFileID)
"/Users/erik/Documents/ApacheFlex/svn/apacheFlex-falcon/compiler.tests/temp/MXMLBooleanNodeTests8309004183864644727.mxml"
1:1 loc: 0-240 abs: 0-240
/Users/erik/Documents/ApacheFlex/svn/apacheFlex-falcon/compiler.tests/temp/MXMLBooleanNodeTests8309004183864644727.mxml

In your example, Michael, I see a tree structure, not in my 'result'.

So, when the 'getMXMLArrayNode' methods starts looking for the
'FirstDescendantOfType', it will find none, return null and there is
my exception.

Where do I look next? The compiler seems to build OK (with a few
warnings as I mentioned), maybe the tests aren't using the 'correct'
compiler?

EdB


On Sun, Nov 18, 2012 at 8:46 PM, Michael Schmalle
<apa...@teotigraphix.com> wrote:
Erik,

My advice is get in Eclipse, right click on the MXMLArray test and Debug as
JUnit, have a break point in;

MXMLNodeBaseTests.java at line 129; Step through and then click on the
fileNode variable;

If the output window dosn't show;

MXMLFileNode(MXMLFileID)
"C:\Users\Graphix\projects\libraries\flex\falcon\trunk\compiler.tests\temp\MXMLBooleanNodeTests1363968697407340654.mxml"
1:1 loc: 0-240 abs: 0-240
C:\Users\Graphix\projects\libraries\flex\falcon\trunk\compiler.tests\temp\MXMLBooleanNodeTests1363968697407340654.mxml
  MXMLDocumentNode(MXMLDocumentID) "flash.display.Sprite" 0:0 loc: 0-240
abs: 0-240
C:\Users\Graphix\projects\libraries\flex\falcon\trunk\compiler.tests\temp\MXMLBooleanNodeTests1363968697407340654.mxml
    MXMLDeclarationsNode(MXMLDeclarationsID) 1:4 loc: 168-228 abs: 168-228
C:\Users\Graphix\projects\libraries\flex\falcon\trunk\compiler.tests\temp\MXMLBooleanNodeTests1363968697407340654.mxml
      MXMLArrayNode(MXMLArrayID) "Array" 2:8 loc: 194-205 abs: 194-205
C:\Users\Graphix\projects\libraries\flex\falcon\trunk\compiler.tests\temp\MXMLBooleanNodeTests1363968697407340654.mxml


Then you have something wrong with the compilation unit not being created
which means your permissions for the 'temp' folder might need to be adjusted
to read and write or something.


Mike


Quoting Erik de Bruin <e...@ixsoftware.nl>:

Same result in Terminal.

I do see a 'temp' folder.

In JUnit (which I'm not intimately familiar with) I do see the
following when I run the first test in MXMLArrayNodeTests.java:

 java.lang.NullPointerException
at
org.apache.flex.compiler.internal.tree.mxml.MXMLArrayNodeTests.getMXMLArrayNode(MXMLArrayNodeTests.java:46)
at
org.apache.flex.compiler.internal.tree.mxml.MXMLArrayNodeTests.MXMLArrayNode_empty1(MXMLArrayNodeTests.java:55)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
at
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
at
org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
at
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)

EdB


On Sun, Nov 18, 2012 at 8:00 PM, Erik de Bruin <e...@ixsoftware.nl> wrote:

Eclipse…

Now trying ant in Terminal...

EdB


On Sun, Nov 18, 2012 at 7:58 PM, Cyrill Zadra <cyrill.za...@gmail.com>
wrote:

Ok.. mhh

How do you execute the junit tests?

With ant script or eclipse?

On Sun, Nov 18, 2012 at 10:54 AM, Erik de Bruin <e...@ixsoftware.nl>
wrote:

Cyrill,

Yes, an empty 'temp' folder exists in the root of compile.tests.

So, I reverted the compile.tests back to it's original state and run
the 'download' target. That indeed also cleared up the missing library
issue. But didn't solve the Failed tests thing :-(

EdB

On Sun, Nov 18, 2012 at 7:49 PM, Cyrill Zadra <cyrill.za...@gmail.com>
wrote:

Hi Erik

[javac]
/Users/erik/Documents/ApacheFlex/svn/apacheFlex-falcon/compiler/build.xml:415:
warning: 'includeantruntime' was not set, defaulting to
build.sysclasspath=last; set to false for repeatable builds
Warning: /Users/erik/Documents/ApacheFlex/svn/apacheFlex-sdk/ant/lib
does not exist.


I have those errors to.. but shouldn't be the problem.

on 'compiler.tests' I got "missing required library

'lib/junit-4.10.jar'". Editing the entry in the 'build path/Libraries'
fixed that.

Instead of fixing the entry you could also execute the download target
of the build.xml.

Do you have a temp folder in compile.tests projects?



cyrill

On Sun, Nov 18, 2012 at 10:32 AM, Michael Schmalle
<apa...@teotigraphix.com> wrote:

Usually Eclipse doesn't refresh folders immediately( the results
folder is
created by junit build), press F5 on the compiler.tests project
folder.

Hmm, you need the stack trace in the JUnit view in Eclipse to show
you where
exactly the null pointer was.

But let me say this again, I have the same code as you and my tests
are all
green except the one functional test that has like 4 warnings it
fails on.


Mike

Quoting Erik de Bruin <e...@ixsoftware.nl>:

Ha, I just found the 'result' directory, must be 'hidden' in the
Eclipse project…

Here is another snippet:

  <testcase

classname="org.apache.flex.compiler.internal.tree.mxml.MXMLArrayNodeTests"
name="MXMLArrayNode_empty1" time="0.206">
    <error
type="java.lang.NullPointerException">java.lang.NullPointerException
at

org.apache.flex.compiler.internal.tree.mxml.MXMLArrayNodeTests.getMXMLArrayNode(Unknown
Source)
at

org.apache.flex.compiler.internal.tree.mxml.MXMLArrayNodeTests.MXMLArrayNode_empty1(Unknown
Source)
</error>
  </testcase>

Doesn't look good ;-)

EdB


On Sun, Nov 18, 2012 at 7:19 PM, Michael Schmalle
<apa...@teotigraphix.com> wrote:


Yeah, that is not right, there is something failing in your setup.

Look at the stack traces of the errors.


Mike


Quoting Erik de Bruin <e...@ixsoftware.nl>:

When running 'compiler.tests', this is a snippet of a failed test:

    [junit] Running
org.apache.flex.compiler.internal.tree.mxml.MXMLArrayNodeTests

    [junit] Tests run: 7, Failures: 0, Errors: 6, Time elapsed:
0.26 sec

    [junit] TEST
org.apache.flex.compiler.internal.tree.mxml.MXMLArrayNodeTests
FAILED

Does that point to something I need to change before my local
environment is 'fit to test'?

EdB


On Sun, Nov 18, 2012 at 7:10 PM, Erik de Bruin
<e...@ixsoftware.nl>
wrote:



I do see some warnings on the 'compiler' build:

"[javac]


/Users/erik/Documents/ApacheFlex/svn/apacheFlex-falcon/compiler/build.xml:415:
warning: 'includeantruntime' was not set, defaulting to
build.sysclasspath=last; set to false for repeatable builds"

When I do a 'wipe' and build again, I see one specific warning
(other
than a couple of the above):

"Warning:
/Users/erik/Documents/ApacheFlex/svn/apacheFlex-sdk/ant/lib
does not exist."

Help?

EdB


On Sun, Nov 18, 2012 at 6:55 PM, Erik de Bruin
<e...@ixsoftware.nl>
wrote:



Hi,

I have followed the various instructions and was able to
successfully
build the Falcon compiler. Along the way I encountered several
issues
that are not yet documented (I'm on OS X 10.8):

- I needed to edit the 'build.xml' file on line 50, to point the
'sdk.branch' property to the correct location of the SDK on my
system;
- when trying to use the mxmlc on a project, I got 'permission
denied'. Setting the executable bit on the file corrected that;

After that I was able to run from the command line and
successfully
build "Hello.as", which ran fine in the standalone Flash
debugger.

So I proceed to get the projects 'compiler' and 'compiler.tests'
to
work in in Eclipse. After importing them, I get a 'problem' on
each
one:
- on 'compiler', I got a message about 'ANT_JAR', which after I
re-created that variable in the project build path and pointed
it to
'ant.jar' on my system, went away;
- on 'compiler.tests' I got "missing required library
'lib/junit-4.10.jar'". Editing the entry in the 'build
path/Libraries'
fixed that.

I got 'build.xml' on 'compiler' working in Eclipse after adding:

<property name="env.JFLEX_JAR"
value="/usr/share/java/jflex-1.4.3/lib/JFlex.jar"/>

Then I ran 'build.xml' on 'compiler.tests' and that completed,
but
with plenty of FAILED tests (which I guess is expected?).

So, my environment seems to be set up. Now: how can I help?

Note: I'm a noob on the topic of compilers, but I can copy-paste
like
a Boss, so I'm sure you can use me ;-) Point me to the code and
put me
to work!

EdB



--
Ix Multimedia Software

Jan Luykenstraat 27
3521 VB Utrecht

T. 06-51952295
I. www.ixsoftware.nl






--
Ix Multimedia Software

Jan Luykenstraat 27
3521 VB Utrecht

T. 06-51952295
I. www.ixsoftware.nl






--
Ix Multimedia Software

Jan Luykenstraat 27
3521 VB Utrecht

T. 06-51952295
I. www.ixsoftware.nl


--
Michael Schmalle - Teoti Graphix, LLC
http://www.teotigraphix.com
http://blog.teotigraphix.com




--
Ix Multimedia Software

Jan Luykenstraat 27
3521 VB Utrecht

T. 06-51952295
I. www.ixsoftware.nl


--
Michael Schmalle - Teoti Graphix, LLC
http://www.teotigraphix.com
http://blog.teotigraphix.com




--
Ix Multimedia Software

Jan Luykenstraat 27
3521 VB Utrecht

T. 06-51952295
I. www.ixsoftware.nl




--
Ix Multimedia Software

Jan Luykenstraat 27
3521 VB Utrecht

T. 06-51952295
I. www.ixsoftware.nl




--
Ix Multimedia Software

Jan Luykenstraat 27
3521 VB Utrecht

T. 06-51952295
I. www.ixsoftware.nl


--
Michael Schmalle - Teoti Graphix, LLC
http://www.teotigraphix.com
http://blog.teotigraphix.com




--
Ix Multimedia Software

Jan Luykenstraat 27
3521 VB Utrecht

T. 06-51952295
I. www.ixsoftware.nl


--
Michael Schmalle - Teoti Graphix, LLC
http://www.teotigraphix.com
http://blog.teotigraphix.com

Reply via email to