Skip to content

JENA-901 Use Guava for cache, shadowed in jena-core#48

Closed
stain wants to merge 1 commit into
apache:masterfrom
stain:JENA-901-guava-only-jenacore
Closed

JENA-901 Use Guava for cache, shadowed in jena-core#48
stain wants to merge 1 commit into
apache:masterfrom
stain:JENA-901-guava-only-jenacore

Conversation

@stain
Copy link
Copy Markdown
Member

@stain stain commented Mar 21, 2015

In comparison with #47, this shadows Guava directly in jena-core without introducing jena-shadowed-ext.

This is thus acceptable as a patch-version update - but at the downside that jena-core have to do

import com.google.common.cache.Cache

directly - while all other Jena modules would have to use

import org.apache.jena.impl.ext.com.google.common.cache.Cache

as it is shadowed with the JAR. This will cause problems in the other modules in an Eclipse-like environment, as the IDE will re-expose com.google version if jena-core is open - and they would then seemingly not be able to find the oaj.impl.ext.* version as that only exist in the Maven-built JAR.

In this scenario, it would probably be cleaner for the other modules to also shadow guava - in addition to the space-wastage, this probably becomes a bit awkward - it also means you can't pass any Guava structures between Jena modules.

One advantage however is that if they all shadow individually, then they can shadow with the minimizeJar option to only get the few Guava classes used (e.g. in jena-core only the Cache).

this avoids adding a new module, so this is acceptable
as a patch-version update.
@stain
Copy link
Copy Markdown
Member Author

stain commented Mar 23, 2015

I am closing this as the feedback on guava shadowed in jena-core was negative (and I agree!)

@stain stain closed this Mar 23, 2015
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.

1 participant