[
https://issues.apache.org/jira/browse/BEAM-10961?focusedWorklogId=551631&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-551631
]
ASF GitHub Bot logged work on BEAM-10961:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 12/Feb/21 02:12
Start Date: 12/Feb/21 02:12
Worklog Time Spent: 10m
Work Description: shehzaadn-vd commented on a change in pull request
#13686:
URL: https://github.com/apache/beam/pull/13686#discussion_r574947189
##########
File path: sdks/java/extensions/ml/build.gradle
##########
@@ -21,25 +21,33 @@ import groovy.json.JsonOutput
*/
plugins { id 'org.apache.beam.module' }
-applyJavaNature(automaticModuleName: 'org.apache.beam.sdk.extensions.ml')
+applyJavaNature(
+ enableStrictDependencies: true,
+ automaticModuleName: 'org.apache.beam.sdk.extensions.ml'
+)
description = 'Apache Beam :: SDKs :: Java :: Extensions :: ML'
dependencies {
compile project(path: ":sdks:java:core", configuration: "shadow")
compile project(":sdks:java:expansion-service")
+ permitUnusedDeclared project(":sdks:java:expansion-service")
compile 'com.google.cloud:google-cloud-video-intelligence:1.2.0'
compile 'com.google.cloud:google-cloud-dlp:1.1.4'
compile 'com.google.cloud:google-cloud-language:1.99.4'
+ compile 'com.google.api.grpc:proto-google-cloud-dlp-v2:1.1.4'
+ compile 'com.google.api.grpc:proto-google-cloud-language-v1:1.81.4'
+ compile
'com.google.api.grpc:proto-google-cloud-video-intelligence-v1:1.2.0'
+ compile 'com.google.api.grpc:proto-google-cloud-vision-v1:1.81.3'
+ compile library.java.gax
+ compile library.java.protobuf_java
+ compile library.java.slf4j_api
provided library.java.junit
testCompile project(path: ':sdks:java:core', configuration: 'shadowTest')
compile 'com.google.cloud:google-cloud-vision:1.99.3'
+ permitUsedUndeclared "com.google.auto.value:auto-value-annotations:1.7"
Review comment:
@ibzib When i remove this line, i get the error:
```
Execution failed for task
':sdks:java:extensions:ml:analyzeClassesDependencies'.
> Dependency analysis found issues.
usedUndeclaredArtifacts:
- com.google.auto.value:auto-value-annotations:1.7@jar
```
To dig into this further, I ran ../../../../gradlew -q dependencies in
sdks/java/extensions/ml and captured the output here:
https://docs.google.com/document/d/1FNxea7Qbn8ckrphV25U7qh75a6z-PEl3iKgdJJwld5E/edit
It seems that via com.google.cloud:google-cloud-video-intelligence:1.2.0, we
are getting dependencies to com.google.auto.value:auto-value-annotations:1.7 -
which is not being resolved to 1.7.2, the version declared in
BeamModulePlugin.groovy. See the highlighted lines in the doc I linked to above.
Not sure if this could point to the the cause or it's just a red herring...?
----------------------------------------------------------------
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: 551631)
Time Spent: 115h 50m (was: 115h 40m)
> 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: 115h 50m
> 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)