You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This custom configuration was added in #16307 to mitigate a breaking change of Gradle7, where testRuntime configuration was removed.
In the original TODO comment:
// TODO(BEAM-13430): We create a testRuntimeMigration configuration here
// to extend testImplementation and testRuntimeOnly (similar to what
// testRuntime did). This allows for the start of the migration to Gradle
// 7. We want to remove this and migrate usages onto testImplementation,
// testRuntimeOnly or both when declared as a dependency.
// TODO(BEAM-13430): Figure out whether the artifact should be part of
// testImplementation, testRuntimeOnly, or a new configuration.
// Also, should the normal project jar also be part of this
// configuration removing the need to declare a dependency on project(X)
// and on project(X/testRuntimeConfiguration) and should it mirror what
// we are doing with shadowTest or not?
these TODO string later removed in #16430 . Effectively, it is testImplementation + testRuntimeOnly + make the project depend on both main + test jar.
Since then this configuration is used in various places, in most cases it is not necessary. Moreover, it will cause issue if the main scope and test scope codes compile with different java language level. As we are migrating to build and running tests with Java11+ (but keep main artifact bytecode compatible to Java8), the main artifact cannot depend on test jar.
Another problem this custom configuration introduced is that analyzeClassesDependencies does not detect whether the transient dependency introduced from testRuntimeMigration is also declared in build.gradle.
Issue Priority
Priority: 2 (default / most normal work should be filed as P2)
Issue Components
Component: Python SDK
Component: Java SDK
Component: Go SDK
Component: Typescript SDK
Component: IO connector
Component: Beam YAML
Component: Beam examples
Component: Beam playground
Component: Beam katas
Component: Website
Component: Spark Runner
Component: Flink Runner
Component: Samza Runner
Component: Twister2 Runner
Component: Hazelcast Jet Runner
Component: Google Cloud Dataflow Runner
The text was updated successfully, but these errors were encountered:
What needs to happen?
This custom configuration was added in #16307 to mitigate a breaking change of Gradle7, where
testRuntime
configuration was removed.In the original TODO comment:
these TODO string later removed in #16430 . Effectively, it is testImplementation + testRuntimeOnly + make the project depend on both main + test jar.
Since then this configuration is used in various places, in most cases it is not necessary. Moreover, it will cause issue if the main scope and test scope codes compile with different java language level. As we are migrating to build and running tests with Java11+ (but keep main artifact bytecode compatible to Java8), the main artifact cannot depend on test jar.
Ways to eliminate testRuntimeMigration:
If the project A does not depend on the test jar of project B, one could simply remove testRuntimeMigration, e.g. Remove testRuntimeMigration configuration for test-utils dependencies #31713
If the project A depends on the test jar of project B, and project B is a text fixture, move the classes to main scope of B, e.g. Eliminate the use of testRuntimeMigration for sdks:java:io:common #31693
Another problem this custom configuration introduced is that
analyzeClassesDependencies
does not detect whether the transient dependency introduced fromtestRuntimeMigration
is also declared in build.gradle.Issue Priority
Priority: 2 (default / most normal work should be filed as P2)
Issue Components
The text was updated successfully, but these errors were encountered: