Uploaded image for project: 'XWiki Commons'
  1. XWiki Commons
  2. XCOMMONS-3934

Enforce indicating the target version of Revapi ignores

    XMLWordPrintable

Details

    • Unknown

    Description

      The Revapi ignores declared in our pom.xml files don't say which release they target. When releasing, the backward compatibility cleanup removes all of them, including the ones added on master after the branch of the release was created, which then have to be put back by hand (see XINFRA-292).

      As proposed in https://forum.xwiki.org/t/start-providing-version-in-revapi-ignores/18894 each Revapi difference should indicate the versions it targets, as a comma-separated list in a versions attachment of the difference or of its revapi.differences group, for example:

      <revapi.differences>
        <justification>...</justification>
        <attachments>
          <versions>19.0.0-rc-1,18.10.1</versions>
        </attachments>
        <differences>
          ...
        </differences>
      </revapi.differences>
      

      Revapi only adds attachments to the differences it matches and doesn't use them for matching, so this doesn't change which differences are ignored.

      This issue is about enforcing it in the build with a new Maven enforcer rule (revapiIgnoreVersionCheck), executed for all the modules inheriting xwiki-commons-pom. It fails when a Revapi difference:

      • has no versions attachment,
      • lists a value that is not a release version like 19.0.0 or 19.0.0-rc-1,
      • doesn't list any version greater than xwiki.compatibility.previous.version and lower than or equal to the project version, which means the ignore is stale or doesn't list the version of the current branch.

      The rule can be skipped with the xwiki.enforcer.revapi-ignore-version.skip property.

      Attachments

        Issue Links

          Activity

            People

              surli Simon Urli
              surli Simon Urli
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated: