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
ISPN-7464 Make caffeine optional dependency for infinispan core #4856
Conversation
Wait to make sure build all passes so far |
Updated commit to point to correct JIRA. Branch unfortunately is still old, left alone to keep PR as is. |
commons/pom.xml
Outdated
@@ -17,6 +17,7 @@ | |||
<dependency> | |||
<groupId>com.github.ben-manes.caffeine</groupId> | |||
<artifactId>caffeine</artifactId> | |||
<optional>true</optional> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you clarify this. Would infinispan-commons
work fine when caffeine is missing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would work, except for the method CollectionFactory#makeBoundedConcurrentMap
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Although I am not sure if the CollectionFactory class itself would work since it has an import for Caffeine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In other words: it would be great if infinispan-commons would avoid having this dependency, then we'd have reassurances from the compiler.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ic. Are there many use cases to have infinispan-commons
, yet no have caffeine then?
If all (or most) uses will need this, one might as well keep it as a non-optional dependency.
@@ -6,7 +6,7 @@ | |||
<dependencies> | |||
<module name="javax.api"/> | |||
<module name="javax.transaction.api"/> | |||
<module name="com.github.ben-manes.caffeine" slot="${slot}" export="true"/> | |||
<module name="com.github.ben-manes.caffeine"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks, that is the line I was wondering about when I asked on IRC if that was necessary. Apparently not :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah you can chalk that up to me not knowing what to do with wildfly-modules :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as discussed on IRC: the slot qualifier needs to stay.
client/hotrod-client/pom.xml
Outdated
@@ -25,6 +25,11 @@ | |||
</dependency> | |||
|
|||
<dependency> | |||
<groupId>com.github.ben-manes.caffeine</groupId> | |||
<artifactId>caffeine</artifactId> | |||
</dependency> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why does the client need caffeine?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Near cache in the client is a bounded concurrent map.
10bcea5
to
0ecbd4f
Compare
Updated to leave maven pom alone. Also made sure slot is defined in case of different versions of Caffeine are deployed together |
I will also remove the modules from core and client to see if they pass tests without. Before I had to export them, maybe they are working without now. |
1e33add
to
f39acdf
Compare
Seems the other imports are required, adding them back in. |
* Make caffeine internal dependency for as modules * Add osgi bundle for caffeine in commons
Last one looks good. I'll wait CI to have all results, as I only run a specific subset of tests. |
"All checks have failed" .. |
Pushed to master |
https://issues.jboss.org/browse/ISPN-7464