Skip to content

BuilderProcessor claims all round annotations, starving other annotation processors on the shared path #331

Description

@igel-devin-ai

Bug

BuilderProcessor declares @SupportedAnnotationTypes("*") — required so user-defined @SimpleBuilder.Template meta-annotations (arbitrary names) still reach the processor — and ends process() with return true.

return true claims all annotations in the round over the wildcard supported set, so every other annotation processor sharing the processor path is starved: e.g. when simple-builders-processor runs before mapstruct-processor, MapStruct never sees @Mapper and silently generates no mapper implementations. The same applies to any other processor (AutoService, Immutables, Lombok-as-processor, custom ones) ordered after it.

Fix

Always return false from process() — simple-builders never needs to claim annotations (other processors must still see them). Claiming a subset is not expressible: the boolean applies to the whole supported set, and * must stay for template discovery.

Found while working on the MapStruct SPI integration (#312).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions