Skip to content

Commit

Permalink
build: Remove java classpath conventions (#5724)
Browse files Browse the repository at this point in the history
This removes our custom configuration hierarchy, historically inherited
from the "fishlib" days.

Follow-up to #5683

Note: unlike #5683, this migration does not aim to preserve the exact
configuration dependencies that were inherited in the
java-classpath-conventions hierarchy. The configuration conventions were
overly broad, and didn't represent the real dependencies that each
project has. As part of this, our dependency on
`org.jetbrains:annotations` changed from an implementation dependency
(inherited through the `fishBase` configuration) to a compileOnly
dependency to better reflect how we actually depend on it. We might
expect that the jetbrains annotations would be removed from our
application runtime classpath entirely, but that is not the case - it
turns out that one of our transitive dependencies has a runtime
dependency on it:

```
org.jetbrains:annotations:13.0                                                                                                                                                                                       
\--- org.jetbrains.kotlin:kotlin-stdlib:1.9.10                                                                                                                                                                       
     +--- io.confluent:kafka-protobuf-provider:7.6.0                                                                                                                                                                 
     |    \--- io.confluent:kafka-protobuf-serializer:7.6.0                                                                                                                                                          
     |         \--- project :extensions-kafka                                                                                                                                                                        
     |              \--- project :server                                                                                                                                                                             
     |                   \--- project :server-jetty                                                                                                                                                                  
     |                        \--- runtimeClasspath
```

In this case, it has the visible effect of "downgrading" our runtime
classpath from what was previously `org.jetbrains:annotations:24.0.0` to
`org.jetbrains:annotations:13.0`. Arguably, this is the more correct
runtime dependency to provide given it matches what the exact version
the transitive library requests.
  • Loading branch information
devinrsmith authored Jul 8, 2024
1 parent 2d6bf4b commit 619ba4e
Show file tree
Hide file tree
Showing 57 changed files with 127 additions and 230 deletions.
6 changes: 3 additions & 3 deletions Base/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ dependencies {

api project(':clock')

implementation depTrove3
compileOnlyApi depAnnotations
implementation depCommonsLang3
implementation libs.trove
compileOnlyApi libs.jetbrains.annotations
implementation libs.commons.lang3

api 'io.deephaven:hash:0.1.0'

Expand Down
11 changes: 3 additions & 8 deletions BenchmarkSupport/BenchmarkSupport.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,6 @@ plugins {
id 'io.deephaven.project.register'
}

configurations {
implementation.extendsFrom dhBenchmarkSupport

testImplementation.extendsFrom fishIoTest

testRuntimeOnly.extendsFrom fishDataGenerator
}

sourceSets {
main {
java {
Expand All @@ -34,7 +26,10 @@ dependencies {
implementation project(':Configuration')
implementation 'org.openjdk.jmh:jmh-core:1.20'

implementation libs.univocity.parsers

testImplementation project(':engine-test-utils')
testImplementation project(path: ':Base', configuration: 'tests')

testRuntimeOnly project(path: ':configs')
testRuntimeOnly project(path: ':test-configs')
Expand Down
6 changes: 1 addition & 5 deletions ClientSupport/ClientSupport.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,12 @@ plugins {
id 'io.deephaven.project.register'
}

configurations {
implementation.extendsFrom dhConsole
}

dependencies {
implementation project(':engine-table')
implementation project(':engine-function')
implementation project(':log-factory')
implementation project(':Configuration')
implementation depCommonsLang3
implementation libs.commons.lang3

testImplementation project(':engine-test-utils')
testImplementation libs.junit4
Expand Down
6 changes: 5 additions & 1 deletion Configuration/build.gradle
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
plugins {
id 'java-library'
id 'io.deephaven.project.register'
}

dependencies {
api libs.trove

implementation project(':Base')
implementation project(':DataStructures')
implementation project(':IO')
implementation project(':log-factory')
implementation depCommonsLang3
implementation libs.commons.lang3
testImplementation libs.junit4
testImplementation libs.jmock.junit4
testImplementation libs.jmock.imposters
Expand All @@ -16,6 +19,7 @@ dependencies {
annotationProcessor libs.autoservice.compiler

testImplementation project(path: ':Base', configuration: 'tests')
testImplementation libs.commons.compress

testRuntimeOnly project(':log-to-slf4j')
testRuntimeOnly libs.slf4j.simple
Expand Down
6 changes: 3 additions & 3 deletions Generators/Generators.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ plugins {
evaluationDependsOn Docker.registryProject('python')

configurations {
implementation.extendsFrom jdom
testImplementation.extendsFrom fishBaseTest
combinedJavadoc
}

Expand All @@ -17,7 +15,7 @@ dependencies {
implementation project(':extensions-csv')
implementation project(':extensions-kafka')
implementation project(':extensions-parquet-table')
implementation depTrove3
implementation libs.trove

implementation libs.groovy
implementation libs.groovy.json
Expand All @@ -29,6 +27,8 @@ dependencies {
runtimeOnly project(':log-to-slf4j')
runtimeOnly libs.logback.classic

testImplementation project(path: ':Base', configuration: 'tests')

testRuntimeOnly project(path: ':configs')
testRuntimeOnly project(path: ':test-configs')

Expand Down
2 changes: 1 addition & 1 deletion IO/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ plugins {
dependencies {
implementation project(':Base')
implementation project(':SevenZip')
implementation depCommonsCompress
implementation libs.commons.compress
testImplementation project(path: ':Base', configuration: 'tests')
testImplementation libs.junit4
testImplementation libs.jmock.junit4
Expand Down
6 changes: 1 addition & 5 deletions Integrations/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,6 @@ plugins {

evaluationDependsOn ':docker-server-jetty'

configurations {
implementation.extendsFrom dhIntegrations
testImplementation.extendsFrom fishBaseTest
}

dependencies {

implementation project(':engine-table')
Expand All @@ -22,6 +17,7 @@ dependencies {
implementation project(':log-factory')

testImplementation project(':engine-test-utils')
testImplementation project(path: ':Base', configuration: 'tests')

// Needed for CalendarInit
testRuntimeOnly TestTools.projectDependency(project, 'engine-time')
Expand Down
5 changes: 1 addition & 4 deletions ModelFarm/ModelFarm.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@ plugins {
id 'java-library'
}

configurations {
testImplementation.extendsFrom fishBaseTest
}

dependencies {
api project(':engine-table')
api project(':engine-time')
Expand All @@ -21,6 +17,7 @@ dependencies {
runtimeOnly project(':configs')

testImplementation project(':engine-test-utils')
testImplementation project(path: ':Base', configuration: 'tests')
testRuntimeOnly project(':Numerics')

testRuntimeOnly project(':log-to-slf4j')
Expand Down
8 changes: 3 additions & 5 deletions Numerics/Numerics.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,15 @@ plugins {
id 'java-library'
}

configurations {
implementation.extendsFrom dhNumerics
testImplementation.extendsFrom fishBaseTest
}

dependencies {
api project(':engine-time')
implementation project(':engine-function')
implementation project(':log-factory')
implementation libs.jama
implementation libs.commons.math3

testImplementation project(':base-test-utils')
testImplementation project(path: ':Base', configuration: 'tests')
testRuntimeOnly project(path: ':configs')
testRuntimeOnly project(path: ':test-configs')

Expand Down
10 changes: 4 additions & 6 deletions Plot/Plot.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,15 @@ plugins {
id 'java-library'
}

configurations {
implementation.extendsFrom dhPlot

testImplementation.extendsFrom fishIoTest
}

dependencies {

api project(':engine-api')
implementation project(':Base')
implementation project(':engine-table')
implementation project(':engine-function')
implementation project(':engine-tuple')
implementation project(':log-factory')
implementation project(':Configuration')

api libs.groovy
implementation libs.groovy.json
Expand All @@ -25,9 +21,11 @@ dependencies {
compileOnly 'javax.inject:javax.inject:1'

implementation libs.guava
implementation libs.commons.lang3

testImplementation project(':engine-test-utils')
testImplementation TestTools.projectDependency(project, 'engine-time')
testImplementation project(path: ':Base', configuration: 'tests')

testRuntimeOnly project(':configs')
testRuntimeOnly project(':test-configs')
Expand Down
12 changes: 7 additions & 5 deletions Util/Util.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@ plugins {
id 'io.deephaven.project.register'
}

configurations {
implementation.extendsFrom configurations.dhUtil, commonsLang3
testImplementation.extendsFrom fishBaseTest
}

dependencies {
api project(':engine-query-constants')
implementation project(':Base')
implementation project(':log-factory')
implementation libs.jdom2
implementation libs.commons.compress

implementation project(':DataStructures')
implementation project(':Configuration')

testRuntimeOnly project(path: ':configs')
testRuntimeOnly project(path: ':test-configs')
Expand All @@ -19,6 +20,7 @@ dependencies {
testRuntimeOnly libs.slf4j.simple

testImplementation project(':base-test-utils')
testImplementation project(path: ':Base', configuration: 'tests')
testImplementation platform(libs.junit.bom)
testImplementation libs.junit.jupiter
testRuntimeOnly libs.junit.jupiter.engine
Expand Down
2 changes: 1 addition & 1 deletion Util/channel/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ dependencies {
// For CountingInputStream
implementation libs.guava

compileOnly depAnnotations
compileOnly libs.jetbrains.annotations

testImplementation libs.assertj
testImplementation platform(libs.junit.bom)
Expand Down
2 changes: 1 addition & 1 deletion Util/function/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ plugins {
dependencies {
api project(':qst-type')

compileOnly depAnnotations
compileOnly libs.jetbrains.annotations

testImplementation libs.assertj
testImplementation platform(libs.junit.bom)
Expand Down
6 changes: 3 additions & 3 deletions base-test-utils/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ plugins {
dependencies {

implementation project(':Base')
implementation depTrove3
compileOnlyApi depAnnotations
implementation depCommonsLang3
implementation libs.trove
compileOnlyApi libs.jetbrains.annotations
implementation libs.commons.lang3

api 'io.deephaven:hash:0.1.0'

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
plugins {
id 'base'
id 'java'
id 'io.deephaven.java-classpath-conventions'
id 'io.deephaven.java-license-conventions'
id 'io.deephaven.java-toolchain-conventions'
id 'io.deephaven.java-jar-conventions'
Expand Down
4 changes: 2 additions & 2 deletions engine/api/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ dependencies {
api project(':engine-rowset')

implementation project(':DataStructures')
implementation depTrove3
implementation libs.trove

compileOnly project(':util-immutables')
annotationProcessor libs.immutables
Expand All @@ -29,7 +29,7 @@ dependencies {
testImplementation project(':engine-test-utils')
testImplementation TestTools.projectDependency(project, 'engine-table')
testImplementation TestTools.projectDependency(project, 'engine-vector')
testImplementation depCommonsLang3
testImplementation libs.commons.lang3

testImplementation libs.junit4

Expand Down
4 changes: 0 additions & 4 deletions engine/context/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@ plugins {

description 'Engine Context: QueryScope, QueryLibrary and QueryCompiler via ExecutionContext'

configurations {
testCompile.extendsFrom junit
}

dependencies {
api project(':authentication')
api project(':Util')
Expand Down
Loading

0 comments on commit 619ba4e

Please sign in to comment.