From: "Steve Loughran" <[EMAIL PROTECTED]>
> > As I have modified the value of some public static finals,
> > viz. Project.DEBUG and Project.VERBOSE, mandatory
> > recompiling of all of Ant's source code is needed.
> > If you can suggest a cleaner way to do this and avoid
> > this penalty, I am all ears.
>
> This breaks every existing external task out there, right?
It just exposes the problem of having used
public static finals. But short answer is, yes,
it would. Maybe I can change the levels back
to what they were and assign a new value to
deprecated and build in logic to handle this.
> I am concerned with the risk it presents to
> all those external apps; it is one of those
Valid point.
>
> Here is some of what I think we could do
>
> 1. use a deprecated(text) method (preferably with a since flag),
implemented
> in Task
> This means that tasks themselves do not need to log at the deprecation
> level.
>
> 2. have that base implementation hand off to Project.deprecated()
>
> 3. Project.deprecated() can have its implementation changed over time. It
> could be set to throw an exception in the -strict mode I have just
invented;
> it could print warnings, it could be silent
>
> 4. If it needs to print warnings, then they do have to go through the
> listener chain, which means it needs a logging level. It could just go out
> as info, like this
>
> class Project
>
> public void deprecated(Task task, String text) {
> if(deprecation_mode==DEPRECATION_FAIL) {
> //TODO: get line number &c from task
> throw new BuildException(text);
> }
> if(deprecation_mode==DEPRECATION_WARN) {
> log(text,MSG_WARN);
> }
> deprecations++;
> }
>
Wanna come up with the implementation? ;-)
Cheers,
Magesh
**********************************************
* Courage is acting as if your hands aren't *
* trembling. *
**********************************************
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>