-
Notifications
You must be signed in to change notification settings - Fork 2
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
Write to different services path #212
Conversation
Hmmm, it seems to me with this PR the validation-generator AP using generated-services will then clash with the avaje-spi-service AP? I'm missing something ... |
it's illegal to write to the same file twice, but reading has no such problem |
so what's happening here is that validator is writing to |
So the avaje-validation-generator has a hard dependency on avaje-spi-core (annotation processor). So it has gone from letting avaje-spi-core validate the module-info to being a hard dependency required by the avaje-validation-generator. |
What we get avaje-spi-core to do is merge multiple implementations of a SPI interface in the appropriate META-INF/service file. It does look like the implication is that IF an application desires explicit control over the META-INF/service file then they need to disable the That is, as a consequence of adopting the pattern of common spi interfaces is that we now are MUCH more likely to need content merging those META-INF/services files (in fact maybe this is now really common). IF people are willing to use avaje-spi-service then it can do that merging for us - effectively merging in the contents from META-INF/generated-services files to output into META-INF/services the merged list of services. IF the use of avaje-spi-service |
You misunderstand, since user defined services are in a different directory ( EDIT: wait a second... |
You got me there though, I can change this pr to only take effect when avaje spi is detected |
Ok, so I'm still correct, there is still no contention because resources are copied from src/main/resources to target before compilation. (the copy doesn't count as a write) The only thing now is that spi seems to have lost the ability to detect and validate manually registered spi interfaces, so gotta fix that |
relies on avaje/avaje-spi-service#25 to register META-INF services