You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "frankvicky (via GitHub)" <gi...@apache.org> on 2024/10/17 07:30:07 UTC

[PR] KAFKA-17811: Separate modules to use different JDKs [kafka]

frankvicky opened a new pull request, #17522:
URL: https://github.com/apache/kafka/pull/17522

   JIRA: [KAFKA-17811](https://issues.apache.org/jira/browse/KAFKA-17811)
   
   This is sub-task to drop broker and tools support for Java 11. 
   
   
   ### Committer Checklist (excluded from commit message)
   - [ ] Verify design and implementation 
   - [ ] Verify test coverage and CI build status
   - [ ] Verify documentation (including upgrade notes)
   


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

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] KAFKA-17811: Separate modules to use different JDKs [kafka]

Posted by "chia7712 (via GitHub)" <gi...@apache.org>.
chia7712 commented on PR #17522:
URL: https://github.com/apache/kafka/pull/17522#issuecomment-2498548573

   @frankvicky Could you please update CI file to use JDK 17 and 23 
   
   https://github.com/apache/kafka/blob/trunk/.github/workflows/build.yml#L148


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

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] KAFKA-17811: Separate modules to use different JDKs [kafka]

Posted by "chia7712 (via GitHub)" <gi...@apache.org>.
chia7712 commented on code in PR #17522:
URL: https://github.com/apache/kafka/pull/17522#discussion_r1858070941


##########
build.gradle:
##########
@@ -1869,7 +1874,8 @@ project(':clients') {
 
     testRuntimeOnly libs.jacksonDatabind
     testRuntimeOnly libs.jacksonJDK8Datatypes
-    testRuntimeOnly runtimeTestLibs
+    testRuntimeOnly libs.slf4jReload4j

Review Comment:
   Could you please apply this approach on streams module too?



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

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] KAFKA-17811: Separate modules to use different JDKs [kafka]

Posted by "chia7712 (via GitHub)" <gi...@apache.org>.
chia7712 commented on PR #17522:
URL: https://github.com/apache/kafka/pull/17522#issuecomment-2526275233

   open [KAFKA-18186](https://issues.apache.org/jira/browse/KAFKA-18186) to address this.
   
   @ableegoldman please feel free to share your thoughts on this approach.


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

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] KAFKA-17811: Separate modules to use different JDKs [kafka]

Posted by "chia7712 (via GitHub)" <gi...@apache.org>.
chia7712 commented on code in PR #17522:
URL: https://github.com/apache/kafka/pull/17522#discussion_r1854331854


##########
build.gradle:
##########
@@ -113,22 +114,29 @@ ext {
 
   commitId = determineCommitId()
 
-  configureJavaCompiler = { name, options ->
+  isModuleNeedJava11 = { projectPath ->
+    def modulesNeedingJava11 = [":clients", ":streams", ":streams:test-utils", ":streams-scala"]
+    modulesNeedingJava11.any { projectPath.equals(it) }
+  }
+
+  configureJavaCompiler = { name, options, projectPath ->
     // -parameters generates arguments with parameter names in TestInfo#getDisplayName.
     // ref: https://github.com/junit-team/junit5/blob/4c0dddad1b96d4a20e92a2cd583954643ac56ac0/junit-jupiter-params/src/main/java/org/junit/jupiter/params/ParameterizedTest.java#L161-L164
-    if (name == "compileTestJava" || name == "compileTestScala") {
+
+    def releaseVersion = isModuleNeedJava11(projectPath) ? minClientJavaVersion : minServerJavaVersion

Review Comment:
   ```
   def releaseVersion = modulesNeedingJava11.any { projectPath == it } ? minClientJavaVersion : minServerJavaVersion
   ```



##########
build.gradle:
##########
@@ -726,7 +734,9 @@ subprojects {
   }
 
   tasks.withType(ScalaCompile) {
-
+    def modulesNeedingJava11 = [":clients", ":streams", ":streams:test-utils", ":streams-scala"]
+    def releaseVersion = modulesNeedingJava11.any { project.path.equals(it) } ?

Review Comment:
   ```
       def releaseVersion = modulesNeedingJava11.any { project.path == it } ? minClientJavaVersion : minServerJavaVersion
   ```



##########
build.gradle:
##########
@@ -47,7 +47,8 @@ plugins {
 
 ext {
   gradleVersion = versions.gradle
-  minJavaVersion = 11
+  minClientJavaVersion = 11
+  minServerJavaVersion = 17
   buildVersionFileName = "kafka-version.properties"

Review Comment:
   Could you please move `modulesNeedingJava11` up to line#52?
   
   ```
   modulesNeedingJava11 = [":clients", ":streams", ":streams:test-utils", ":streams-scala"]
   ```



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

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] KAFKA-17811: Separate modules to use different JDKs [kafka]

Posted by "agavra (via GitHub)" <gi...@apache.org>.
agavra commented on PR #17522:
URL: https://github.com/apache/kafka/pull/17522#issuecomment-2519241732

   🤦 this is why I shouldn't work at night, I had set the module versions to JDK 17 but not the project version to JDK 17. It now works, thanks @chia7712. 


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

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] KAFKA-17811: Separate modules to use different JDKs [kafka]

Posted by "agavra (via GitHub)" <gi...@apache.org>.
agavra commented on PR #17522:
URL: https://github.com/apache/kafka/pull/17522#issuecomment-2519156571

   I'm running it like this:
   <img width="477" alt="image" src="https://github.com/user-attachments/assets/3318471c-322e-40fd-a3cf-f91a945796e7">
   
   Here's the detailed test configuration:
   <img width="1248" alt="image" src="https://github.com/user-attachments/assets/241ea2be-3472-43bb-851a-fb53db030562">
   
   I don't have any special configurations in IDEA, I just use `./gradlew idea` to configure it.
   


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

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] KAFKA-17811: Separate modules to use different JDKs [kafka]

Posted by "frankvicky (via GitHub)" <gi...@apache.org>.
frankvicky commented on PR #17522:
URL: https://github.com/apache/kafka/pull/17522#issuecomment-2495993621

   Hi @chia7712 
   Following is the java version of `Consumer.class` and `BrokerFeatures.class`
   ![Screenshot from 2024-11-24 21-11-53](https://github.com/user-attachments/assets/59ab7004-5928-4c1d-8583-c837ef5b6dc8)
   ![Screenshot from 2024-11-24 21-10-07](https://github.com/user-attachments/assets/ee91bd6b-1ba5-4a66-b6e6-1cbd031d27b7)
   


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

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] KAFKA-17811: Separate modules to use different JDKs [kafka]

Posted by "chia7712 (via GitHub)" <gi...@apache.org>.
chia7712 merged PR #17522:
URL: https://github.com/apache/kafka/pull/17522


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

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] KAFKA-17811: Separate modules to use different JDKs [kafka]

Posted by "agavra (via GitHub)" <gi...@apache.org>.
agavra commented on PR #17522:
URL: https://github.com/apache/kafka/pull/17522#issuecomment-2519066430

   Hey @chia7712 @frankvicky it looks like after merging this PR it's no longer possible (or at least straightforward) to run tests in client modules (specifically streams) from within the IDE (IntelliJ specifically). I'm getting:
   
   ```
   > Task :test-common:test-common-runtime:compileJava
   FAILURE: Build failed with an exception.
   * What went wrong:
   Execution failed for task ':generator:compileJava'.
   > error: release version 17 not supported
   ```
   
   I've tried manually setting the module in the project settings but that doesn't seem to work. Would be good to document something in the project README.
   
   Note that it still works using `./gradlew` (obviously, or CI wouldn't pass) but since it's pretty custom gradle scripting it seems IntelliJ isn't able to properly pick it up.
   
   cc @ableegoldman who was running into similar issues


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

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] KAFKA-17811: Separate modules to use different JDKs [kafka]

Posted by "ijuma (via GitHub)" <gi...@apache.org>.
ijuma commented on PR #17522:
URL: https://github.com/apache/kafka/pull/17522#issuecomment-2526306797

   I see some confusion here and I'll try to clarify it.
   
   > Are you using JDK 11 to run the streams tests? If so, that could be an issue since the generator module requires JDK 17. I assume all Kafka developers should use JDK 17, as we typically build the entire project during development.
   
   We should make sure it's possible to run tests with Java 11 for the modules that support it since it's possible to have issues at runtime that only affect a particular version.
   
   > We do indeed need to compile the project with 17, but we should recommend that anyone working on the clients (or any other modules that still support 11) at least set their IDE's language version to JDK11 to avoid accidentally using APIs that don't exist back in 11 (looking at you Optional#isPresent)
   
   The expected behavior is that the IDE & gradle plugin support the --release flag which has the correct behavior (it sets the appropriate source and binary versions and ensures the standard library signatures also match it).
   
   > I plan to add sourceCompatibility back to build.gradle since IntelliJ IDEA sets the language level based on sourceCompatibility by default ([Gradle Documentation](https://docs.gradle.org/current/dsl/org.gradle.plugins.ide.idea.model.IdeaModule.html#org.gradle.plugins.ide.idea.model.IdeaModule:languageLevel)).
   
   Are we sure the Gradle plugin doesn't handle this properly? If so, we should add the workaround, but also file a ticket with them. See the following for a similar situation for the Scala:
   
   https://github.com/apache/kafka/pull/13205#issuecomment-1445120790


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

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] KAFKA-17811: Separate modules to use different JDKs [kafka]

Posted by "chia7712 (via GitHub)" <gi...@apache.org>.
chia7712 commented on code in PR #17522:
URL: https://github.com/apache/kafka/pull/17522#discussion_r1854274097


##########
build.gradle:
##########
@@ -770,10 +778,9 @@ subprojects {
     scalaCompileOptions.additionalParameters += ["-opt-warnings", "-Xlint:strict-unsealed-patmat"]
     // Scala 2.13.2 introduces compiler warnings suppression, which is a pre-requisite for -Xfatal-warnings
     scalaCompileOptions.additionalParameters += ["-Xfatal-warnings"]
+    scalaCompileOptions.additionalParameters += ["--release", String.valueOf(releaseVersion)]
 
-    scalaCompileOptions.additionalParameters += ["-release", String.valueOf(minJavaVersion)]

Review Comment:
   `streams-scala` and `streams:test-utils` need java 11



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

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] KAFKA-17811: Separate modules to use different JDKs [kafka]

Posted by "chia7712 (via GitHub)" <gi...@apache.org>.
chia7712 commented on PR #17522:
URL: https://github.com/apache/kafka/pull/17522#issuecomment-2498137933

   @frankvicky Could you please use `@SuppressWarnings("removal")` to fix the warnings? 
   
   ```
   > Task :connect:runtime:compileTestJava
   /home/chia7712/project/kafka/connect/runtime/src/test/java/org/apache/kafka/connect/runtime/isolation/SynchronizationTest.java:464: warning: [removal] SecurityManager in java.lang has been deprecated and marked for removal
               SecurityManager s = System.getSecurityManager();
               ^
   /home/chia7712/project/kafka/connect/runtime/src/test/java/org/apache/kafka/connect/runtime/isolation/SynchronizationTest.java:464: warning: [removal] getSecurityManager() in System has been deprecated and marked for removal
               SecurityManager s = System.getSecurityManager();
                                         ^
   2 warnings
   ```


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

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] KAFKA-17811: Separate modules to use different JDKs [kafka]

Posted by "ijuma (via GitHub)" <gi...@apache.org>.
ijuma commented on code in PR #17522:
URL: https://github.com/apache/kafka/pull/17522#discussion_r1855363606


##########
build.gradle:
##########
@@ -47,7 +47,10 @@ plugins {
 
 ext {
   gradleVersion = versions.gradle
-  minJavaVersion = 11
+  minClientJavaVersion = 11
+  minServerJavaVersion = 17

Review Comment:
   I think it would be more accurate to say `minNonClientJavaVersion` as this includes things like `tools` and other such modules.



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

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] KAFKA-17811: Separate modules to use different JDKs [kafka]

Posted by "chia7712 (via GitHub)" <gi...@apache.org>.
chia7712 commented on PR #17522:
URL: https://github.com/apache/kafka/pull/17522#issuecomment-2499992086

   https://github.com/apache/kafka/blob/trunk/build.gradle#L1872
   
   @frankvicky please remove the `testRuntimeOnly runtimeTestLibs`  and add 
   ```
       libs.slf4jReload4j
       libs.junitPlatformLanucher
   ```


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

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] KAFKA-17811: Separate modules to use different JDKs [kafka]

Posted by "ableegoldman (via GitHub)" <gi...@apache.org>.
ableegoldman commented on PR #17522:
URL: https://github.com/apache/kafka/pull/17522#issuecomment-2522185051

   > I assume all Kafka developers should use JDK 17, as we typically build the entire project during development.
   
   We do indeed need to compile the project with 17, but we should recommend that anyone working on the clients (or any other modules that still support 11) at least set their IDE's language version to JDK11 to avoid accidentally using APIs that don't exist back in 11 (looking at you `Optional#isPresent`). I also noticed that the PR builds don't show the most clear error when failing due to use of post-JDK-11 APIs :/


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

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] KAFKA-17811: Separate modules to use different JDKs [kafka]

Posted by "frankvicky (via GitHub)" <gi...@apache.org>.
frankvicky commented on PR #17522:
URL: https://github.com/apache/kafka/pull/17522#issuecomment-2495290618

   Hi @chia7712 
   I have updated the PR, PTAL


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

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] KAFKA-17811: Separate modules to use different JDKs [kafka]

Posted by "chia7712 (via GitHub)" <gi...@apache.org>.
chia7712 commented on PR #17522:
URL: https://github.com/apache/kafka/pull/17522#issuecomment-2519146680

   > it's no longer possible (or at least straightforward) to run tests in client modules (specifically streams) from within the IDE (IntelliJ specifically)
   
   Could you please share the details to me? For example, how do you run the tests by IntelliJ?


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

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] KAFKA-17811: Separate modules to use different JDKs [kafka]

Posted by "chia7712 (via GitHub)" <gi...@apache.org>.
chia7712 commented on PR #17522:
URL: https://github.com/apache/kafka/pull/17522#issuecomment-2529939976

   > We should make sure it's possible to run tests with Java 11 for the modules that support it since it's possible to have issues at runtime that only affect a particular version.
   
   that makes sense. open https://issues.apache.org/jira/browse/KAFKA-18192 to handle it.
   
   > Are we sure the Gradle plugin doesn't handle this properly? If so, we should add the workaround, but also file a ticket with them. See the following for a similar situation for the Scala (the issue here seems to be for Java instead):
   
   The root cause is that we set the compiler arguments directly instead of using Gradle's recommended `options.release`. I have left a comment on [this pull request](https://github.com/apache/kafka/pull/18104/files#r1876946798).


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

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] KAFKA-17811: Separate modules to use different JDKs [kafka]

Posted by "chia7712 (via GitHub)" <gi...@apache.org>.
chia7712 commented on code in PR #17522:
URL: https://github.com/apache/kafka/pull/17522#discussion_r1855379574


##########
build.gradle:
##########
@@ -47,7 +47,10 @@ plugins {
 
 ext {
   gradleVersion = versions.gradle
-  minJavaVersion = 11
+  minClientJavaVersion = 11
+  minServerJavaVersion = 17

Review Comment:
   minNonClientJavaVersion looks good to me. Additionally, the connect:api module belongs to client APIs, but in KIP-1032 we decided to bump the Connect module to JDK 17. Could you please add a comment for the Connect module?



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

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] KAFKA-17811: Separate modules to use different JDKs [kafka]

Posted by "chia7712 (via GitHub)" <gi...@apache.org>.
chia7712 commented on code in PR #17522:
URL: https://github.com/apache/kafka/pull/17522#discussion_r1845552291


##########
build.gradle:
##########
@@ -116,6 +116,13 @@ ext {
   configureJavaCompiler = { name, options ->
     // -parameters generates arguments with parameter names in TestInfo#getDisplayName.
     // ref: https://github.com/junit-team/junit5/blob/4c0dddad1b96d4a20e92a2cd583954643ac56ac0/junit-jupiter-params/src/main/java/org/junit/jupiter/params/ParameterizedTest.java#L161-L164
+
+    def modulesNeedingJava17 = [
+      ":core", ":coordinator-common", ":generator", ":group-coordinator",
+      ":metadata", ":raft", ":server", ":server-common", ":share", ":storage",
+      ":share-coordinator", ":test-common", ":tools", ":transaction-coordinator"
+    ]
+
     if (name == "compileTestJava" || name == "compileTestScala") {
       options.compilerArgs << "-parameters"
       options.compilerArgs += ["--release", String.valueOf(minJavaVersion)]

Review Comment:
   this need to be updated too.



##########
build.gradle:
##########
@@ -128,7 +135,11 @@ ext {
       options.compilerArgs << "-Xlint:-serial"
       options.compilerArgs << "-Xlint:-try"
       options.compilerArgs << "-Werror"
-      options.compilerArgs += ["--release", String.valueOf(minJavaVersion)]
+      if (modulesNeedingJava17.any { project.path.startsWith(it) }) {
+        options.compilerArgs += ["--release", String.valueOf(17)]
+      } else {
+        options.compilerArgs += ["--release", String.valueOf(minJavaVersion)]
+      }
     }

Review Comment:
   please update scala module as well



##########
build.gradle:
##########
@@ -128,7 +135,11 @@ ext {
       options.compilerArgs << "-Xlint:-serial"
       options.compilerArgs << "-Xlint:-try"
       options.compilerArgs << "-Werror"
-      options.compilerArgs += ["--release", String.valueOf(minJavaVersion)]

Review Comment:
   Could you please add `minClientJavaVersion` and `minServerJavaVersion`?



##########
build.gradle:
##########
@@ -116,6 +116,13 @@ ext {
   configureJavaCompiler = { name, options ->
     // -parameters generates arguments with parameter names in TestInfo#getDisplayName.
     // ref: https://github.com/junit-team/junit5/blob/4c0dddad1b96d4a20e92a2cd583954643ac56ac0/junit-jupiter-params/src/main/java/org/junit/jupiter/params/ParameterizedTest.java#L161-L164
+
+    def modulesNeedingJava17 = [
+      ":core", ":coordinator-common", ":generator", ":group-coordinator",

Review Comment:
   `connect:runtime`, `connect:mirror`, `connect:test-plugins`, and ``connect:file` should use JDK 17 as well



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

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] KAFKA-17811: Separate modules to use different JDKs [kafka]

Posted by "frankvicky (via GitHub)" <gi...@apache.org>.
frankvicky commented on PR #17522:
URL: https://github.com/apache/kafka/pull/17522#issuecomment-2498270196

   Hi @chia7712 
   I have suppressed the removal warning, PTAL 😄 


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

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] KAFKA-17811: Separate modules to use different JDKs [kafka]

Posted by "frankvicky (via GitHub)" <gi...@apache.org>.
frankvicky commented on code in PR #17522:
URL: https://github.com/apache/kafka/pull/17522#discussion_r1858108128


##########
build.gradle:
##########
@@ -1869,7 +1874,8 @@ project(':clients') {
 
     testRuntimeOnly libs.jacksonDatabind
     testRuntimeOnly libs.jacksonJDK8Datatypes
-    testRuntimeOnly runtimeTestLibs
+    testRuntimeOnly libs.slf4jReload4j

Review Comment:
   I have applied to 4 modules which need JDK 11



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

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] KAFKA-17811: Separate modules to use different JDKs [kafka]

Posted by "frankvicky (via GitHub)" <gi...@apache.org>.
frankvicky commented on code in PR #17522:
URL: https://github.com/apache/kafka/pull/17522#discussion_r1855363842


##########
build.gradle:
##########
@@ -47,7 +47,10 @@ plugins {
 
 ext {
   gradleVersion = versions.gradle
-  minJavaVersion = 11
+  minClientJavaVersion = 11
+  minServerJavaVersion = 17

Review Comment:
   Make sense 😄 



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

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] KAFKA-17811: Separate modules to use different JDKs [kafka]

Posted by "chia7712 (via GitHub)" <gi...@apache.org>.
chia7712 commented on PR #17522:
URL: https://github.com/apache/kafka/pull/17522#issuecomment-2500478099

   @frankvicky I think current approach is incorrect. We should make `:test-common:test-common-runtime` run under JDK 11 to ensure it can offer common helpers to all modules.


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

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] KAFKA-17811: Separate modules to use different JDKs [kafka]

Posted by "chia7712 (via GitHub)" <gi...@apache.org>.
chia7712 commented on PR #17522:
URL: https://github.com/apache/kafka/pull/17522#issuecomment-2519225864

   @agavra Are you using JDK 11 to run the streams tests? If so, that could be an issue since the generator module requires JDK 17. I assume all Kafka developers should use JDK 17, as we typically build the entire project during development.


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

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] KAFKA-17811: Separate modules to use different JDKs [kafka]

Posted by "chia7712 (via GitHub)" <gi...@apache.org>.
chia7712 commented on PR #17522:
URL: https://github.com/apache/kafka/pull/17522#issuecomment-2526274179

   @ableegoldman Thanks for your feedback. I agree that we should prioritize making our developers' experience better. I plan to add sourceCompatibility back to build.gradle since IntelliJ IDEA sets the language level based on sourceCompatibility by default ([Gradle Documentation](https://docs.gradle.org/current/dsl/org.gradle.plugins.ide.idea.model.IdeaModule.html#org.gradle.plugins.ide.idea.model.IdeaModule:languageLevel)).
   
   The screenshot below demonstrates that IntelliJ IDEA can automatically highlight unsupported usages. With this change, developers won't need to manually configure the language level.
   ![Screenshot From 2024-12-09 01-23-49](https://github.com/user-attachments/assets/3affc9cb-410b-4b5c-b312-7d9e5b729686)
   
   
   
   


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

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org