You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "dejan2609 (via GitHub)" <gi...@apache.org> on 2023/02/06 18:40:08 UTC

[GitHub] [kafka] dejan2609 opened a new pull request, #13205: KAFKA-14680: gradle version upgrade 7 -->> 8

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

   details:
    * gradle upgrade: 7.6 -->> 8.0-rc-3
    * spotbugs plugin upgrade: 5.0.9 -->> 5.0.13
    * declaration test.dependsOn(':spotlessScalaCheck') removed for project(':streams:streams-scala') in order to comply with Gradle 8 defaults
   
   


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


[GitHub] [kafka] ijuma commented on pull request #13205: KAFKA-14680: Upgrade gradle version from 7.6 to 8.0.1

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

   JDK 8 build passed, the other two had unrelated failures:
   
   > Build / JDK 17 and Scala 2.13 / org.apache.kafka.streams.processor.internals.DefaultStateUpdaterTest.shouldPauseActiveTaskAndTransitToUpdateStandby()
   Build / JDK 11 and Scala 2.13 / org.apache.kafka.connect.integration.ConnectorRestartApiIntegrationTest.testMultiWorkerRestartOnlyConnector
   Build / JDK 11 and Scala 2.13 / org.apache.kafka.tools.MetadataQuorumCommandTest.[5] Type=Raft-CoReside, Name=testDescribeQuorumStatusSuccessful, MetadataVersion=3.5-IV0, Security=PLAINTEXT
   


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


[GitHub] [kafka] ijuma commented on pull request #13205: KAFKA-14680: Upgrade gradle version from 7.6 to 8.0.1

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

   @dejan2609 One issue is that IntelliJ still doesn't handle this correctly. Before this PR, it would add the following to `.idea/scala_compiler.xml`:
   
   > <parameter value="-target:jvm-1.8" />
   
   Now it adds:
   
   > <parameter value="-target:jvm-17" />
   
   Both cause the build to break with the latest Scala 2.13 version since that deprecated `-target` and we compile with fatal 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


[GitHub] [kafka] dejan2609 commented on pull request #13205: KAFKA-14680: gradle version upgrade 7 -->> 8

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

   > @dejan2609 I added a few cleanups here: [ijuma@9c6ae57](https://github.com/ijuma/kafka/commit/9c6ae575276e673f39d188d42a332f9f0b07d2d0)
   > 
   > If you agree with them, please integrate into your PR.
   
   @ijuma Scala 2.13 builds are fine, but something is still missing for Scala 2.12 (all **_./gradlew -PscalaVersion=2.12 clean jar_** builds are failling):
   - JDK 17
   ```
   > Task :core:compileScala
   '-release' does not accept multiple arguments
   bad option: '-release:8'
   
   > Task :core:compileScala FAILED
   
   > Task :streams:streams-scala:compileScala FAILED
   'strict-unsealed-patmat' is not a valid choice for '-Xlint'
   '-release' does not accept multiple arguments
   bad option: '-release:8'
   
   FAILURE: Build completed with 2 failures.
   ```
   - JDK 11
   ```
   > Task :core:compileScala FAILED
   
   > Task :streams:streams-scala:compileScala
   'strict-unsealed-patmat' is not a valid choice for '-Xlint'
   '-release' does not accept multiple arguments
   bad option: '-release:8'
   
   > Task :streams:streams-scala:compileScala FAILED
   
   FAILURE: Build completed with 2 failures.
   ```
   - JDK 8
   ```
   > Task :core:compileScala FAILED
   '-release' does not accept multiple arguments
   bad option: '-release:8'
   
   FAILURE: Build failed with an exception.
   ```
   


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


[GitHub] [kafka] ijuma commented on a diff in pull request #13205: KAFKA-14680: Upgrade gradle version from 7.6 to 8.0.1

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


##########
gradlew:
##########
@@ -32,10 +32,10 @@
 #       Busybox and similar reduced shells will NOT work, because this script
 #       requires all of these POSIX shell features:
 #         * functions;
-#         * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
-#           «${var#prefix}», «${var%suffix}», and «$( cmd )»;
-#         * compound commands having a testable exit status, especially «case»;
-#         * various built-in commands including «command», «set», and «ulimit».
+#         * expansions �$var�, �${var}�, �${var:-default}�, �${var+SET}�,
+#           �${var#prefix}�, �${var%suffix}�, and �$( cmd )�;
+#         * compound commands having a testable exit status, especially �case�;
+#         * various built-in commands including �command�, �set�, and �ulimit�.

Review Comment:
   I pushed an additional commit to fix this.



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


[GitHub] [kafka] ijuma commented on pull request #13205: KAFKA-14680: gradle version upgrade 7 -->> 8

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

   @inglor Thanks. The following comment explains that the way `-release` must be set is a bit specific:
   
   https://github.com/gradle/gradle/issues/23962#issuecomment-1437348400


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


[GitHub] [kafka] dejan2609 commented on pull request #13205: KAFKA-14680: Upgrade gradle version from 7.6 to 8.0.1

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

   @chia7712 Correct, `./gradlew build` executed against trunk does fail.
   
   For the last few days we (@ijuma and me):
   - merged into a trunk Jenkinsfile change that removes 'spotlessScalaCheck': https://github.com/apache/kafka/commit/97efdc65f082d72b7980e6a8b1d56ba0d70002fd 
   - merged this PR also (that was tested with `./gradlew jar` on our local machines and then on Jenkins)
   
   However,  `./gradlew build` depends on spotless tasks (tree is generated using this Gradle plugin: https://plugins.gradle.org/plugin/org.barfuin.gradle.taskinfo)
   
   `./gradlew build tiTree` 
   
   ```
   > Task :tiTree
   :build                                                         (org.gradle.api.DefaultTask)
   +--- :assemble                                                 (org.gradle.api.DefaultTask)
   |    `--- :jar                                                 (org.gradle.api.tasks.bundling.Jar)
   |         +--- :classes                                        (org.gradle.api.DefaultTask)
   |         |    +--- :compileJava                               (org.gradle.api.tasks.compile.JavaCompile)
   |         |    `--- :processResources                          (org.gradle.language.jvm.tasks.ProcessResources)
   |         `--- :compileJava                                    (org.gradle.api.tasks.compile.JavaCompile)
   `--- :check                                                    (org.gradle.api.DefaultTask)
        +--- :rat                                                 (org.nosphere.apache.rat.RatTask)
        +--- :spotlessCheck                                       (org.gradle.api.DefaultTask)
        |    `--- :spotlessScalaCheck                             (com.diffplug.gradle.spotless.SpotlessCheck)
        |         `--- :spotlessScala                             (com.diffplug.gradle.spotless.SpotlessTaskImpl)
        |              `--- :spotlessInternalRegisterDependencies (com.diffplug.gradle.spotless.RegisterDependenciesTask)
        `--- :test                                                (org.gradle.api.tasks.testing.Test)
             +--- :classes                                        (org.gradle.api.DefaultTask)
             |    +--- :compileJava                               (org.gradle.api.tasks.compile.JavaCompile)
             |    `--- :processResources                          (org.gradle.language.jvm.tasks.ProcessResources)
             +--- :compileJava                                    (org.gradle.api.tasks.compile.JavaCompile)
             +--- :compileTestJava                                (org.gradle.api.tasks.compile.JavaCompile)
             |    +--- :classes                                   (org.gradle.api.DefaultTask)
             |    |    +--- :compileJava                          (org.gradle.api.tasks.compile.JavaCompile)
             |    |    `--- :processResources                     (org.gradle.language.jvm.tasks.ProcessResources)
             |    `--- :compileJava                               (org.gradle.api.tasks.compile.JavaCompile)
             `--- :testClasses                                    (org.gradle.api.DefaultTask)
                  +--- :compileTestJava                           (org.gradle.api.tasks.compile.JavaCompile)
                  |    +--- :classes                              (org.gradle.api.DefaultTask)
                  |    |    +--- :compileJava                     (org.gradle.api.tasks.compile.JavaCompile)
                  |    |    `--- :processResources                (org.gradle.language.jvm.tasks.ProcessResources)
                  |    `--- :compileJava                          (org.gradle.api.tasks.compile.JavaCompile)
                  `--- :processTestResources                      (org.gradle.language.jvm.tasks.ProcessResources)
   ```
   
   
   
   
   


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


[GitHub] [kafka] ijuma commented on pull request #13205: KAFKA-14680: gradle version upgrade 7 -->> 8

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

   @dejan2609 I added a few cleanups here: https://github.com/ijuma/kafka/commit/9c6ae575276e673f39d188d42a332f9f0b07d2d0
   
   If you agree with them, please integrate into your PR.


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


[GitHub] [kafka] ijuma commented on pull request #13205: KAFKA-14680: gradle version upgrade 7 -->> 8

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

   Yeah, that's a security feature. I suggest filing a JIRA about disabling spotlessScalaCheck with the rationale and have a single PR for that change.


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


[GitHub] [kafka] dejan2609 commented on pull request #13205: KAFKA-14680: gradle version upgrade 7 -->> 8

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

   🤔 Interesting, altough 'spotlessScalaCheck' is removed out of Jenkinsfile that task is still executed on Jenkins: 
   
   ![image](https://user-images.githubusercontent.com/19467899/219359449-7a6c03fa-aad7-46a3-b4b8-c4ec3c934dae.png)
   


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


[GitHub] [kafka] dejan2609 commented on pull request #13205: KAFKA-14680: Upgrade gradle version from 7.6 to 8.0.1

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

   > @dejan2609 would you be willing to submit a ticket for the Scala plugin for IntelliJ so it doesn't set `-target` if `-release` is set?
   
   @ijuma ticket is created here: https://youtrack.jetbrains.com/issue/SCL-21039 
   
   
   


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


[GitHub] [kafka] ijuma commented on pull request #13205: KAFKA-14680: Upgrade gradle version from 7.6 to 8.0.1

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

   The `spotlessScala` issue was fixed via #13311.


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


[GitHub] [kafka] dejan2609 commented on pull request #13205: KAFKA-14680: gradle version upgrade 7 -->> 8

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

   Update: gradle wrapper bootstrapping is ok now, but spotless Scala checks are failing... 
   Searching for a solution.


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


[GitHub] [kafka] dejan2609 commented on pull request #13205: KAFKA-14680: Upgrade gradle version from 7.6 to 8.0.1

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

    > @dejan2609 would you be willing to submit a ticket for the Scala plugin for IntelliJ so it doesn't set `-target` if `-release` is set?
   @ijuma  Sure, will do that. 
   
   
   
   
   


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


[GitHub] [kafka] ijuma commented on pull request #13205: KAFKA-14680: gradle version upgrade 7 -->> 8

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

   @dejan2609 We'll wait for the final release, but it's fine to start working through the issues. Looks like the build failed.


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


[GitHub] [kafka] ijuma merged pull request #13205: KAFKA-14680: Upgrade gradle version from 7.6 to 8.0.1

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


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


[GitHub] [kafka] ijuma commented on a diff in pull request #13205: KAFKA-14680: Upgrade gradle version from 7.6 to 8.0.1

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


##########
gradlew:
##########
@@ -32,10 +32,10 @@
 #       Busybox and similar reduced shells will NOT work, because this script
 #       requires all of these POSIX shell features:
 #         * functions;
-#         * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
-#           «${var#prefix}», «${var%suffix}», and «$( cmd )»;
-#         * compound commands having a testable exit status, especially «case»;
-#         * various built-in commands including «command», «set», and «ulimit».
+#         * expansions �$var�, �${var}�, �${var:-default}�, �${var+SET}�,
+#           �${var#prefix}�, �${var%suffix}�, and �$( cmd )�;
+#         * compound commands having a testable exit status, especially �case�;
+#         * various built-in commands including �command�, �set�, and �ulimit�.

Review Comment:
   If you can fix this, I think we can merge this PR.



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


[GitHub] [kafka] dejan2609 commented on pull request #13205: KAFKA-14680: gradle version upgrade 7 -->> 8

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

   @ijuma some findigs: build fails due to issues with gradle wrapper bootstrapping. 
   
   I will post more details today. 


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


[GitHub] [kafka] dejan2609 commented on pull request #13205: KAFKA-14680: gradle version upgrade 7 -->> 8

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

   It seems that Spotless Gradle plugin needs to be alligned with Gradle 8.0 (I filed a ticket here: https://github.com/diffplug/spotless/issues/1572)
   
   Thing is that they dropped support for direct Java 8 builds: https://github.com/diffplug/spotless/blob/main/plugin-gradle/CHANGES.md#6140---2023-01-26 (their suggestion for other teams is to use Java cross compilation: https://docs.gradle.org/8.0/userguide/building_java_projects.html#sec:java_cross_compilation).
   
   Kafka obviously still needs to build artifacts against Java 8, so maybe it would be a good idea to use Spotless team suggestion.
   
   All-in-all, herewith a plan for a Gradle 7 -->> 8 upgrade:
   - spotless team will release Gradle 8.0 compatible version (most probably they will not backport solution into spotless gradle 6.13.x line)
   - in parallel I can try to drop JDK 8 usage (note: Java 8 compatible artifacts will still be generated)
   - when we make sure that Java cross compilation works we can come back to this PR and bump Gradle (and Spotless plugin version to 6.15+).
   
   @ijuma If it is ok with you I can start working towards this solution.


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


[GitHub] [kafka] ijuma commented on pull request #13205: KAFKA-14680: gradle version upgrade 7 -->> 8

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

   Gradle 8 has been released. Have you been able to figure out why the build is failing?


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


[GitHub] [kafka] dejan2609 commented on pull request #13205: KAFKA-14680: gradle version upgrade 7 -->> 8

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

   @ijuma Good news, it seems that I managed to provide a workaround for Gradle 8.0.1 (and across all JDK/Scala versions that Apache Kafka uses and the moment).
   I still need to test few more time and after that will mode this PR from _draft_ to _ready for review_.
   
   **Big** shoutout  for @ljacomet from Gradle team, he went over and above during investigation 🎉 


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


[GitHub] [kafka] dejan2609 commented on pull request #13205: KAFKA-14680: gradle version upgrade 7 -->> 8

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

   @inglor thanx for stopping by, any insight or help is much appreciated! 
   
   @ijuma I scrapped fast solution that, suprisingly enough, works (at least compilation is succesful, that is). 
   
   I tested locally across entire matrix: JDK 8/11/17 x Scala 2.12/13 (with ./gradlew -PscalaVersion=2.1X clean jar) and all builds are fine. 
   
   Still need to spend some time with this to doublecheck and maybe even to compare compilation console output (trunk vs. this PR).


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


[GitHub] [kafka] inglor commented on pull request #13205: KAFKA-14680: gradle version upgrade 7 -->> 8

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

   @ijuma Thanks for the pointer - I have missed that.
   @dejan2609 I can confirm your cdbb59fad79b4296b2095417274050b7f1ea1698 works fine (as in it compiles the scala code) for
   
   **Gradle version 8.0.1:**
   
   |            | Scala 2.12       | Scala 2.13       |
   |------------|------------------|------------------|
   | JDK 8      |:white_check_mark:|:white_check_mark:|
   | JDK 11     |:white_check_mark:|:white_check_mark:|
   | JDK 17     |:white_check_mark:|:white_check_mark:|


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


[GitHub] [kafka] dejan2609 commented on pull request #13205: KAFKA-14680: gradle version upgrade 7 -->> 8

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

   Update: there are some new issues with Gradle 8.0.1; I will try to investigate that also.


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


[GitHub] [kafka] dejan2609 commented on pull request #13205: KAFKA-14680: gradle version upgrade 7 -->> 8

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

   @ijuma changes are integrated (please remember that https://github.com/apache/kafka/pull/13263 needs to be merged prior to this one).


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


[GitHub] [kafka] dejan2609 commented on pull request #13205: KAFKA-14680: Upgrade gradle version from 7.6 to 8.0.1

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

   @chia7712 I just pushed PR that (hopefully) solves this regression, feel free to check 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


[GitHub] [kafka] dejan2609 commented on pull request #13205: KAFKA-14680: gradle version upgrade 7 -->> 8

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

   Related to #13199 
   
   Thanx for heads up @ijuma 


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


[GitHub] [kafka] dejan2609 commented on pull request #13205: KAFKA-14680: gradle version upgrade 7 -->> 8

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

   @ijuma yes, somehow build  on Jenkins fails to start, I will rebase and then test on my local box (with Windows/Linux).


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


[GitHub] [kafka] ijuma commented on pull request #13205: KAFKA-14680: gradle version upgrade 7 -->> 8

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

   Thanks @dejan2609. I still prefer the path I described here:
   
   > https://github.com/gradle/gradle/issues/23962#issuecomment-1439115365
   
   Do you know if that works?


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


[GitHub] [kafka] ijuma commented on pull request #13205: KAFKA-14680: gradle version upgrade 7 -->> 8

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

   @dejan2609 Good catch. I fixed it in the same branch. And tested with Scala 2.12 and 2.13.


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


[GitHub] [kafka] ijuma commented on a diff in pull request #13205: KAFKA-14680: Upgrade gradle version from 7.6 to 8.0.1

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


##########
gradlew:
##########
@@ -32,10 +32,10 @@
 #       Busybox and similar reduced shells will NOT work, because this script
 #       requires all of these POSIX shell features:
 #         * functions;
-#         * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
-#           «${var#prefix}», «${var%suffix}», and «$( cmd )»;
-#         * compound commands having a testable exit status, especially «case»;
-#         * various built-in commands including «command», «set», and «ulimit».
+#         * expansions �$var�, �${var}�, �${var:-default}�, �${var+SET}�,
+#           �${var#prefix}�, �${var%suffix}�, and �$( cmd )�;
+#         * compound commands having a testable exit status, especially �case�;
+#         * various built-in commands including �command�, �set�, and �ulimit�.

Review Comment:
   Something weird happened here. When I run `./gradlew wrapper on my computer, it generates the following diff:
   
   ![image](https://user-images.githubusercontent.com/24747/220931022-f29cda04-957b-4f91-adea-05a0946415d4.png)
   



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


[GitHub] [kafka] dejan2609 commented on a diff in pull request #13205: KAFKA-14680: Upgrade gradle version from 7.6 to 8.0.1

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


##########
gradlew:
##########
@@ -32,10 +32,10 @@
 #       Busybox and similar reduced shells will NOT work, because this script
 #       requires all of these POSIX shell features:
 #         * functions;
-#         * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
-#           «${var#prefix}», «${var%suffix}», and «$( cmd )»;
-#         * compound commands having a testable exit status, especially «case»;
-#         * various built-in commands including «command», «set», and «ulimit».
+#         * expansions �$var�, �${var}�, �${var:-default}�, �${var+SET}�,
+#           �${var#prefix}�, �${var%suffix}�, and �$( cmd )�;
+#         * compound commands having a testable exit status, especially �case�;
+#         * various built-in commands including �command�, �set�, and �ulimit�.

Review Comment:
   From the top of my head this may be related with zero width characters or something od that sort (https://github.com/microsoft/terminal/issues/11850) 
   
   Thing is that I am constantly switching from Windows to Linux and back, and this commit was created in Windows.
   
   In any case, thank you for solving this.



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


[GitHub] [kafka] chia7712 commented on pull request #13205: KAFKA-14680: Upgrade gradle version from 7.6 to 8.0.1

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

   Should we disable `spotlessScala` temporarily? otherwise, the Gradle task related to `spotlessScala` can't work. For example, the common command `./gradlew clean build -x test`.


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


[GitHub] [kafka] ijuma commented on pull request #13205: KAFKA-14680: gradle version upgrade 7 -->> 8

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

   An alternative would be to drop spotless until we drop support for Java 8 (Apache Kafka 4.0). What actually uses spotless today?


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


[GitHub] [kafka] dejan2609 commented on pull request #13205: KAFKA-14680: gradle version upgrade 7 -->> 8

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

   At the moment spotless is used via Jenkins CI server :arrow_right: Jenkinsfile 'spotlessScalaCheck' task execution: https://github.com/apache/kafka/blob/3.4.0/Jenkinsfile#L23
   
   My suggestion is to:
   - remove 'spotlessScalaCheck' out of Jenkinsfile 
   - put some comments into build.gradle that would prevent others from changing anything related to spotless until Kafka 4.0 comes into play (i.e. after Java 8 is dropped):
      - plugin definition: https://github.com/apache/kafka/blob/3.4.0/build.gradle#L33
      - plugin configuration: https://github.com/apache/kafka/blob/3.4.0/build.gradle#L47
   
   Note: this PR already removes task [dependency](https://github.com/apache/kafka/blob/3.4.0/build.gradle#L2084).


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


[GitHub] [kafka] inglor commented on pull request #13205: KAFKA-14680: gradle version upgrade 7 -->> 8

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

   > Thanks @dejan2609. I still prefer the path I described here:
   > 
   > > [gradle/gradle#23962 (comment)](https://github.com/gradle/gradle/issues/23962#issuecomment-1439115365)
   > 
   > Do you know if that works?
   
   Hi @ijuma , 
   
   just to pitch in that setting `-release` on scala `2.13` is producing same error
   `[Error] : -target is deprecated: Use -release instead to compile against the correct platform API.`
   
   ```
   diff --git a/build.gradle b/build.gradle
   --- a/build.gradle	(revision 2e1947d240607d53f071f61c875cfffc3fec47fe)
   +++ b/build.gradle	(date 1677025069098)
   @@ -684,7 +684,7 @@
        }
    
        // Scalac's `-release` requires Java 9 or higher
   -    if (JavaVersion.current().isJava9Compatible())
   +    if (versions.baseScala == '2.13')
          scalaCompileOptions.additionalParameters += ["-release", minJavaVersion]
    
        configure(scalaCompileOptions.forkOptions) {
   
   ```
   
   PS: Encountered this error while trying to package `kafka` for Arch Linux which has latest gradle version `8.0.1`


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


[GitHub] [kafka] dejan2609 commented on pull request #13205: KAFKA-14680: gradle version upgrade 7 -->> 8

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

   Got it @ijuma 
   
   I will also add  jacoco minor version bump: 0.8.7 -->> 0.8.8 in order to use same version as in Gradle 8.0.1:
   https://docs.gradle.org/8.0.1/userguide/jacoco_plugin.html#sec:configuring_the_jacoco_plugin
   
   Will squash/rebase on trunk and force-push.


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


[GitHub] [kafka] ijuma commented on pull request #13205: KAFKA-14680: Upgrade gradle version from 7.6 to 8.0.1

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

   @dejan2609 I merged #13263 and updated the PR description. Please take a look.


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


[GitHub] [kafka] ijuma commented on pull request #13205: KAFKA-14680: Upgrade gradle version from 7.6 to 8.0.1

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

   I pushed a commit that reverts part of my previous commit. We need to set `sourceCompatibility` and `targetCompatibility` to workaround an issue affecting the Scala plugin for IntelliJ. We're back to:
   
   > ``<parameter value="-target:jvm-1.8" />``
   
   This is still a problem since this is deprecated in newer Scala versions, but this PR doesn't make it worse.
   
   @dejan2609 would you be willing to submit a ticket for the Scala plugin for IntelliJ so it doesn't set `-target` if `-release` is set?


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


[GitHub] [kafka] chia7712 commented on pull request #13205: KAFKA-14680: Upgrade gradle version from 7.6 to 8.0.1

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

   @dejan2609 thanks for nice explanation!
   
   That is why I suggested to disable spotlessScala from build.gradle :)


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


[GitHub] [kafka] dejan2609 commented on pull request #13205: KAFKA-14680: Upgrade gradle version from 7.6 to 8.0.1

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

   @ijuma please review Scala plugin for Intellij ticket (link above); I need some help to provide reproducer. 


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