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

ISPN-7464 Make caffeine optional dependency for infinispan core #4856

Merged
merged 1 commit into from Feb 14, 2017

Conversation

wburns
Copy link
Member

@wburns wburns commented Feb 13, 2017

  • Make caffeine optional dependency for maven
  • Make caffeine internal dependency for as modules

https://issues.jboss.org/browse/ISPN-7464

@wburns
Copy link
Member Author

wburns commented Feb 13, 2017

Wait to make sure build all passes so far

@wburns wburns changed the title ISPN-7565 Make caffeine optional dependency for infinispan core ISPN-7464 Make caffeine optional dependency for infinispan core Feb 13, 2017
@wburns
Copy link
Member Author

wburns commented Feb 13, 2017

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>
Copy link
Member

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?

Copy link
Member Author

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

Copy link
Member Author

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.

Copy link
Member

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.

Copy link
Member

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"/>
Copy link
Member

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 :)

Copy link
Member Author

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 :)

Copy link
Member

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.

@@ -25,6 +25,11 @@
</dependency>

<dependency>
<groupId>com.github.ben-manes.caffeine</groupId>
<artifactId>caffeine</artifactId>
</dependency>
Copy link
Member

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?

Copy link
Member Author

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.

@wburns
Copy link
Member Author

wburns commented Feb 13, 2017

Updated to leave maven pom alone. Also made sure slot is defined in case of different versions of Caffeine are deployed together

@wburns
Copy link
Member Author

wburns commented Feb 13, 2017

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.

@wburns wburns force-pushed the ISPN-7565 branch 2 times, most recently from 1e33add to f39acdf Compare February 13, 2017 16:59
@wburns
Copy link
Member Author

wburns commented Feb 13, 2017

Seems the other imports are required, adding them back in.

* Make caffeine internal dependency for as modules
* Add osgi bundle for caffeine in commons
@Sanne
Copy link
Member

Sanne commented Feb 13, 2017

Last one looks good. I'll wait CI to have all results, as I only run a specific subset of tests.

@Sanne
Copy link
Member

Sanne commented Feb 13, 2017

"All checks have failed" ..
I'll leave this to someone who knows what to look for. +1 to merge!

@tristantarrant tristantarrant merged commit d6b6379 into infinispan:master Feb 14, 2017
@tristantarrant
Copy link
Member

Pushed to master

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants