You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@buildr.apache.org by Peter Schröder <ps...@blau.de> on 2009/11/02 15:02:31 UTC

Bug in linking additional test-folder?

Hi,

I am experiencing a strange behavior of buildr when having an empty  
test-folder.

See the example in the attachment, and look into the readme.txt for  
the problem.

Kind regards
Peter


Re: Bug in linking additional test-folder?

Posted by Peter Schröder <ps...@blau.de>.
thx

Am 03.11.2009 um 16:42 schrieb Alex Boisvert:

> Hi Peter,
>
> I can reproduce the issue and I'll file it in Jira as soon as it's  
> available
> <sigh>.
>
> My guess is the classpath isn't set up correctly before RJB is
> initialized... I'll look deeper into it today.
>
> alex
>
>
> On Mon, Nov 2, 2009 at 6:02 AM, Peter Schröder <ps...@blau.de> wrote:
>
>> Hi,
>>
>> I am experiencing a strange behavior of buildr when having an empty
>> test-folder.
>>
>> See the example in the attachment, and look into the readme.txt for
>> the problem.
>>
>> Kind regards
>> Peter
>>
>>


Re: Bug in linking additional test-folder?

Posted by Alex Boisvert <al...@gmail.com>.
Hi Peter,

I can reproduce the issue and I'll file it in Jira as soon as it's available
<sigh>.

My guess is the classpath isn't set up correctly before RJB is
initialized... I'll look deeper into it today.

alex


On Mon, Nov 2, 2009 at 6:02 AM, Peter Schröder <ps...@blau.de> wrote:

> Hi,
>
> I am experiencing a strange behavior of buildr when having an empty
> test-folder.
>
> See the example in the attachment, and look into the readme.txt for
> the problem.
>
> Kind regards
> Peter
>
>

Re: Bug in linking additional test-folder?

Posted by Alex Boisvert <al...@gmail.com>.
Ok, I've gone ahead and implemented dependency/ordering between extensions
(before_define / after_define)* à la Rake*.

https://svn.apache.org/viewvc?view=revision&revision=833791

alex

On Thu, Nov 5, 2009 at 7:44 AM, Alex Boisvert <al...@gmail.com>wrote:

> (Moving to dev@)
>
> This issue is due to how extensions are handled.
>
> The Test module (which is an extension) adds test.compile.target to the
> classpath:
>
> # lib/buildr/core/test.rb
> after_define do |project|
>   ...
>   test.dependencies.concat [test.compile.target,
> test.resources.target].compact
>   ...
> end
>
> but Peter's custom extension is run only after so the change to
> test.compile.from (which affects the value of test.compile.target) isn't
> taken into account:
>
> after_define do |project|
>   project.test.compile.from project._(:src, 'test-functional', :java)
> end
>
> and thus when JUnit runs the classpath is incorrect and it's too late to
> fix anything since the classpath must be defined early for RJB to accept it.
>
> I've come across the same kind of issue with Eclipse extensions as well...
> and I think we need a way to define dependencies/ordering between extensions
> so we can properly compose them.  Maybe we could borrow the same notation
> from task dependencies?  e.g.,
>
> after_define(:test => :my_extension)
>
> after_define(:my_extension) do |project|
>   ...
> end
>
> Thoughts?  Any better ideas?
>
> alex
>
> On Mon, Nov 2, 2009 at 6:02 AM, Peter Schröder <ps...@blau.de> wrote:
>
>> Hi,
>>
>> I am experiencing a strange behavior of buildr when having an empty
>> test-folder.
>>
>> See the example in the attachment, and look into the readme.txt for
>> the problem.
>>
>> Kind regards
>> Peter
>>
>>
>

Re: Bug in linking additional test-folder?

Posted by Alex Boisvert <al...@gmail.com>.
(Moving to dev@)

This issue is due to how extensions are handled.

The Test module (which is an extension) adds test.compile.target to the
classpath:

# lib/buildr/core/test.rb
after_define do |project|
  ...
  test.dependencies.concat [test.compile.target,
test.resources.target].compact
  ...
end

but Peter's custom extension is run only after so the change to
test.compile.from (which affects the value of test.compile.target) isn't
taken into account:

after_define do |project|
  project.test.compile.from project._(:src, 'test-functional', :java)
end

and thus when JUnit runs the classpath is incorrect and it's too late to fix
anything since the classpath must be defined early for RJB to accept it.

I've come across the same kind of issue with Eclipse extensions as well...
and I think we need a way to define dependencies/ordering between extensions
so we can properly compose them.  Maybe we could borrow the same notation
from task dependencies?  e.g.,

after_define(:test => :my_extension)

after_define(:my_extension) do |project|
  ...
end

Thoughts?  Any better ideas?

alex

On Mon, Nov 2, 2009 at 6:02 AM, Peter Schröder <ps...@blau.de> wrote:

> Hi,
>
> I am experiencing a strange behavior of buildr when having an empty
> test-folder.
>
> See the example in the attachment, and look into the readme.txt for
> the problem.
>
> Kind regards
> Peter
>
>