deephaven / deephaven-core

Deephaven Community Core
Other
254 stars 80 forks source link

Remove explicit dependency on guava #2371

Open devinrsmith opened 2 years ago

devinrsmith commented 2 years ago

We have a few dependencies on guava that could likely be removed.

Discovered during https://github.com/deephaven/deephaven-core/pull/2366

io.deephaven.engine.table.impl.BaseTable:
  com.google.common.collect.BiMap
  com.google.common.collect.HashBiMap

io.deephaven.engine.table.ModifiedColumnSet:
  com.google.common.collect.Iterators#elementsEqual

io.deephaven.extensions.barrage.util.BarrageProtoUtil:
  com.google.common.io.LittleEndianDataInputStream
  com.google.common.io.LittleEndianDataOutputStream

io.grpc.servlet.jakarta.ServletAdapter:
  com.google.common.io.BaseEncoding

io.grpc.servlet.jakarta.ServletServerBuilder:
  com.google.common.util.concurrent.ListenableFuture
  com.google.common.base.Preconditions

io.grpc.servlet.web.websocket.WebsocketStreamImpl:
  com.google.common.util.concurrent.MoreExecutors

dagger generated:
  com.google.common.collect.ImmutableMap
  com.google.common.collect.ImmutableSet

io.deephaven.server.table.ops.JoinTablesGrpcImpl:
  com.google.common.collect.Lists

Some of these would be trivial to remove, and others might take a tiny bit of DH side logic to replicate.

devinrsmith commented 2 years ago

We may still need a way to preferentially choose the -jre flavor, both flight-core and grpc-api depend on guava. flight-core depends on jre, grpc-api depends on -android.

devinrsmith commented 2 years ago

Note: even if we explicitly choose a newer version of the -jre version (in Classpaths), it seems like gradle resolution chooses the more conservative '-android' flavor. https://github.com/google/guava/wiki/ReleasePolicy#flavors

devinrsmith commented 2 years ago

https://github.com/google/guava/pull/3683

devinrsmith commented 2 years ago

https://github.com/jjohannes/missing-metadata-guava