You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Vladimir Sitnikov (Jira)" <ji...@apache.org> on 2020/09/12 11:52:00 UTC

[jira] [Commented] (CALCITE-4252) Add build validation for improper dependency declaration

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

Vladimir Sitnikov commented on CALCITE-4252:
--------------------------------------------

Just in case, here's the reference for api vs implementation: https://docs.gradle.org/current/userguide/java_library_plugin.html#sec:java_library_recognizing_dependencies

> Add build validation for improper dependency declaration
> --------------------------------------------------------
>
>                 Key: CALCITE-4252
>                 URL: https://issues.apache.org/jira/browse/CALCITE-4252
>             Project: Calcite
>          Issue Type: Improvement
>    Affects Versions: 1.25.0
>            Reporter: Vladimir Sitnikov
>            Priority: Major
>
> We want to avoid declaring unused dependencies, and we want to declare all the used dependencies (we do not want to rely on transitive dependencies).
> The relevant configuration was present in Maven: CALCITE-658
> Now it's time to re-add it thanks to https://github.com/autonomousapps/dependency-analysis-android-gradle-plugin
> Note: even though there'es Android in the name, the plugin is not tied to Android.
> Sample output:
> {noformat}
> > Task :core:aggregateAdvice
> Transitively used dependencies that should be declared directly as indicated:
> - implementation("log4j:log4j:1.2.17")
> - implementation("org.apache.commons:commons-pool2:2.6.1")
> Existing dependencies which should be modified to be as indicated:
> - api("org.slf4j:slf4j-api:1.7.25") (was implementation)
> - implementation("org.apiguardian:apiguardian-api:1.1.0") (was api)
> - api("com.google.guava:guava:19.0") (was implementation)
> - implementation("com.fasterxml.jackson.core:jackson-annotations:2.10.0") (was api)
> - testImplementation("org.apache.commons:commons-dbcp2:2.6.0") (was implementation)
> - api("com.esri.geometry:esri-geometry-api:2.2.0") (was implementation)
> > Task :linq4j:aggregateAdvice
> Existing dependencies which should be modified to be as indicated:
> - implementation("org.apiguardian:apiguardian-api:1.1.0") (was api)
> > Task :example:function:aggregateAdvice
> Unused dependencies which should be removed:
> - implementation("com.google.guava:guava:19.0")
> > Task :file:aggregateAdvice
> Transitively used dependencies that should be declared directly as indicated:
> - implementation("com.fasterxml.jackson.core:jackson-databind:2.10.0")
> - implementation("com.fasterxml.jackson.core:jackson-core:2.10.0")
> > Task :babel:aggregateAdvice
> Existing dependencies which should be modified to be as indicated:
> - api("org.apache.calcite.avatica:avatica-core:1.17.0") (was implementation)
> Plugins that should be removed:
> - org.jetbrains.kotlin.jvm, because this project has both java-library and org.jetbrains.kotlin.jvm applied, which is redundant. You can remove org.jetbrains.kotlin.jvm
> > Task :kafka:aggregateAdvice
> Existing dependencies which should be modified to be as indicated:
> - api("org.apache.kafka:kafka-clients:2.1.1") (was implementation)
> > Task :cassandra:aggregateAdvice
> Existing dependencies which should be modified to be as indicated:
> - api("com.google.guava:guava:19.0") (was implementation)
> - api("org.slf4j:slf4j-api:1.7.25") (was implementation)
> - api("com.datastax.cassandra:cassandra-driver-core:3.6.0") (was implementation)
> > Task :druid:aggregateAdvice
> Existing dependencies which should be modified to be as indicated:
> - api("com.fasterxml.jackson.core:jackson-core:2.10.0") (was implementation)
> - api("joda-time:joda-time:2.8.1") (was implementation)
> - api("org.slf4j:slf4j-api:1.7.25") (was implementation)
> - api("org.apache.calcite.avatica:avatica-core:1.17.0") (was implementation)
> > Task :elasticsearch:aggregateAdvice
> Transitively used dependencies that should be declared directly as indicated:
> - implementation("org.apache.httpcomponents:httpasyncclient:4.1.4")
> Existing dependencies which should be modified to be as indicated:
> - api("com.fasterxml.jackson.core:jackson-databind:2.10.0") (was implementation)
> - implementation("com.fasterxml.jackson.core:jackson-annotations:2.10.0") (was api)
> - api("org.elasticsearch.client:elasticsearch-rest-client:7.0.1") (was implementation)
> > Task :geode:aggregateAdvice
> Transitively used dependencies that should be declared directly as indicated:
> - implementation("com.fasterxml.jackson.core:jackson-databind:2.10.0")
> Existing dependencies which should be modified to be as indicated:
> - api("org.apache.geode:geode-core:1.10.0") (was implementation)
> - api("org.slf4j:slf4j-api:1.7.25") (was implementation)
> > Task :mongodb:aggregateAdvice
> Existing dependencies which should be modified to be as indicated:
> - api("com.google.guava:guava:19.0") (was implementation)
> - api("org.slf4j:slf4j-api:1.7.25") (was implementation)
> > Task :redis:aggregateAdvice
> Unused dependencies which should be removed:
> - implementation("com.google.code.findbugs:jsr305:3.0.1")
> - implementation("joda-time:joda-time:2.8.1")
> Existing dependencies which should be modified to be as indicated:
> - testImplementation("com.github.kstyrc:embedded-redis:0.6") (was implementation)
> - api("redis.clients:jedis:2.9.0") (was implementation)
> > Task :splunk:aggregateAdvice
> Existing dependencies which should be modified to be as indicated:
> - api("com.google.guava:guava:19.0") (was implementation)
> - api("org.slf4j:slf4j-api:1.7.25") (was implementation)
> - api("org.apache.calcite.avatica:avatica-core:1.17.0") (was implementation)
> > Task :pig:aggregateAdvice
> Unused dependencies which should be removed:
> - implementation("org.slf4j:slf4j-api:1.7.25")
> Existing dependencies which should be modified to be as indicated:
> - implementation(project(":linq4j")) (was api)
> - api("com.google.guava:guava:19.0") (was implementation)
> > Task :plus:aggregateAdvice
> Unused dependencies which should be removed:
> - implementation("org.eclipse.jetty:jetty-server:9.4.15.v20190215")
> Existing dependencies which should be modified to be as indicated:
> - implementation(project(":linq4j")) (was api)
> - testImplementation("net.hydromatic:tpcds:0.4") (was implementation)
> - api("net.hydromatic:quidem:0.9") (was implementation)
> - api("org.apache.calcite.avatica:avatica-core:1.17.0") (was implementation)
> > Task :example:csv:aggregateAdvice
> Unused dependencies which should be removed:
> - implementation("org.apache.commons:commons-lang3:3.8")
> - implementation("commons-io:commons-io:2.4")
> - implementation("net.sf.opencsv:opencsv:2.3")
> Existing dependencies which should be modified to be as indicated:
> - implementation(project(":file")) (was api)
> > Task :server:aggregateAdvice
> Existing dependencies which should be modified to be as indicated:
> - implementation(project(":linq4j")) (was api)
> - api("org.apache.calcite.avatica:avatica-core:1.17.0") (was implementation)
> > Task :piglet:aggregateAdvice
> Transitively used dependencies that should be declared directly as indicated:
> - implementation("org.hamcrest:hamcrest:2.1")
> Existing dependencies which should be modified to be as indicated:
> - api("com.google.guava:guava:19.0") (was implementation)
> - api("org.apache.pig:pig:0.16.0") (was implementation)
> > Task :spark:aggregateAdvice
> Existing dependencies which should be modified to be as indicated:
> - api("org.apache.spark:spark-core_2.10:2.2.2") (was implementation)
> - implementation("xerces:xercesImpl:2.9.1") (was runtimeOnly)
> {noformat}



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