There are 5 updates.
 
 
XWiki Commons / cid:jira-generated-image-avatar-766f2f6b-b7b2-4590-a77f-8bb54a0b831b XCOMMONS-3728 Open

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

 
View issue   ·   Add comment
 

5 updates

 
cid:jira-generated-image-avatar-d3d2039b-c3ee-4512-bf06-6ded92688664 Changes by Vincent Massol on 23/Jul/26 22:47
 
Version: 17.10.10
Description: h2. 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*:

{code}
advice ... has not been applied [Xlint:adviceDidNotMatch]
{code}

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.

h2. 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}}.


Assignee: Vincent Massol
Component: Stability
Component: Development Issues only