[
https://issues.apache.org/jira/browse/BEAM-10961?focusedWorklogId=552065&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-552065
]
ASF GitHub Bot logged work on BEAM-10961:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 13/Feb/21 00:01
Start Date: 13/Feb/21 00:01
Worklog Time Spent: 10m
Work Description: ibzib commented on a change in pull request #13830:
URL: https://github.com/apache/beam/pull/13830#discussion_r575579911
##########
File path: sdks/java/extensions/sql/datacatalog/build.gradle
##########
@@ -20,13 +20,25 @@ import groovy.json.JsonOutput
plugins { id 'org.apache.beam.module' }
-applyJavaNature(automaticModuleName:
'org.apache.beam.sdk.extensions.sql.datacatalog')
+applyJavaNature(
+ enableStrictDependencies: true,
+ automaticModuleName: 'org.apache.beam.sdk.extensions.sql.datacatalog')
dependencies {
compile enforcedPlatform(library.java.google_cloud_platform_libraries_bom)
compile(library.java.google_cloud_datacatalog_v1beta1) {
exclude group: 'io.grpc', module: 'grpc-core' // Use Beam's version
}
+ compile library.java.gax
+ compile library.java.google_auth_library_credentials
+ compile library.java.proto_google_cloud_datacatalog_v1beta1
+ compile library.java.protobuf_java
+ permitUnusedDeclared library.java.protobuf_java
+ compile library.java.slf4j_api
+ compile library.java.vendored_guava_26_0_jre
+ compile project(path: ":sdks:java:core", configuration: "shadow")
+ compile "org.threeten:threetenbp:1.4.5"
Review comment:
Adding both `compile` and `permitUnusedDeclared` for the same dependency
doesn't make sense.
##########
File path: sdks/java/extensions/sql/build.gradle
##########
@@ -73,7 +75,12 @@ dependencies {
compile "com.alibaba:fastjson:1.2.69"
compile "org.codehaus.janino:janino:3.0.11"
compile "org.codehaus.janino:commons-compiler:3.0.11"
- provided "org.checkerframework:checker-qual:3.4.1"
+ compile library.java.jackson_core
+ compile library.java.mongo_java_driver
+ compile library.java.vendored_guava_26_0_jre
+ compile library.java.slf4j_api
+ compile library.java.joda_time
+ compile library.java.vendored_guava_26_0_jre
Review comment:
You added `library.java.vendored_guava_26_0_jre` twice here.
##########
File path: sdks/java/extensions/sql/jdbc/build.gradle
##########
@@ -32,18 +33,16 @@ configurations {
dependencies {
compile project(":sdks:java:extensions:sql")
- compile "jline:jline:2.14.6"
compile "sqlline:sqlline:1.4.0"
- compile library.java.slf4j_jdk14
Review comment:
On second thought, I think this one's safe to remove entirely.
##########
File path: sdks/java/extensions/sql/jdbc/build.gradle
##########
@@ -33,17 +34,19 @@ configurations {
dependencies {
compile project(":sdks:java:extensions:sql")
compile "jline:jline:2.14.6"
+ permitUnusedDeclared "jline:jline:2.14.6" // BEAM-11761
compile "sqlline:sqlline:1.4.0"
- compile library.java.slf4j_jdk14
+ compile library.java.vendored_guava_26_0_jre
+ runtimeOnly library.java.slf4j_jdk14
+ runtimeOnly "jline:jline:2.14.6"
Review comment:
Let's go with `permitUnusedDeclared` instead of `runtimeOnly` for this
one.
##########
File path: sdks/java/extensions/sql/zetasql/build.gradle
##########
@@ -31,23 +32,29 @@ def zetasql_version = "2020.10.1"
dependencies {
compile enforcedPlatform(library.java.google_cloud_platform_libraries_bom)
- compile project(":sdks:java:core")
+ compile project(path: ":sdks:java:core", configuration: "shadow")
compile project(":sdks:java:extensions:sql")
+ compile project(":sdks:java:extensions:sql:udf")
compile library.java.vendored_calcite_1_20_0
compile library.java.guava
compile library.java.grpc_api
+ compile library.java.joda_time
compile library.java.protobuf_java
compile library.java.protobuf_java_util
- compile "com.google.api.grpc:proto-google-common-protos:1.12.0" //
Interfaces with ZetaSQL use this
- compile "com.google.api.grpc:grpc-google-common-protos:1.12.0" // Interfaces
with ZetaSQL use this
- compile "com.google.zetasql:zetasql-jni-channel:$zetasql_version"
+ permitUnusedDeclared library.java.protobuf_java_util
+ compile library.java.slf4j_api
+ compile library.java.vendored_guava_26_0_jre
+ compile library.java.proto_google_common_protos // Interfaces with ZetaSQL
use this
+ permitUnusedDeclared "com.google.api.grpc:proto-google-common-protos:2.0.1"
// BEAM-11761
Review comment:
This was added twice.
Also, if you're using the `library.java` version in the `compile` statement,
you should also use it in the corresponding `permitUnusedDeclared`.
##########
File path: sdks/java/extensions/sql/zetasql/build.gradle
##########
@@ -57,6 +64,6 @@ dependencies {
test {
dependsOn ":sdks:java:extensions:sql:emptyJar"
// Pass jars used by Java UDF tests via system properties.
- systemProperty "beam.sql.udf.test.jar_path",
project(":sdks:java:extensions:sql:udf-test-provider").jarPath
- systemProperty "beam.sql.udf.test.empty_jar_path",
project(":sdks:java:extensions:sql").emptyJar.archivePath
+// systemProperty "beam.sql.udf.test.jar_path",
project(":sdks:java:extensions:sql:udf-test-provider").jarPath
Review comment:
Uncomment these.
##########
File path: sdks/java/extensions/sql/datacatalog/build.gradle
##########
@@ -20,13 +20,25 @@ import groovy.json.JsonOutput
plugins { id 'org.apache.beam.module' }
-applyJavaNature(automaticModuleName:
'org.apache.beam.sdk.extensions.sql.datacatalog')
+applyJavaNature(
+ enableStrictDependencies: true,
+ automaticModuleName: 'org.apache.beam.sdk.extensions.sql.datacatalog')
dependencies {
compile enforcedPlatform(library.java.google_cloud_platform_libraries_bom)
compile(library.java.google_cloud_datacatalog_v1beta1) {
exclude group: 'io.grpc', module: 'grpc-core' // Use Beam's version
}
+ compile library.java.gax
+ compile library.java.google_auth_library_credentials
+ compile library.java.proto_google_cloud_datacatalog_v1beta1
+ compile library.java.protobuf_java
+ permitUnusedDeclared library.java.protobuf_java
Review comment:
Adding both `compile` and `permitUnusedDeclared` for the same dependency
doesn't make sense.
----------------------------------------------------------------
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:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 552065)
Time Spent: 118h 40m (was: 118.5h)
> Enable strict dependency analysis on all Java modules
> ------------------------------------------------------
>
> Key: BEAM-10961
> URL: https://issues.apache.org/jira/browse/BEAM-10961
> Project: Beam
> Issue Type: Improvement
> Components: java-fn-execution
> Reporter: Shehzaad Nakhoda
> Assignee: Shehzaad Nakhoda
> Priority: P2
> Time Spent: 118h 40m
> Remaining Estimate: 0h
>
> This is an IWYU analysis. If the module is using its transitive deps without
> depending on them, or if it has direct dependencies it doesn't use, the build
> fails. The work involves adding dependencies or adding exclusion rules
> (example:
> https://github.com/wfhartford/gradle-dependency-analyze#configurations). Even
> if they just add exclusions across the board, it will be a big win because it
> will prevent new violations.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)