IntentionallyWrongDslMarkerTargetsForBackwardsCompatibility

Acknowledges that the annotated DSL marker deliberately keeps a wrong target set - no-op targets in its @Target, or no explicit @Target at all - because fixing it would break existing users.

The library-api-watchdog compiler plugin warns about DSL marker targets on which the marker has no effect. For an already-published marker the fix is breaking: removing a target rejects user code that applies the marker there, and declaring an explicit @Target forbids the previously allowed default targets. Apply this annotation to suppress the warnings for such legacy markers.

Wrong marker targets are never good API design, so unlike the other exemptions this one bakes its only accepted reason - backwards compatibility - into its name and carries no ExemptionReason. New DSL markers must declare effective targets instead.

See the check documentation for rationale and examples: no-op targets, missing explicit targets.

Parameters

description

optional free-form context for the exemption.

Properties

Link copied to clipboard