Closed rbygrave closed 2 months ago
No it's needed, avaje spi only know how to avoid colliding correctly if @Service
is there.
avaje spi only know how to avoid colliding
It avoids collision via the hard coded exclusions, so in that way it isn't needed. I'm thinking you agree as you reopened this PR?
I closed it as a mistake before we could talk it out
Ok, we can close this. Copying description from jsonb here:
This is required in order to support the use of avaje-spi-serivce @ServiceProvider
with
other custom InjectExtension service implementations.
Custom InjectExtension implementations can be registered explicitly with META-INF/services
entries OR we can use @ServiceProvider
for that to automatically happen.
The reason the @Service
is required on the InjectExtension interface is so that avaje-spi-service
actually ignores it correctly (and thus allowing avaje-jsonb-generator to process it with the
generated InjectExtension implementations). Without this avaje-spi-service incorrectly
assumes that the top level interface is the service interface and then doesn't ignore it and instead
generates an incorrect file in target/classes/META-INF/services.
I think it is clearer if @Service is not here as it isn't used or required.