[ 
https://issues.apache.org/jira/browse/BEAM-8747?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16978584#comment-16978584
 ] 

Tomo Suzuki edited comment on BEAM-8747 at 11/20/19 4:45 PM:
-------------------------------------------------------------

h1. Beam SQL JDBC driver (sdks/java/extensions/sql/jdbc)

Nebula.lint says it's unused.

{noformat}
warning   unused-dependency                  this dependency is unused and can 
be removed
sdks/java/extensions/sql/jdbc/build.gradle:42
compile library.java.guava
{noformat}

h1. The Dataflow Java worker does depend on Guava at compile scope but has 
incorrect dependencies (and it probably shouldn't)

I see CounterUpdateAggregators and TimerReceiver depends on com.google.common.

h1. KinesisIO does depend on Guava at compile scope but has incorrect 
dependencies (Kinesis libs have Guava on API surface so it is OK here, but 
should be correctly declared)

sdks/java/io/kinesis does not declare guava dependency, but KinesisIO.java uses 
ListenableFuture.





was (Author: suztomo):
h1. Beam SQL JDBC driver (sdks/java/extensions/sql/jdbc)

Nebula.lint says it's unused.

{noformat}
warning   unused-dependency                  this dependency is unused and can 
be removed
sdks/java/extensions/sql/jdbc/build.gradle:42
compile library.java.guava
{noformat}

h1. The Dataflow Java worker does depend on Guava at compile scope but has 
incorrect dependencies (and it probably shouldn't)

I see CounterUpdateAggregators and TimerReceiver depends on com.google.common.






> Remove Unused non-vendored Guava compile dependencies
> -----------------------------------------------------
>
>                 Key: BEAM-8747
>                 URL: https://issues.apache.org/jira/browse/BEAM-8747
>             Project: Beam
>          Issue Type: Bug
>          Components: build-system
>            Reporter: Tomo Suzuki
>            Assignee: Tomo Suzuki
>            Priority: Major
>         Attachments: Guava used as fully-qualified class name.png
>
>
> [~kenn] says:
> BeamModulePlugin just contains lists of versions to ease coordination across 
> Beam modules, but mostly does not create dependencies. Most of Beam's modules 
> only depend on a few things there. For example Guava is not a core 
> dependency, but here is where it is actually depended upon:
> $ find . -name build.gradle | xargs grep library.java.guava
> ./sdks/java/core/build.gradle:  shadowTest library.java.guava_testlib
> ./sdks/java/extensions/sql/jdbc/build.gradle:  compile library.java.guava
> ./sdks/java/io/google-cloud-platform/build.gradle:  compile library.java.guava
> ./sdks/java/io/kinesis/build.gradle:  testCompile library.java.guava_testlib
> These results appear to be misleading. Grepping for 'import 
> com.google.common', I see this as the actual state of things:
>  - GCP connector does not appear to actually depend on Guava in compile scope
>  - The Beam SQL JDBC driver does not appear to actually depend on Guava in 
> compile scope
>  - The Dataflow Java worker does depend on Guava at compile scope but has 
> incorrect dependencies (and it probably shouldn't)
>  - KinesisIO does depend on Guava at compile scope but has incorrect 
> dependencies (Kinesis libs have Guava on API surface so it is OK here, but 
> should be correctly declared)
>  - ZetaSQL translator does depend on Guava at compile scope but has incorrect 
> dependencies (ZetaSQL has it on API surface so it is OK here, but should be 
> correctly declared)
> We used to have an analysis that prevented this class of error.
> Once the errors are fixed, the guava_version is simply a version that we have 
> discovered that seems to work for both Kinesis and ZetaSQL, libraries we do 
> not control. Kinesis producer is built against 18.0. Kinesis client against 
> 26.0-jre. ZetaSQL against 26.0-android.
> (or maybe I messed up in my analysis)
> Kenn



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to