Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[cleanup]: Remove testRuntimeMigration configuration #31740

Open
16 tasks
Abacn opened this issue Jul 1, 2024 · 0 comments
Open
16 tasks

[cleanup]: Remove testRuntimeMigration configuration #31740

Abacn opened this issue Jul 1, 2024 · 0 comments

Comments

@Abacn
Copy link
Contributor

Abacn commented Jul 1, 2024

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:

      // 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.

Ways to eliminate testRuntimeMigration:

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant