revAPI breaking for an xwiki depedency evolution (10.11)

Hello fellow XWikiers,

I am developping an app for XWiki 10.11 and I encounter an annoying issue: My app is moving from 9.x to 10.x and I have already made some release candidates. Now, however, I get a revapi error because :

[INFO] java.class.nonFinalClassInheritsFromNewClass: class org.xwiki.model.reference.DocumentReference: Non-final class now inherits from ‘org.xwiki.model.reference.AbstractLocalizedEntityReference’. [org.xwiki.platform:xwiki-platform-model:jar:10.11]

This definitely seems like. change at XWiki dependencies side… And I have tried to, thus, avoid the revapi check of the XWiki dependencies.

The pom.xml of xwiki-platform-master sounds ike the best idea. But tthat failed. I also tried changing failCriticality but, again, the build keeps breaking unless I use -Drevapi.checkDependencies=false in the command-line.

What is the proper way to ignore revapi for which we trust there’s a team already checking?

thanks in advance.

Paul

Dependency check is already disabled. The reason why revapi complains in your case is that you expose DocumentReference in one of your API thus making it part of it.

I would just add revapi ignores for this breakage (you should get a proposed configuration in the revapi error message).

See OIDC-76: Upgrade to oauth2-oidc-sdk 6.23 and nimbus-jose-jwt 8.6 · xwiki-contrib/oidc@9888874 · GitHub for an example (same situation).

Thanks Thomas,

So that’s interesting. From the error message, you’d believe you can formulate some XML for the configuration and I did so in this commit but changing to JSON as OIDC-76 shows did work, see here.

thanks. Solved!

Paul

Hello Thomas,
Actually, considering that the DocumentReference reference is only in the internal package, this should not fire, or?
paul

@polx we looked at method return types but can you also check if you have a public API (not inside internal package) that has DocumentReference as parameter? If there’s no API method that receives as input or that returns DocumentReference then I find the revapi error strange.

I did try it and can confirm that DocumentReference only appears within the internal package. I have added the necessary escapes… but clearly revapi is doing something incorrect.

paul

identity-oauth % git remote -v
origin	git@github.com:xwikisas/identity-oauth.git (fetch)
origin	git@github.com:xwikisas/identity-oauth.git (push)
identity-oauth % git status
On branch master
Your branch is up to date with 'origin/master'.

nothing to commit, working tree clean
identity-oauth % grep -r DocumentReference `find . -name "*.java" | grep -v target ` | wc -l
      19
identity-oauth % grep -r DocumentReference `find . -name "*.java" | grep -v target | grep -v intern` | wc -l
       0