Hi everyone,
so we have this problem for a while (EDIT: it is actually ticket Loading...) that currently the revapi ignores we put in our pom.xml doesn’t contain any version information. It’s a problem because when we’re performing a release we cleanup the revapi ignores, and some might have been added in master after the branch where to perform the release was created and our tools currently cannot guess easily which ignores to remove.
So my proposal is to start using the `attachments` elements of revapi schema: Differences Transformation :: Revapi . This element is basically a map that we use the way we want. I propose that we use an element `version` in it, containing the version the revapi ignore targets.
For example, in master before a 18.8.0 release I could have:
<revapi.differences>
<justification>The justification for breaking stuff</justification>
<criticality>highlight</criticality>
<attachments>
<version>18.8.0</version>
<version>18.4.7</version>
</attachments>
<differences>
<item>
<ignore>true</ignore>
<code>java.method.removed</code>
<old>method boolean org.xwiki.user.UserManager::myMethod()</old>
</item>
</differences>
</revapi.differences>
<revapi.differences>
<justification>The justification for breaking stuff</justification>
<criticality>highlight</criticality>
<attachments>
<version>18.9.0-rc-1</version>
<version>18.4.7</version>
<version>17.10.14</version>
</attachments>
<differences>
<item>
<ignore>true</ignore>
<code>java.method.removed</code>
<old>method boolean org.xwiki.user.UserManager::someOtherMethod()</old>
</item>
</differences>
</revapi.differences>
Then calling the compatibility cleanup on master after releasing 18.8.0 would only remove the first occurence. The algorithm would be to remove all occurences matching the version released basically.
The fact that we can put multiple version is only to help backporting without having to edit the ignores. We could also do it without that support if we want to avoid any mistake, and force people having to put the version manually.
Now I guess we should have a way to verify that any time we put a ignore we also have the version attached, I’m not sure at this point how it’s doable.
WDYT?