Skip to content
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

Fix Inject-test such that it does NOT have a dependency on inject-events #708

Merged
merged 3 commits into from
Oct 24, 2024

Conversation

SentryMan
Copy link
Collaborator

@SentryMan SentryMan commented Oct 24, 2024

Currently, when inject-test is built, it has a META-INF/services/InjectExtension with an entry for io.avaje.inject.events.spi.ObserverManagerPlugin.

This means that it has hard dependency on inject-events. When events is not present this exception occurs:

java.util.ServiceConfigurationError: ServiceConfiguration io.avaje.inject.spi.InjectExtension: Provider io.avaje.inject.events.spi.ObserverManagerPlugin not found

this pr makes it so that entry is not added to inject-test

@SentryMan SentryMan added the bug Something isn't working label Oct 24, 2024
@SentryMan SentryMan self-assigned this Oct 24, 2024
@SentryMan SentryMan added this to the 10.5 milestone Oct 24, 2024
@rbygrave
Copy link
Contributor

It seems

We can be explicit here, that helps anyone who hits this issue and is trying to understand it.

Currently, when inject-test is built, it is has a META-INF/services/InjectExtension with an entry for io.avaje.inject.events.spi.ObserverManagerPlugin. This means that it has this implicit dependency on inject-events.

The fix for this issue is to NOT generate that META-INF/services/InjectExtension at all when inject-test is built.

@rbygrave rbygrave changed the title Fix Inject-Test Events Dependency Fix Inject-test such that it does NOT have a dependency on inject-events Oct 24, 2024
@SentryMan SentryMan enabled auto-merge October 24, 2024 21:07
@SentryMan SentryMan requested a review from rbygrave October 24, 2024 21:45
@SentryMan SentryMan merged commit 605a7bf into avaje:master Oct 24, 2024
7 checks passed
@SentryMan SentryMan deleted the fix-test branch October 24, 2024 23:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants