Stop dependabot from offering guice 7 on the 1.9.x line - #2072
Merged
Merged
Conversation
Guice 6 moved to jakarta.inject. The Provider signature can be made to compile against both, but guice 7 also drops javax.inject annotation scanning, so AetherModule stops wiring. It is a migration, not a bump.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Guice 6 switched from
javax.injecttojakarta.inject, so #2070 fails to compile onmaven-resolver-1.9.x:I checked whether the two could be supported at once. Changing the nine
*NameMapperProviderclasses fromjavax.inject.Providertocom.google.inject.Providerdoes make the module compile against guice 5.1.0 and 7.0.0, and all 358maven-resolver-impltests pass on 5.1.0. But on 7.0.0AetherModuleTest.testModuleCompletenessthen fails:Guice 7 dropped
javax.injectannotation support outright, so the@Namedqualifiers on the@Providesparameters are invisible to it. Fixing theProvidersignature only moves the failure from compile time to injector creation. Taking guice 7 on this line means migrating the whole stack tojakarta.inject, which is not a maintenance-branch change.Worth recording: both 5.1.0 and 7.0.0 are Java 8 bytecode, so the Java 8 baseline is not what blocks this. Master is unaffected — it has no
AetherModule.Supersedes #2070.
This change was created with AI assistance.