revapi: Problems when converting to revapi.differences
On XWiki I tried to upgrade to revapi-java 0.22.1 and revapi-maven-plugin 0.12.2 and I’ve used for example:
<plugin>
<groupId>org.revapi</groupId>
<artifactId>revapi-maven-plugin</artifactId>
<configuration>
<analysisConfiguration>
<!-- Add ignores here using the following syntax. You can use a single <revapi.differences> entry but it
cannot be empty. You can also use different <revapi.differences> entries if you wish to use a common
justification for example.
Note: you can use regexes by using the syntax: <regex>true</regex>
Don't forget to '\'-escape dots and other special characters in this case ;)
<revapi.differences>
<justification>This change is necessary to fix bug #1234</justification>
<criticality>hightlight</criticality>
<differences>
<item>
<code>java.method.addToInterface</code>
<fullQualifiedClassName>com.acme.ToolInterface</fullyQualifiedClassName>
<new>method void com.acme.ToolInterface::setup()</new>
</item>
<item>
<code>java.method.removed</code>
<fullQualifiedClassName>com.acme.ToolInterface</fullyQualifiedClassName>
<old>method void com.acme.ToolInterface::initialize()</old>
<justification>...</justification>
</item>
</differences>
</revapi.differences>
-->
<revapi.differences>
<differences>
<item>
<code>java.method.removed</code>
<old>method void org.xwiki.diff.xml.XMLDiff::xxx()</old>
<justification>Unstable API added by mistake.</justification>
</item>
</differences>
</revapi.differences>
</analysisConfiguration>
</configuration>
</plugin>
When executing it I got:
[INFO] --- revapi-maven-plugin:0.12.2:check (revapi-check) @ xwiki-commons-diff-xml ---
[INFO] Comparing [org.xwiki.commons:xwiki-commons-diff-xml:jar:12.10] against [org.xwiki.commons:xwiki-commons-diff-xml:jar:13.0-SNAPSHOT] (including their transitive dependencies).
[WARNING] The `revapi.reclassify` extension is deprecated. Consider using the `revapi.differences` instead.
[WARNING] The `revapi.ignore` extension is deprecated. Consider using the `revapi.differences` instead.
[INFO] API problems found.
[INFO] If you're using the semver-ignore extension, update your module's version to one compatible with the current changes (e.g. mvn package revapi:update-versions). If you want to explicitly ignore these changes or provide justifications for them, add the xml snippets to your Revapi configuration for the "revapi.differences" extension.
<item>
<code>java.method.removed</code>
<old>method void org.xwiki.diff.xml.XMLDiff::xxx()</old>
<justification>ADD YOUR EXPLANATION FOR THE NECESSITY OF THIS CHANGE</justification>
</item><item>
<code>java.method.removed</code>
<old>method void org.xwiki.diff.xml.XMLDiff::xxx()</old>
<justification>ADD YOUR EXPLANATION FOR THE NECESSITY OF THIS CHANGE</justification>
</item>
It seems to me that there’s a duplicated difference listed, no?
Also I’m not sure why but it seems my <revapi.differences> has not been taken into account. Note that we also have https://github.com/xwiki/xwiki-commons/blob/13bcf8d73d2cd6991e3cbcbc85eb4a3ab4673dc8/xwiki-commons-tools/xwiki-commons-tool-verification-resources/src/main/resources/revapi.json configured. Could it be that we cannot mix revapi.ignore with revapi.differences?
Thanks!
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 45 (22 by maintainers)
Commits related to this issue
- XCOMMONS-1995: Upgrade to Revapi Java 0.24.1 and Maven Revapi 0.14.2 * Had to add ignores because of some unclear problems, see https://github.com/revapi/revapi/issues/221#issuecomment-832626011 — committed to xwiki/xwiki-platform by vmassol 3 years ago
- [Misc] Restore the revapi items raised by a revapi bug See https://github .com/revapi/revapi/issues/221#issuecomment-832626011 — committed to xwiki/xwiki-platform by manuelleduc 3 years ago
- [Misc] Restore the revapi items raised by a revapi bug See https://github .com/revapi/revapi/issues/221#issuecomment-832626011 — committed to xwiki/xwiki-platform by manuelleduc 3 years ago
This is fixed in the main branch. I’m currently finishing up the new set of releases which should hopefully happen in the coming days (if everything goes well, I might get it ready this week, but it could take more time than that)…