This issue has been created
There is 1 update.
 
 
XWiki Commons / cid:jira-generated-image-avatar-cea9789f-e981-4316-bdb5-32bc9d284a27 XCOMMONS-3728 Open

Fail the build when a backward-compatibility AspectJ advice is not weaved

 
View issue   ·   Add comment
 

Issue created

 
cid:jira-generated-image-avatar-d00338d6-2775-4cd2-a0d7-aba339da8e87 Vincent Massol created this issue on 23/Jul/26 22:13
 
Summary: Fail the build when a backward-compatibility AspectJ advice is not weaved
Issue Type: cid:jira-generated-image-avatar-cea9789f-e981-4316-bdb5-32bc9d284a27 Improvement
Assignee: Unassigned
Components: Stability
Created: 23/Jul/26 22:13
Priority: cid:jira-generated-image-static-major-56cf39ba-dbb2-4ef0-919b-2da23a66dfc4 Major
Reporter: Vincent Massol
Description:

Problem

Backward-compatibility in the *-legacy-* modules relies on AspectJ aspects being weaved into the modules they wrap. When an advice stops matching (because the API it protects was moved, renamed or removed), AspectJ only emits a warning:

advice ... has not been applied [Xlint:adviceDidNotMatch]

Warnings are easy to miss in a full build, so a broken backward-compatibility layer can ship unnoticed. XRENDERING-809 is a concrete case where a legacy advice silently did nothing for several releases.

Proposal

In the shared aspectj-maven-plugin pluginManagement configuration of the xwiki-commons parent pom, promote AspectJ lint messages to errors (<Xlint>error</Xlint>) so that any weaving problem fails the build instead of printing an easy-to-miss warning.

This only affects modules that actually run aspectj:compile (i.e. the *-legacy-* aspect modules across Commons, Rendering and Platform). For those modules an unmatched advice — and related lints such as typeNotExposedToWeaver, cantFindType and invalidAbsoluteTypeName — always signals a real backward-compatibility regression, so failing the build is the desired behaviour.

A module that ever needs to downgrade a specific lint can still do so locally via the plugin's Xlintfile parameter, which overrides Xlint.

 
 

1 update

 
cid:jira-generated-image-avatar-d00338d6-2775-4cd2-a0d7-aba339da8e87 Changes by Vincent Massol on 23/Jul/26 22:14
 
Fix Version: 18.7.0-rc-1