question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Would it be possible to shade guava?

See original GitHub issue

Please answer these questions before submitting your issue.

What version of gRPC are you using?

1.0.3 and 1.1.1

What JVM are you using (java -version)?

java version “1.8.0_92” Java™ SE Runtime Environment (build 1.8.0_92-b14) Java HotSpot™ 64-Bit Server VM (build 25.92-b14, mixed mode)

What did you do?

GRPC 1.1+ uses Guava 20.0. We have a very large codebase that uses both internal and external libraries that depend on older version of guava. These libraries are not compatible with Guava 20.0. As a result we are unable to upgrade to GRPC 1.1.+. From what I can tell the only Guava class exposed by GRPC is ListenableFutures, via ClientCalls in grpc-stub. Would it be possible to shade all other uses of Guava in GRPC.

There would still be an issue with the GRPC code generator that does expose Guava’s ListenableFuture. For that use case would it be possible to make generating those stubs optional and perhaps even add an option to generate a CompletableFuture stub?

What did you expect to see?

Newer versions of GRPC to not break other libraries depending on older version of Guava.

What did you see instead?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:5
  • Comments:11 (10 by maintainers)

github_iconTop GitHub Comments

2reactions
elandaucommented, Feb 16, 2017

@ejona86 Sticking with Guava 19 sounds fine. Do you plan to upgrade to Guava 22 with its compatibility layer once it’s release?

What about the option to no longer expose Guava in the stubs and generated code? Would you consider having a generator option to disable the ListenableFuture stubs and another option to generate CompletableFuture stubs? I’d be more than happy to submit a PR for that but want to make sure you think this approach makes sense.

2reactions
GEverdingcommented, Feb 4, 2017

Case and point grpc 1.1.x Isn’t compatible with datastax cassandra driver 3.x.

Read more comments on GitHub >

github_iconTop Results From Across the Web

java - Shading a transitive dependency (guava) with Maven ...
I am trying to create a library that will be reused by applications that run on a WebServer equivalent. The library will use...
Read more >
[HADOOP-14284] Shade Guava everywhere - ASF JIRA
We should shade Guava everywhere to proactively avoid breaking downstreams. This isn't a requirement for all dependency upgrades, ...
Read more >
To shade or not to shade | Elastic Blog
We will never be able to remove all dependencies, but we're making a start by removing Guava in favour of native Java 8...
Read more >
Shade with SBT - ManuZhang's Blog
In this post, I'll share our experience working on the shaded libraries / dependencies of Gearpump. What is / Why shade ? Gearpump...
Read more >
Shading Google Guava in Dropwizard
The end result is that I have four Guava versions on classpath ... As I don't have experience with the maven-shade-plugin, is it...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found