[xwiki-devs] New fine-grained way to ignore CLIRR violations
Hi guys, I've committed http://jira.xwiki.org/browse/XCOMMONS-283 which allows us to very precisely exclude CLIRR violations. See http://mojo.codehaus.org/clirr-maven-plugin/examples/ignored-differences.htm... for details. For example I've just added an IRCBot exclude using this with: <ignored> <difference> <className>org/xwiki/ircbot/IRCBot</className> <method>void initialize(java.lang.String)</method> <differenceType>7012</differenceType> <justification>IRCBot is still a young API. Added a new initialize() method to support installing the IRC Bot application in a subwiki</justification> </difference> </ignored> Now could every one who's added a clirr exclude please convert to the new way? This allows us to have fine-grained excludes and not exclude the whole file. Thanks -Vincent
After looking at the doc (http://mojo.codehaus.org/clirr-maven-plugin/examples/ignored-differences.htm...) I tried to do this: --------------------------------8<-------------------------------- <groupId>org.codehaus.mojo</groupId> <artifactId>clirr-maven-plugin</artifactId> <configuration> <ignored> <differences> <difference> <className>org/xwiki/ircbot/IRCBot</className> <method>void initialize(java.lang.String)</method> <differenceType>7012</differenceType> <justification>IRCBot is still a young API. Added a new initialize() method to support installing the IRC Bot application in a subwiki</justification> </difference> <difference> <className>org/xwiki/component/wiki/WikiComponent</className> <method>Class getRole()</method> <differenceType>7002</differenceType> <justification>WikiComponent is still a young API. Removed the method to implement XWIKI-8233, "Allow wiki components to implement parameterized types"</justification> </difference> </differences> </ignored> --------------------------------8<-------------------------------- But it fails with the following error: [ERROR] Failed to execute goal org.codehaus.mojo:clirr-maven-plugin:2.5:check (clirr-check) on project xwiki-platform-core: Unable to parse configuration of mojo org.codehaus.mojo:clirr-maven-plugin:2.5:check for parameter differences: Cannot find setter, adder nor field in org.codehaus.mojo.clirr.Difference for 'difference' -> [Help 1] Does this mean the maven plugin doesn't handle the "differences" tag ? Another issue I can think of is pameterized types, for example "Class<?>", but I guess we can xml encode that. On Fri, Oct 19, 2012 at 10:24 AM, Vincent Massol <vincent@massol.net> wrote:
Hi guys,
I've committed http://jira.xwiki.org/browse/XCOMMONS-283 which allows us to very precisely exclude CLIRR violations.
See http://mojo.codehaus.org/clirr-maven-plugin/examples/ignored-differences.htm... for details.
For example I've just added an IRCBot exclude using this with:
<ignored> <difference> <className>org/xwiki/ircbot/IRCBot</className> <method>void initialize(java.lang.String)</method> <differenceType>7012</differenceType> <justification>IRCBot is still a young API. Added a new initialize() method to support installing the IRC Bot application in a subwiki</justification> </difference> </ignored>
Now could every one who's added a clirr exclude please convert to the new way?
This allows us to have fine-grained excludes and not exclude the whole file.
Thanks -Vincent
_______________________________________________ devs mailing list devs@xwiki.org http://lists.xwiki.org/mailman/listinfo/devs
-- Jean-Vincent Drean, XWiki.
On Oct 19, 2012, at 5:51 PM, Jean-Vincent Drean <jv@xwiki.com> wrote:
After looking at the doc (http://mojo.codehaus.org/clirr-maven-plugin/examples/ignored-differences.htm...) I tried to do this:
--------------------------------8<-------------------------------- <groupId>org.codehaus.mojo</groupId> <artifactId>clirr-maven-plugin</artifactId> <configuration> <ignored> <differences> <difference> <className>org/xwiki/ircbot/IRCBot</className> <method>void initialize(java.lang.String)</method> <differenceType>7012</differenceType> <justification>IRCBot is still a young API. Added a new initialize() method to support installing the IRC Bot application in a subwiki</justification> </difference> <difference> <className>org/xwiki/component/wiki/WikiComponent</className> <method>Class getRole()</method> <differenceType>7002</differenceType> <justification>WikiComponent is still a young API. Removed the method to implement XWIKI-8233, "Allow wiki components to implement parameterized types"</justification> </difference> </differences> </ignored> --------------------------------8<--------------------------------
But it fails with the following error:
[ERROR] Failed to execute goal org.codehaus.mojo:clirr-maven-plugin:2.5:check (clirr-check) on project xwiki-platform-core: Unable to parse configuration of mojo org.codehaus.mojo:clirr-maven-plugin:2.5:check for parameter differences: Cannot find setter, adder nor field in org.codehaus.mojo.clirr.Difference for 'difference' -> [Help 1]
Does this mean the maven plugin doesn't handle the "differences" tag ?
Correct. See http://jira.xwiki.org/browse/XCOMMONS-283?focusedCommentId=72397&page=com.at... Thanks -Vincent
Another issue I can think of is pameterized types, for example "Class<?>", but I guess we can xml encode that.
On Fri, Oct 19, 2012 at 10:24 AM, Vincent Massol <vincent@massol.net> wrote:
Hi guys,
I've committed http://jira.xwiki.org/browse/XCOMMONS-283 which allows us to very precisely exclude CLIRR violations.
See http://mojo.codehaus.org/clirr-maven-plugin/examples/ignored-differences.htm... for details.
For example I've just added an IRCBot exclude using this with:
<ignored> <difference> <className>org/xwiki/ircbot/IRCBot</className> <method>void initialize(java.lang.String)</method> <differenceType>7012</differenceType> <justification>IRCBot is still a young API. Added a new initialize() method to support installing the IRC Bot application in a subwiki</justification> </difference> </ignored>
Now could every one who's added a clirr exclude please convert to the new way?
This allows us to have fine-grained excludes and not exclude the whole file.
Thanks -Vincent
_______________________________________________ devs mailing list devs@xwiki.org http://lists.xwiki.org/mailman/listinfo/devs
-- Jean-Vincent Drean, XWiki. _______________________________________________ devs mailing list devs@xwiki.org http://lists.xwiki.org/mailman/listinfo/devs
Thanks, done for the WikiComponent and UIExtensions APIs. As for parameterized types, they're not taken into account, only the main Type is (for clirr a java.util.List<java.lang.String> is a java.util.List). JV. On Fri, Oct 19, 2012 at 6:15 PM, Vincent Massol <vincent@massol.net> wrote:
On Oct 19, 2012, at 5:51 PM, Jean-Vincent Drean <jv@xwiki.com> wrote:
After looking at the doc (http://mojo.codehaus.org/clirr-maven-plugin/examples/ignored-differences.htm...) I tried to do this:
--------------------------------8<-------------------------------- <groupId>org.codehaus.mojo</groupId> <artifactId>clirr-maven-plugin</artifactId> <configuration> <ignored> <differences> <difference> <className>org/xwiki/ircbot/IRCBot</className> <method>void initialize(java.lang.String)</method> <differenceType>7012</differenceType> <justification>IRCBot is still a young API. Added a new initialize() method to support installing the IRC Bot application in a subwiki</justification> </difference> <difference> <className>org/xwiki/component/wiki/WikiComponent</className> <method>Class getRole()</method> <differenceType>7002</differenceType> <justification>WikiComponent is still a young API. Removed the method to implement XWIKI-8233, "Allow wiki components to implement parameterized types"</justification> </difference> </differences> </ignored> --------------------------------8<--------------------------------
But it fails with the following error:
[ERROR] Failed to execute goal org.codehaus.mojo:clirr-maven-plugin:2.5:check (clirr-check) on project xwiki-platform-core: Unable to parse configuration of mojo org.codehaus.mojo:clirr-maven-plugin:2.5:check for parameter differences: Cannot find setter, adder nor field in org.codehaus.mojo.clirr.Difference for 'difference' -> [Help 1]
Does this mean the maven plugin doesn't handle the "differences" tag ?
Correct. See http://jira.xwiki.org/browse/XCOMMONS-283?focusedCommentId=72397&page=com.at...
Thanks -Vincent
Another issue I can think of is pameterized types, for example "Class<?>", but I guess we can xml encode that.
On Fri, Oct 19, 2012 at 10:24 AM, Vincent Massol <vincent@massol.net> wrote:
Hi guys,
I've committed http://jira.xwiki.org/browse/XCOMMONS-283 which allows us to very precisely exclude CLIRR violations.
See http://mojo.codehaus.org/clirr-maven-plugin/examples/ignored-differences.htm... for details.
For example I've just added an IRCBot exclude using this with:
<ignored> <difference> <className>org/xwiki/ircbot/IRCBot</className> <method>void initialize(java.lang.String)</method> <differenceType>7012</differenceType> <justification>IRCBot is still a young API. Added a new initialize() method to support installing the IRC Bot application in a subwiki</justification> </difference> </ignored>
Now could every one who's added a clirr exclude please convert to the new way?
This allows us to have fine-grained excludes and not exclude the whole file.
Thanks -Vincent
_______________________________________________ devs mailing list devs@xwiki.org http://lists.xwiki.org/mailman/listinfo/devs
-- Jean-Vincent Drean, XWiki. _______________________________________________ devs mailing list devs@xwiki.org http://lists.xwiki.org/mailman/listinfo/devs
_______________________________________________ devs mailing list devs@xwiki.org http://lists.xwiki.org/mailman/listinfo/devs
Ok here's an update to this rule… It seems that the new way cannot be used to easily specify a group of files to fully exclude since it always checks the differenceType value (and it cannot be a wildcard). So the new strategy should be: * In general always use the fine-grained way (i.e. <difference>) * When classes are moved to a new module or retired then use the "old" way (i.e. <exclude>) Thanks -Vincent On Oct 19, 2012, at 10:24 AM, Vincent Massol <vincent@massol.net> wrote:
Hi guys,
I've committed http://jira.xwiki.org/browse/XCOMMONS-283 which allows us to very precisely exclude CLIRR violations.
See http://mojo.codehaus.org/clirr-maven-plugin/examples/ignored-differences.htm... for details.
For example I've just added an IRCBot exclude using this with:
<ignored> <difference> <className>org/xwiki/ircbot/IRCBot</className> <method>void initialize(java.lang.String)</method> <differenceType>7012</differenceType> <justification>IRCBot is still a young API. Added a new initialize() method to support installing the IRC Bot application in a subwiki</justification> </difference> </ignored>
Now could every one who's added a clirr exclude please convert to the new way?
This allows us to have fine-grained excludes and not exclude the whole file.
Thanks -Vincent
On Oct 22, 2012, at 9:20 AM, Vincent Massol <vincent@massol.net> wrote:
Ok here's an update to this rule…
It seems that the new way cannot be used to easily specify a group of files to fully exclude since it always checks the differenceType value (and it cannot be a wildcard).
For those interested in the code that checks the difference, it's in the match() method of: http://svn.codehaus.org/mojo/tags/clirr-maven-plugin-2.5/src/main/java/org/c... Thanks -Vincent
So the new strategy should be:
* In general always use the fine-grained way (i.e. <difference>) * When classes are moved to a new module or retired then use the "old" way (i.e. <exclude>)
Thanks -Vincent
On Oct 19, 2012, at 10:24 AM, Vincent Massol <vincent@massol.net> wrote:
Hi guys,
I've committed http://jira.xwiki.org/browse/XCOMMONS-283 which allows us to very precisely exclude CLIRR violations.
See http://mojo.codehaus.org/clirr-maven-plugin/examples/ignored-differences.htm... for details.
For example I've just added an IRCBot exclude using this with:
<ignored> <difference> <className>org/xwiki/ircbot/IRCBot</className> <method>void initialize(java.lang.String)</method> <differenceType>7012</differenceType> <justification>IRCBot is still a young API. Added a new initialize() method to support installing the IRC Bot application in a subwiki</justification> </difference> </ignored>
Now could every one who's added a clirr exclude please convert to the new way?
This allows us to have fine-grained excludes and not exclude the whole file.
Thanks -Vincent
participants (2)
-
Jean-Vincent Drean -
Vincent Massol