You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2021/03/05 00:01:42 UTC

[GitHub] [druid] himanshug edited a comment on issue #6942: Shade Guava manually

himanshug edited a comment on issue #6942:
URL: https://github.com/apache/druid/issues/6942#issuecomment-791029487


   I encountered an issue due to guava conflicts and discovered this. I did a prototype using shading that appears to achieve the same effect as copying all of guava source code as suggested in this proposal.
   
   I will likely send a PR soon, but here is what I did...
   
   1. create a new module, called "druid-shaded-guava" , that has only guava-0.16.1 as its dependency and shade it to create a new package `org.apache.druid.<guava packages>`
   2. Make all other druid modules depend upon above module and use `org.apache.druid.<guava packages>` classes. Remove their dependency on guava.
   3. Some Druid classes are left that declare dependency on guava-0.16.1 (and classes in guava directly) that use another library whose interface depends upon guava classes e.g. in druid-sql module, few calcite method calls require guava Multimap. This would be needed even if we were to not shade and copy all of guava source code.
   
   This allows us to use any versions of guava in `druid-shaded-guava` as we see fit without affecting anything else that is using real guava-0.x.y.jar packaged with druid.
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org