On Mon, 2009-08-03 at 11:01 -0700, Alex Boisvert wrote: > Oh and I was perusing the repo and saw your sloccount.rb extension... I'm > guessing it's still a work-in-progress and wanted to point out that it would > be better to allocate a new SloccountConfig in before_define instead of > having a single configuration instance across all projects. I just tried setting different report_to paths in different subprojects and it worked.
What's the advantage of allocating a new SloccountConfig in
before_define, or what's the issue with the current approach?
And just to be able to try it: how would I allocate a new
SloccountConfig in before_define? Like this:
before_define do |project|
@sloccount_config = SloccountConfig.new(project)
...
An issue I have right now is that with the sloccount extension enabled
is that then buildr eclipse does not work anymore: no eclipse artifacts
are generated (and that's also the case with the loc extension). I
already tried removing the SloccountConfig stuff to simplify the
extension a little bit but that didn't change anything.
Do you have a clue what might be causing this?
Thanx && cheers,
Martin
>
> My (unsolicited) $0.02...
>
> alex
>
> On Mon, Aug 3, 2009 at 10:03 AM, Daniel Spiewak <[email protected]> wrote:
>
> > You should use `task` rather than `define_task`. I think that's probably
> > the root of all your problems. My changes can be seen here:
> > http://github.com/djspiewak/buildr-addons/tree/master
> >
> > Daniel
> >
> > On Mon, Aug 3, 2009 at 11:43 AM, Martin Grotzke <
> > [email protected]> wrote:
> >
> > > Here's the loc extension (loc.rb):
> > > http://github.com/magro/buildr-addons/tree/master
> > >
> > > Cheers,
> > > Martin
> > >
> > >
> > > On Mon, 2009-08-03 at 11:29 -0500, Daniel Spiewak wrote:
> > > > That really doesn't make any sense. Could we see the full sources?
> > > >
> > > > Daniel
> > > >
> > > > On Mon, Aug 3, 2009 at 4:58 AM, Martin Grotzke <
> > > [email protected]
> > > > > wrote:
> > > >
> > > > > And I noticed that with the example one has to invoke
> > > > > buildr myproj:loc
> > > > > for the project or
> > > > > buildr myproj:mysubproj:loc
> > > > > for a subproject.
> > > > >
> > > > > The
> > > > > first_time do
> > > > > Project.local_task('loc')
> > > > > end
> > > > > seems to have no effect.
> > > > >
> > > > > Is this intended?
> > > > >
> > > > > Cheers,
> > > > > Martin
> > > > >
> > > > >
> > > > > On Mon, 2009-08-03 at 11:47 +0200, Martin Grotzke wrote:
> > > > > > Hi,
> > > > > >
> > > > > > I just want to create a sloccount extension and for this started
> > with
> > > > > > the loc example.
> > > > > >
> > > > > > I had to do minor changes, which I applied to the
> > extending.textile:
> > > > > >
> > > > >
> > >
> > http://github.com/magro/buildr/commit/b880acaca4892a4000143d089b59873247808bc0
> > > > > >
> > > > > > Without these changes:
> > > > > > - the task is not shown with buildr -T
> > > > > > - the task fails if the source directories also contain
> > > subdirectories
> > > > > > (which is normally the case)
> > > > > >
> > > > > > Cheers,
> > > > > > Martin
> > > > > >
> > > > > >
> > > > >
> > >
> >
signature.asc
Description: This is a digitally signed message part
