You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flex.apache.org by Christofer Dutz <ch...@c-ware.de> on 2016/02/24 13:19:03 UTC

[FALCON] Compiling Falcon with Maven

Hi,

so I managed to get all Unit-Tests to pass:
"Tests run: 375, Failures: 0, Errors: 0, Skipped: 26"

And most of the integration-tests running:
"Tests run: 124, Failures: 32, Errors: 0, Skipped: 5"

currently having a little trouble with the resource-bundles as I'm getting a lot of:
"Error: Unable to resolve resource bundle 'messaging'"
For a lot of other bundles too ...

I don't quite know why, but I'll dig into that later on ... 

I think for now I need to finish that functionality to unpack dmg packages so I can start using the debug-player automatically ... currently the integration tests would require a reference to the debug player to work ... I currently hard-coded that to my debug-players location in order to get the tests running. But if I extend the sdk-converter to produce runtime artifacts too, then Falcon should build without a single environment variable q.e.d. :-)

Chris


________________________________________
Von: Christofer Dutz <ch...@c-ware.de>
Gesendet: Mittwoch, 24. Februar 2016 09:52
An: dev@flex.apache.org
Betreff: AW: AW: AW: AW: [FALCONJX]Compiling Falcon with externs problems

Hi all,

Ok ... so as the Ant build seems to have assertions disabled, I disabled them for the Maven build as well:

Tests run: 375, Failures: 0, Errors: 0, Skipped: 26

But we should fix this as soon as possible.

Also I added my changes with the TestAdapters to the develop branch. It shouldn't change anything there, but
this way I don't have problems with moved directories when merging the latest changes from develop into my branch.

I will now try to add the missing integration-tests and get them working for the compiler artifact. As soon as that's done I'll do the same with the tests in compiler.jx

So currently it looks as if I was way beyond schedule ... I estimated a lot more time to get this working :-)

Chris

________________________________________
Von: Christofer Dutz <ch...@c-ware.de>
Gesendet: Mittwoch, 24. Februar 2016 09:08
An: dev@flex.apache.org
Betreff: AW: AW: AW: AW: [FALCONJX]Compiling Falcon with externs problems

Hi Alex,

that sounds as if you are using assertions in a way that contradictory to what they are intended to be used.
Assertions are meant to be hard checks to the contract of a method. Assumptions the code needs to operate correctly.
Usually you could do the same with if-statements, but in contrast to using normal checks, assertion code is skipped if assertions are disabled. They are usually skipped in production systems. The main intention of assertions is to fail fast and hard if something is not as expected. This is true during development and especially during the execution of unit-tests.

So I think there are to options here:
1. The assertions are not correct and the code could actually work with the failing condition
2. The test is not correct.

In the case I investigated, there is a namespace declaration without any namespace. The check failing, fails because "the quotes have been removed while parsing the expression" ... well there is no expression, so it doesn't contain quotes. I would rather check if there is an expression first. If a namespace declaration has no definition, then the expression should be invalid and not complain that it doesn't have quotes.

So I strongly object to switching assertions off in unit tests. If we do, we should remove them all together.

Chris

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

Hi Chris,

I am not that familiar with how asserts work in Java, but it has seemed to
me that asserts are often or always disabled in Falcon code.   The
debugger seems to stop on an assert, but it doesn't always fire.  For
example, I think you are seeing the test fail on this assert:

        assert getExpressionNode() instanceof IExpressionNode :
"getValue() shouldn't be getting called on a non-expression
MXMLFunctionNode";

And for me getExpressionNode() returns null, which IMO, is the correct
thing to return.  So I think null isn't an instance of IExpressionNode,
but for me, the test continues to the next step in the debugger which is
why I think asserts are disabled.  And should be for tests doing
degenerate case testing like how null values behave.


Does that make sense?

-Alex

On 2/23/16, 9:26 AM, "Christofer Dutz" <ch...@c-ware.de> wrote:

>Hi Alex,
>
>Well I think that's something completely different. I never knew you
>could setup Eclipse to run every test each time you save, but that sort
>of doesn't seem to make much sense to me. Isn't Eclipse already slow
>enough? ;-)
>
>Usually you put the unit-tests together in the same project as the code
>they test. If you have cross-cutting integration test's it's ok to put
>them in a separate package, but unit- and component-tests I think belong
>to the code they test. I haven't come across a single project, except
>Flex, where this hasn't been that way, but I am pretty sure you can
>configure Eclipse to continue to run the tests. For maven there is a
>"lifecycle-mapping" feature in the M2Eclipse plugin, that might help.
>
>Coming back to the unit tests ... I have 8 failing tests that sort of
>don't look as if this is related to the maven migration:
>
>
>CSSNamespaceDefinitionTests.CSSNamespaceDefinitionTests_namespace1:64->get
>CSSNamespaceDefinition:40->CSSBaseTests.getCSSNodeBase:69 Do not strip
>namespace quotes in parser.
>
>CSSNamespaceDefinitionTests.CSSNamespaceDefinitionTests_namespace2:80->get
>CSSNamespaceDefinition:40->CSSBaseTests.getCSSNodeBase:69 Do not strip
>namespace quotes in parser.
>  MXMLClassNodeTests.MXMLClassNode_empty2:68 getValue() shouldn't be
>getting called on a non-expression MXMLClassNode
>  MXMLClassNodeTests.MXMLClassNode_empty3:80 getValue() shouldn't be
>getting called on a non-expression MXMLClassNode
>  MXMLClassNodeTests.MXMLClassNode_empty1:56 getValue() shouldn't be
>getting called on a non-expression MXMLClassNode
>  MXMLFunctionNodeTests.MXMLFunctionNode_empty2:69 getValue() shouldn't
>be getting called on a non-expression MXMLFunctionNode
>  MXMLFunctionNodeTests.MXMLFunctionNode_empty3:81 getValue() shouldn't
>be getting called on a non-expression MXMLFunctionNode
>  MXMLFunctionNodeTests.MXMLFunctionNode_empty1:57 getValue() shouldn't
>be getting called on a non-expression MXMLFunctionNode
>
>Do you have an idea, why they are red?
>
>Chris
>
>
>
>________________________________________
>Von: Alex Harui <ah...@adobe.com>
>Gesendet: Dienstag, 23. Februar 2016 17:53
>An: dev@flex.apache.org
>Betreff: Re: AW: AW: [FALCONJX]Compiling Falcon with externs problems
>
>On 2/23/16, 7:56 AM, "Christofer Dutz" <ch...@c-ware.de> wrote:
>
>>Looking better and better each day :-)
>>
>>With my adjusted base-class I get this:
>>
>>Tests run: 375, Failures: 8, Errors: 0, Skipped: 26
>
>Good progress.
>
>I have a question about the Eclipse projects.  Will we have to get rid of
>them and make Eclipse Maven projects?  In the current set of projects, the
>unit tests are in their own Eclipse project, but I saw that you moved the
>tests under the source project.  If the tests and source end up in a
>single Eclipse project, I assume the tests won't run after each save in
>the editor, right?
>
>Thanks,
>-Alex
>

Re: [FALCON] Compiling Falcon with Maven

Posted by Harbs <ha...@gmail.com>.
Great work! Thanks for doing this!!!

Harbs

On Feb 24, 2016, at 2:19 PM, Christofer Dutz <ch...@c-ware.de> wrote:

> Hi,
> 
> so I managed to get all Unit-Tests to pass:
> "Tests run: 375, Failures: 0, Errors: 0, Skipped: 26"
> 
> And most of the integration-tests running:
> "Tests run: 124, Failures: 32, Errors: 0, Skipped: 5"
> 
> currently having a little trouble with the resource-bundles as I'm getting a lot of:
> "Error: Unable to resolve resource bundle 'messaging'"
> For a lot of other bundles too ...
> 
> I don't quite know why, but I'll dig into that later on ... 
> 
> I think for now I need to finish that functionality to unpack dmg packages so I can start using the debug-player automatically ... currently the integration tests would require a reference to the debug player to work ... I currently hard-coded that to my debug-players location in order to get the tests running. But if I extend the sdk-converter to produce runtime artifacts too, then Falcon should build without a single environment variable q.e.d. :-)
> 
> Chris
> 
> 
> ________________________________________
> Von: Christofer Dutz <ch...@c-ware.de>
> Gesendet: Mittwoch, 24. Februar 2016 09:52
> An: dev@flex.apache.org
> Betreff: AW: AW: AW: AW: [FALCONJX]Compiling Falcon with externs problems
> 
> Hi all,
> 
> Ok ... so as the Ant build seems to have assertions disabled, I disabled them for the Maven build as well:
> 
> Tests run: 375, Failures: 0, Errors: 0, Skipped: 26
> 
> But we should fix this as soon as possible.
> 
> Also I added my changes with the TestAdapters to the develop branch. It shouldn't change anything there, but
> this way I don't have problems with moved directories when merging the latest changes from develop into my branch.
> 
> I will now try to add the missing integration-tests and get them working for the compiler artifact. As soon as that's done I'll do the same with the tests in compiler.jx
> 
> So currently it looks as if I was way beyond schedule ... I estimated a lot more time to get this working :-)
> 
> Chris
> 
> ________________________________________
> Von: Christofer Dutz <ch...@c-ware.de>
> Gesendet: Mittwoch, 24. Februar 2016 09:08
> An: dev@flex.apache.org
> Betreff: AW: AW: AW: AW: [FALCONJX]Compiling Falcon with externs problems
> 
> Hi Alex,
> 
> that sounds as if you are using assertions in a way that contradictory to what they are intended to be used.
> Assertions are meant to be hard checks to the contract of a method. Assumptions the code needs to operate correctly.
> Usually you could do the same with if-statements, but in contrast to using normal checks, assertion code is skipped if assertions are disabled. They are usually skipped in production systems. The main intention of assertions is to fail fast and hard if something is not as expected. This is true during development and especially during the execution of unit-tests.
> 
> So I think there are to options here:
> 1. The assertions are not correct and the code could actually work with the failing condition
> 2. The test is not correct.
> 
> In the case I investigated, there is a namespace declaration without any namespace. The check failing, fails because "the quotes have been removed while parsing the expression" ... well there is no expression, so it doesn't contain quotes. I would rather check if there is an expression first. If a namespace declaration has no definition, then the expression should be invalid and not complain that it doesn't have quotes.
> 
> So I strongly object to switching assertions off in unit tests. If we do, we should remove them all together.
> 
> Chris
> 
> ________________________________________
> Von: Alex Harui <ah...@adobe.com>
> Gesendet: Dienstag, 23. Februar 2016 22:07
> An: dev@flex.apache.org
> Betreff: Re: AW: AW: AW: [FALCONJX]Compiling Falcon with externs problems
> 
> Hi Chris,
> 
> I am not that familiar with how asserts work in Java, but it has seemed to
> me that asserts are often or always disabled in Falcon code.   The
> debugger seems to stop on an assert, but it doesn't always fire.  For
> example, I think you are seeing the test fail on this assert:
> 
>        assert getExpressionNode() instanceof IExpressionNode :
> "getValue() shouldn't be getting called on a non-expression
> MXMLFunctionNode";
> 
> And for me getExpressionNode() returns null, which IMO, is the correct
> thing to return.  So I think null isn't an instance of IExpressionNode,
> but for me, the test continues to the next step in the debugger which is
> why I think asserts are disabled.  And should be for tests doing
> degenerate case testing like how null values behave.
> 
> 
> Does that make sense?
> 
> -Alex
> 
> On 2/23/16, 9:26 AM, "Christofer Dutz" <ch...@c-ware.de> wrote:
> 
>> Hi Alex,
>> 
>> Well I think that's something completely different. I never knew you
>> could setup Eclipse to run every test each time you save, but that sort
>> of doesn't seem to make much sense to me. Isn't Eclipse already slow
>> enough? ;-)
>> 
>> Usually you put the unit-tests together in the same project as the code
>> they test. If you have cross-cutting integration test's it's ok to put
>> them in a separate package, but unit- and component-tests I think belong
>> to the code they test. I haven't come across a single project, except
>> Flex, where this hasn't been that way, but I am pretty sure you can
>> configure Eclipse to continue to run the tests. For maven there is a
>> "lifecycle-mapping" feature in the M2Eclipse plugin, that might help.
>> 
>> Coming back to the unit tests ... I have 8 failing tests that sort of
>> don't look as if this is related to the maven migration:
>> 
>> 
>> CSSNamespaceDefinitionTests.CSSNamespaceDefinitionTests_namespace1:64->get
>> CSSNamespaceDefinition:40->CSSBaseTests.getCSSNodeBase:69 Do not strip
>> namespace quotes in parser.
>> 
>> CSSNamespaceDefinitionTests.CSSNamespaceDefinitionTests_namespace2:80->get
>> CSSNamespaceDefinition:40->CSSBaseTests.getCSSNodeBase:69 Do not strip
>> namespace quotes in parser.
>> MXMLClassNodeTests.MXMLClassNode_empty2:68 getValue() shouldn't be
>> getting called on a non-expression MXMLClassNode
>> MXMLClassNodeTests.MXMLClassNode_empty3:80 getValue() shouldn't be
>> getting called on a non-expression MXMLClassNode
>> MXMLClassNodeTests.MXMLClassNode_empty1:56 getValue() shouldn't be
>> getting called on a non-expression MXMLClassNode
>> MXMLFunctionNodeTests.MXMLFunctionNode_empty2:69 getValue() shouldn't
>> be getting called on a non-expression MXMLFunctionNode
>> MXMLFunctionNodeTests.MXMLFunctionNode_empty3:81 getValue() shouldn't
>> be getting called on a non-expression MXMLFunctionNode
>> MXMLFunctionNodeTests.MXMLFunctionNode_empty1:57 getValue() shouldn't
>> be getting called on a non-expression MXMLFunctionNode
>> 
>> Do you have an idea, why they are red?
>> 
>> Chris
>> 
>> 
>> 
>> ________________________________________
>> Von: Alex Harui <ah...@adobe.com>
>> Gesendet: Dienstag, 23. Februar 2016 17:53
>> An: dev@flex.apache.org
>> Betreff: Re: AW: AW: [FALCONJX]Compiling Falcon with externs problems
>> 
>> On 2/23/16, 7:56 AM, "Christofer Dutz" <ch...@c-ware.de> wrote:
>> 
>>> Looking better and better each day :-)
>>> 
>>> With my adjusted base-class I get this:
>>> 
>>> Tests run: 375, Failures: 8, Errors: 0, Skipped: 26
>> 
>> Good progress.
>> 
>> I have a question about the Eclipse projects.  Will we have to get rid of
>> them and make Eclipse Maven projects?  In the current set of projects, the
>> unit tests are in their own Eclipse project, but I saw that you moved the
>> tests under the source project.  If the tests and source end up in a
>> single Eclipse project, I assume the tests won't run after each save in
>> the editor, right?
>> 
>> Thanks,
>> -Alex
>> 


AW: [FALCON] Compiling Falcon with Maven

Posted by Christofer Dutz <ch...@c-ware.de>.
Well I am using my mavenized sdks my sdk-converter provides me ... and I have all of these resource bundles available. 

Anyway ... I just finished releasing a new version of JBurg, that no longer has the classloader issues the 1.10.2 version had (JBurg 1.10.2 used the system classloader to load stuff, in maven we have a fine hierarchy of classloaders, so changing this to the current threads context classloader resolved all issues I had). Paralel to that I did a first release of the jburg-maven-plugin (version 1.10.3 to match that of jburg). I also updated the versions in my branch. So you should be able to get the same results as I am having ... Well not quite ... thinking about it ... I still have the debug-player path hard coded :-(

But I'm currently writing a simple DMG file decoder to read the debug-player dmg images. With that I'll be able to finish the sdk-converter to package the runtimes. As soon as that's done I can change the tests to auto-download the runtimes and as soon as you update the flash.version property, it will automatically run the correct player version :-)

It finally feels like I'm getting somewhere :-) 

Now I have to convince you how awesome Maven is ... well I hope it will do the convincing on it's own :-)

Chris 

________________________________________
Von: Alex Harui <ah...@adobe.com>
Gesendet: Mittwoch, 24. Februar 2016 17:04
An: dev@flex.apache.org
Betreff: Re: [FALCON] Compiling Falcon with Maven

On 2/24/16, 4:19 AM, "Christofer Dutz" <ch...@c-ware.de> wrote:

>Hi,
>
>so I managed to get all Unit-Tests to pass:
>"Tests run: 375, Failures: 0, Errors: 0, Skipped: 26"

Yay!


>currently having a little trouble with the resource-bundles as I'm
>getting a lot of:
>"Error: Unable to resolve resource bundle 'messaging'"
>For a lot of other bundles too ...
>
>I don't quite know why, but I'll dig into that later on ...

That might be that you are not using en_US and the SDK in flex-sdk hasn't
been built with the other-locales target (to produce de_DE for you).

-Alex


Re: [FALCON] Compiling Falcon with Maven

Posted by Alex Harui <ah...@adobe.com>.
On 2/24/16, 4:19 AM, "Christofer Dutz" <ch...@c-ware.de> wrote:

>Hi,
>
>so I managed to get all Unit-Tests to pass:
>"Tests run: 375, Failures: 0, Errors: 0, Skipped: 26"

Yay!


>currently having a little trouble with the resource-bundles as I'm
>getting a lot of:
>"Error: Unable to resolve resource bundle 'messaging'"
>For a lot of other bundles too ...
>
>I don't quite know why, but I'll dig into that later on ...

That might be that you are not using en_US and the SDK in flex-sdk hasn't
been built with the other-locales target (to produce de_DE for you).

-Alex