Skip to content

Remove @Service from InjectExtension as not required #627

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

rbygrave
Copy link
Contributor

I think it is clearer if @service is not here as it isn't used or required.

I think it is clearer if @service is not here as it isn't
used or required.
@rbygrave rbygrave requested a review from SentryMan June 25, 2024 23:06
@rbygrave rbygrave self-assigned this Jun 25, 2024
@SentryMan
Copy link
Collaborator

SentryMan commented Jun 25, 2024

No it's needed, avaje spi only know how to avoid colliding correctly if @Service is there.

@SentryMan SentryMan closed this Jun 25, 2024
@SentryMan SentryMan reopened this Jun 25, 2024
@rbygrave
Copy link
Contributor Author

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?

@SentryMan
Copy link
Collaborator

I closed it as a mistake before we could talk it out

@rbygrave
Copy link
Contributor Author

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.

@rbygrave rbygrave closed this Jun 26, 2024
@rbygrave rbygrave deleted the feature/inject-module-no-spi-dependency branch June 26, 2024 02:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants