[xwiki-devs] [proposal] Add velocity api which is deprecated so that templates can be made to log a deprecated warning.
I would like to start deprecating templates which are no longer used and I think the right way is to make the deprecated template throw a warning to the logs when it's called. I am proposing adding a service which does nothing but is deprecated. Templates which we deprecate will have this call added and then users of said templates will have fair warning that the template will be removed. Not knowing what the convention is I will blindly suggest: $services.velocity.deprecated() If anyone has a better name, I'd like to hear it. WDYT? Caleb
Wouldn't a logging service make more sense ? This sounds a lot like a hack to me. On Mon, Jun 28, 2010 at 17:01, Caleb James DeLisle <[email protected]> wrote:
I would like to start deprecating templates which are no longer used and I think the right way is to make the deprecated template throw a warning to the logs when it's called.
I am proposing adding a service which does nothing but is deprecated. Templates which we deprecate will have this call added and then users of said templates will have fair warning that the template will be removed.
Not knowing what the convention is I will blindly suggest: $services.velocity.deprecated() If anyone has a better name, I'd like to hear it.
WDYT?
Caleb
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Thomas Mortagne
On Jun 28, 2010, at 5:00 PM, Thomas Mortagne wrote:
Wouldn't a logging service make more sense ?
This sounds a lot like a hack to me.
Yes I agree that make the log service avail would be better. Thanks -Vincent
On Mon, Jun 28, 2010 at 17:01, Caleb James DeLisle <[email protected]> wrote:
I would like to start deprecating templates which are no longer used and I think the right way is to make the deprecated template throw a warning to the logs when it's called.
I am proposing adding a service which does nothing but is deprecated. Templates which we deprecate will have this call added and then users of said templates will have fair warning that the template will be removed.
Not knowing what the convention is I will blindly suggest: $services.velocity.deprecated() If anyone has a better name, I'd like to hear it.
WDYT?
Caleb
Logging service introduces new issues. How much do you let a user log? Can I fill the disk with logs? If I write logs off the end of the disk, can I then start attacking without my tools being exposed? What would the code look like in the template? How many lines would it take to say a template was deprecated? IMO the call should look as similar to @Deprecated as possible. Caleb Vincent Massol wrote:
On Jun 28, 2010, at 5:00 PM, Thomas Mortagne wrote:
Wouldn't a logging service make more sense ?
This sounds a lot like a hack to me.
Yes I agree that make the log service avail would be better.
Thanks -Vincent
On Mon, Jun 28, 2010 at 17:01, Caleb James DeLisle <[email protected]> wrote:
I would like to start deprecating templates which are no longer used and I think the right way is to make the deprecated template throw a warning to the logs when it's called.
I am proposing adding a service which does nothing but is deprecated. Templates which we deprecate will have this call added and then users of said templates will have fair warning that the template will be removed.
Not knowing what the convention is I will blindly suggest: $services.velocity.deprecated() If anyone has a better name, I'd like to hear it.
WDYT?
Caleb
devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
participants (3)
-
Caleb James DeLisle -
Thomas Mortagne -
Vincent Massol