Re: [VOTE] Matt Benson as a committer

2004-02-06 Thread cmanolache
Antoine Lévy-Lambert wrote:

 I am impressed by the number of contributions to the user list and of
 patches sent to Bugzilla by Matt Benson.
 
 I would like to propose him to become an ant committer.
 
 Do you agree

 
 [+1] Yes
 [ ] No
 


Costin


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Vote: local for 1.6

2003-10-23 Thread cmanolache
I agree that property doesn't work well with macro and some other
use cases. 

I'm +1 on local if we can keep it separated from property, so the
behavior of property doesn't change. I think it may be a good idea to
even throw an exception if some name is used with both local and property.
I wouldn't mind even a var that is local + modifiable. 

I don't like the second example where local seems to be used to declare
filepath that is later defined as a property.

Another approach is to use namespaces for properties - IMO that's a cleaner
solution, but has the disadvantage that overloads property behavior.
( a local:foo property name will imply a local lifecycle, a att:foo could
be used for a modifiable property, etc ). I know this isn't very popular :-)

Costin

peter reilly wrote:

 On Wednesday 22 October 2003 15:04, Stefan Bodewig wrote:
 On 22 Oct 2003, Stefan Bodewig [EMAIL PROTECTED] wrote:
  I haven't made up my mind on the feature itself

 OK, re-reading the description first, I don't like the

 ,

 | The value part of local is optional, and  the local
 | property may be set by a subsequent property, property
 | will only set it if the value is not set.

 `

 part.  This means that whenever I find a property task I'll have to
 search all possible scopes for a local element and can't rely on it
 being global.

 What is the benefit of making property adhere to the scoping set up
 by local?
 
 The point is that all tasks including property see the local
 properties as normal properties.
 
 It means that the macro attributes are now seen as normal
 properties by the tasks that are contained within the sequential
 nested element.
 
 The local makes a property of the same kind as the macro attribute.
 
 A common use case for this is when converting an antcall to a macro:
 I had a target that was used as an antcall target, it used a property
 suite.pattern to contain a regex what was used a number of times
 in the target and as an ant call was done to invoke the target, this
 was not seen outside the target. On conversion to a macrodef, the
 property suite.pattern is now a global property and the macrodef
 may fail unexpectly.
 
 With local the macro now looks like this:
   !--
macro to generate test suites registing
@param gen.dir  the dir to place the register_suites.h and .cpp
files @param unit.dir the dir that the unit_*.cpp files are located
--
   macrodef name=gen-register-suites
 attribute name=gen.dir/
 attribute name=unit.dir/
 sequential
   local name=suite.pattern value=^ *SUITE\(.*,\s*(.*)\s*\)/
   mkdir dir=${gen.dir}/
...
 /sequential
  /macrodef
 
 Another common use case is use of a local to pass information from one
 task to another without messing up global properties or similar properties
 used in other targets (say in a complicated build with a number of imports
 and lots of targets).
 
local name=filepath/
pathconvert property=filepath targetos=unix
 refid=files.path/
echothe files in files.path are ${filepath}/echo
 
 However I can see the problem of looking at a script and not knowing if
 the property is local or global.
 
 The last patch allowed [sub]ant[call] to inherit the local properties.
 
 I propose to change the local so that this inheriatance is removed and
 also that macro instances do not inherit the local properites - i.e.
 the local properties are staticlly scoped in the build script.
 
 So currently the following is the case:
 property name=p value=global/
 
 macrodef name=inner
   sequential
 echop is ${p}/echo
   /sequential
 /macrodef
 
 macrodef name=outer
   attribute name=p/
sequential
   inner/
/sequential
 /macrodef
 
 outer p=from macro/
 
 Will generate p is from macro which is probally not expected as
 inner was not explicilty passed the property by outer and inner
 may be in another file or in an antlib.xml.
 
 Peter
 

 I don't have any strong objections against the rest or the
 implementation.

 So +0.5 (which can be turned into a +0.9 by explaining why property
 should care about scopes 8-).

 Stefan

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [OT] Build Time

2003-08-19 Thread cmanolache
Stefan Bodewig wrote:

 On Sat, 16 Aug 2003, Costin Manolache [EMAIL PROTECTED] wrote:
 
 Regarding ant logging system - I think we should eventually reopen
 the subject and pick a logger API
 
 I fail to see the benefit of using a different logging system, but I'm
 ceratinly open to discuss it.
 
 Ant's system currently is an event based system which goes beyond
 simple logging and we'd still have to maintain that anyway.  It is
 getting used for much more things than just logging.  AntClassLoader
 uses buildFinished events to deregister and clean itself up to allow
 garbage collection for example.


I know. 

The problem is that we also use this logging system for debug info - 
and IMO at least this doesn't work as well. If you want to find what's wrong
with a build ( and wrong things happen with complex build files ) - you can
enable debug/verbose, but that's far too much info to process. 

Something like log4j would allow us to enable debug on a particular target
or task.

The second issue with using the current event-based system for debug is the 
performance - we need to _allways_ do the string concatenations, and that
may have a significant impact on performance.



 then start using the normal if( log.isDebugEnabled()) log() that
 prevents useless string concatenations and calls.
 
 Vadim's stats say that cloning of the build listener list and
 iterating through them are the problem, not string concatenation.

That's one problem. IMO string concat is also a problem, but it won't show
in OptimizeIt if you do time-based profiles. 


 
 And I doubt that you could implement isDebugEnabled() at all using
 Ant's BuildListener concept as the listener decides what to log, Ant
 just passes the events along.  It is very well possible that one
 listener will log a MSG_DEBUG message while another one will not - and
 both are there at the same time.

That's exactly the problem. Most of the time the debug messages are not
logged by anyone - and if you need them, usually you need a small set. 
By default that's hard to get, and in the most common use case ( no debug )
it is inefficient.

Costin




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]