On Wed, 21 May 2003, Gus Heck <[EMAIL PROTECTED]> wrote:
Stefan Bodewig wrote:
currently chmod has a fair number of additional features.
Which are?
dir, includes, excludes, defaultexcludes...
Please don't! These attributes come from the pre-fileset time and are only kept for backwards compatibility. Please look at the special case in Chmod's execute that is needed to keep the old behavior of the dir attribute.
Ah glad I asked.
Another logicical addition to all 3 of them might be allowing dirsets.
I think the type="dir" attribute covers this, doesn't it?
I guess multiple ways of doing things just isn't popular with anyone around here. Makes me wonder why we have dirsets at all if we can't use them here, and only in a narrow way for subant...
I suppose type="dir" is a pre-dirset feature on chmod, which I may have inadvertently propogated to my tasks because dirset was very new at the time I wrote them. (which was 4-5 months before they were commited due to the 1.5 release feature freezes). These tasks are not yet released, so maybe they should take DirSets instead?
Granted that one would then need to supply a dirset and a fileset to get the "both" effect, but it would seem more consistant with the documentation of fileset which entirely fails to mention that directories are matched too. (unless you count the fact that /CVS is one of the default excludes).
So what is the purpose of DirSet? Maybe fileset should have had a type="dir|file|both" instead of having Dirsets. (of course with dirset released, it cant' be undone)
What direction should I be taking with chgrp/chown here?
Thinking out loud... It looks like we are not winding up with one way of doing things, but several ways that cannot be mixed between tasks. This will force the user to remember which flavor of file or directory specification a particular task finds tasty.
To put it another way, I think we want to make using ant as simple as possible. To me life is simplest when any logical answer will do, and failing that, simple if there is one answer that always works. The worst case is a hashtable of case specific answers. The hashtable is what we are in danger of here.
Given the constraints of back compatability, it seems that the only way to make life easy for the user is keep adding the new ways of referencing things (ie dirsets) to the old tasks in which they make sense. (much like has been done to chmod with filesets). This way at least, A dirset would always work and older ways you might or might not.
If my logic is correct, and the goal is to minimize the number of ways to acomplish the same thing, we should not release chgrp and chown with the old method (type=) but rather convert them to a DirSet accepting version. (and add dirsets to chmod). This change would break builds (like mine particularly), but hey it is an alpha version... such is life.
The pruning of things like chmod's dir atribute can be part of ant 2.0 where back compatability is not one of our promises... Of course if dirset is prunable, then I have it all backwards :).
It has been a "core task" of Ant virtually since Ant exists, so there is no way to move it from "core" to "optional" unless we restructure the set of built-in tasks completely IMHO.
To clarify. I don't think we should move any core task to optional at all - until we restructure our task system completely, which I'd expect to go along with antlibs, yes. There are more tasks than just chmod that are in core but don't really fit there (cvs for example).
ok I understand. Have you found out anything about tandem/nonstop and chgrp chown yet?
-Gus