Hi devs, I'd like to propose to apply the -legacy module concept we have in platform to XWiki Commons (and XWiki Rendering when a first need will arise).
The idea is to introduce a xwiki-commons/xwiki-commons-core/xwiki-commons-legacy parent module. My first use case is: * Now that I've removed all usages of the old @Requirement annotation in commons, rendering, platform, enterprise I'd like to make sure we don't use it again and thus I'd like to add an aspect in xwiki-commons/xwiki-commons-core/xwiki-commons-legacy/xwiki-commons-legacy-component/ to add support for the old annotations. More specifically I'd like to remove the handling of the old Requirement annotation in ComponentDescriptorFactory and add an around aspect to add support for it in the legacy module. Thus I'd like to agree that we have 2 steps when it comes to deprecating code: 1) Start by deprecating it using the @deprecate and @Deprecated javadoc and java annotations. The code remains where it was before the deprecation happens. This is a first step. 2) When our own code doesn't use any of the deprecated APIs then move the code to a legacy module (either by moving an entire class if possible or by using some Aspect to weave some methods for ex). This is a second step. It has the following advantages: * Our code remains clean of old deprecated apis * Deprecated code is cleanly separated from new ways of doing things * When new users download the our code they see the new ways (same for javadoc generation) * Users wanting to use the old APIs can still do so Note: The question of when to remove completely the code from legacy is another topic that I'd like to bring up too but in a different email thread (I started writing a mail on this topic but need to finish it). Here's my +1 to follow this practice across our code base and to document it on xwiki.org Thanks -Vincent _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs

