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

JCLOUDS-1629: Upgrade to Guice 7.0.0 #197

Merged
merged 1 commit into from
Feb 26, 2024
Merged

JCLOUDS-1629: Upgrade to Guice 7.0.0 #197

merged 1 commit into from
Feb 26, 2024

Conversation

gaul
Copy link
Member

@gaul gaul commented Feb 24, 2024

This also changes from javax to jakarta annotations. @basil

This also changes from javax to jakarta annotations.
Copy link

@basil basil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I confirmed that Jenkins Artifact Manager on S3 plugin tests pass with this PR with both Guice 6 and Guice 7. However, I think it is too aggressive for JClouds to depend on Guice 7, as this will force all consumers of JClouds to upgrade to Guice 7 and therefore migrate from javax to jakarta annotations. I think it is preferable for JClouds to depend on Guice 6, which supports both javax and jakarta annotations, but to use jakarta annotations itself. That way, JClouds will be forward compatible with Guice 7 without forcing all consumers to migrate.

@@ -223,7 +223,7 @@
<!-- General dependency versions -->
<gson.version>2.10.1</gson.version>
<guava.version>32.0.0-jre</guava.version>
<guice.version>5.1.0</guice.version>
<guice.version>7.0.0</guice.version>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<guice.version>7.0.0</guice.version>
<guice.version>6.0.0</guice.version>

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are welcome to investigate the failures with 6.0.0 but I don't have the time or the interest:

 jclouds-compute: Compilation failure
[ERROR] /home/gaul/work/jclouds/compute/src/main/java/org/jclouds/compute/config/BaseComputeServiceContextModule.java:[9
2,71] no suitable method found for toProvider(java.lang.Class<org.jclouds.compute.config.GetLoginForProviderFromProperti
esAndStoreCredentialsOrReturnNull>)
[ERROR]     method com.google.inject.binder.LinkedBindingBuilder.toProvider(com.google.inject.Provider<? extends org.jcl
ouds.domain.LoginCredentials>) is not applicable
[ERROR]       (argument mismatch; java.lang.Class<org.jclouds.compute.config.GetLoginForProviderFromPropertiesAndStoreCr
edentialsOrReturnNull> cannot be converted to com.google.inject.Provider<? extends org.jclouds.domain.LoginCredentials>)
[ERROR]     method com.google.inject.binder.LinkedBindingBuilder.toProvider(javax.inject.Provider<? extends org.jclouds.
domain.LoginCredentials>) is not applicable
[ERROR]       (argument mismatch; java.lang.Class<org.jclouds.compute.config.GetLoginForProviderFromPropertiesAndStoreCredentialsOrReturnNull> cannot be converted to javax.inject.Provider<? extends org.jclouds.domain.LoginCredentials>)
[ERROR]     method com.google.inject.binder.LinkedBindingBuilder.toProvider(java.lang.Class<? extends javax.inject.Provider<? extends org.jclouds.domain.LoginCredentials>>) is not applicable
[ERROR]       (argument mismatch; java.lang.Class<org.jclouds.compute.config.GetLoginForProviderFromPropertiesAndStoreCredentialsOrReturnNull> cannot be converted to java.lang.Class<? extends javax.inject.Provider<? extends org.jclouds.domain.LoginCredentials>>)
[ERROR]     method com.google.inject.binder.LinkedBindingBuilder.toProvider(com.google.inject.TypeLiteral<? extends javax.inject.Provider<? extends org.jclouds.domain.LoginCredentials>>) is not applicable
[ERROR]       (argument mismatch; java.lang.Class<org.jclouds.compute.config.GetLoginForProviderFromPropertiesAndStoreCredentialsOrReturnNull> cannot be converted to com.google.inject.TypeLiteral<? extends javax.inject.Provider<? extends org.jclouds.domain.LoginCredentials>>)
[ERROR]     method com.google.inject.binder.LinkedBindingBuilder.toProvider(com.google.inject.Key<? extends javax.inject.Provider<? extends org.jclouds.domain.LoginCredentials>>) is not applicable
[ERROR]       (argument mismatch; java.lang.Class<org.jclouds.compute.config.GetLoginForProviderFromPropertiesAndStoreCredentialsOrReturnNull> cannot be converted to com.google.inject.Key<? extends javax.inject.Provider<? extends org.jclouds.domain.LoginCredentials>>)

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have the time or the interest

Neither do I.

@gaul gaul merged commit 107741f into apache:master Feb 26, 2024
1 check passed
@gaul gaul deleted the deps/guice branch February 26, 2024 06:36
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