Meanwhile I checked the code the root cause of the behavior above is upgrade of checkstyle version from 6.18 to 10.3.2 [1] which happened in 1.23.0, i.e. it is reproducible with 1.23.0
in this case, please correct me if I'm wrong, this should not be considered as a blocker [1] https://issues.apache.org/jira/browse/CALCITE-5329 On Mon, Nov 27, 2023 at 9:53 PM Sergey Nuyanzin <[email protected]> wrote: > I created a PR[1] > The main idea is to introduce another property jdk8.checkstyle which is > set to 9.3 > before resolving dependency for checkstyle it checks the current java > version. In case of 1.8 it uses new property otherwise the old one > new property also allows to keep ability to change version for jdk8 from > command line in case it is required as "-Pjdk8.checkstyle.version=X.Y" > > Also it allows to compile with jdk 8, 11, 17 without explicitly set > checkstyle version > > [1] https://github.com/apache/calcite-avatica/pull/233 > > On Mon, Nov 27, 2023 at 8:05 PM Istvan Toth <[email protected]> > wrote: > >> Can someone who knows Gradel make a patch to get Gradle to set >> -Pcheckstyle.version=9.3 when it detects Java 1.8 ? >> This is super simple in Maven with profiles, I expect that it should not >> be >> very hard in Gradle either. >> >> Also, I don't think that the exact JVM patch level has anything to do with >> this, as long as it's Java 1.8. >> >> Istvan >> >> On Mon, Nov 27, 2023 at 4:05 PM Guillaume Masse >> <[email protected]> wrote: >> >> > Hi, >> > >> > latest jdk 8 is 8u391, 8u371 is two version behind. >> > >> > >> https://www.oracle.com/java/technologies/javase/8all-relnotes.html#R8u391-BPR >> > >> > >> > >> > >> > On Mon, Nov 27, 2023 at 4:21 AM Istvan Toth <[email protected] >> > >> > wrote: >> > >> > > -1 (non binding) >> > > >> > > I have successfully built and run the PQS test suite with the Avatica >> RC >> > > with Java 11. >> > > (I had to tweak the PQS maven setup a bit, but that's not Avatica's >> > fault) >> > > >> > > When I tried to do the same with Java 8, I ran into the issues >> mentioned >> > > above. >> > > I was able to hack around the checkstyle/autostyle issue by removing >> them >> > > from gradle build files, but then I got: >> > > >> > > ============================================== >> > > FAILURE: Build failed with an exception. >> > > >> > > * Where: >> > > Build file >> > > >> > > >> > >> '/home/stoty/workspaces/apache-phoenix/calcite-avatica/release/build.gradle.kts' >> > > line: 213 >> > > >> > > * What went wrong: >> > > Task with name 'assemble' not found in project ':release'. >> > > ============================================== >> > > and I wasn't able to get any further. (I am no Gradle expert) >> > > >> > > Phoenix still supports Java 8, so we need the public artifacts to be >> > Java 8 >> > > compatible. >> > > I imagine Phoenix is not the only project that still supports Java 8. >> > > >> > > While Avatica is built with >> > > >> > > sourceCompatibility = JavaVersion.VERSION_1_8 >> > > >> > > targetCompatibility = JavaVersion.VERSION_1_8 >> > > It does not seem to set the boot classpath, which does not guarantee >> > actual >> > > backwards compatibility. >> > > Depending on the Java APIs used, the generated code may or may not >> work >> > on >> > > Java 8 JVMs. >> > > >> > > The easy workaround is to use the -release flag instead, but that >> doesn't >> > > work on Java 8, so this needs >> > > some hacking of the build system. >> > > >> > > best regards >> > > Istvan >> > > >> > > >> > > On Mon, Nov 27, 2023 at 7:13 AM Benchao Li <[email protected]> >> wrote: >> > > >> > > > Thanks Francis for pointing it out, '-Pcheckstyle.version=9.3' works >> > > fine. >> > > > >> > > > My vote is +1 (binding). >> > > > >> > > > Francis Chuang <[email protected]> 于2023年11月27日周一 13:12写道: >> > > > > >> > > > > I think we need to force an older version of Checkstyle when using >> > > JDK8. >> > > > > See: >> > > > > >> > > > >> > > >> > >> https://issues.apache.org/jira/browse/CALCITE-5329?focusedCommentId=17628456&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-17628456 >> > > > > >> > > > > On 27/11/2023 3:55 pm, Benchao Li wrote: >> > > > > > - Verified checksum and signature (OK) >> > > > > > - Gone through release note (OK) >> > > > > > - Diffed source release with git repo (OK) >> > > > > > - Checked files in Nexus (OK) >> > > > > > - Compile and test sources with JDK8 (NOT SURE) >> > > > > > >> > > > > > While compiling the sources with JDK8, I've encountered: >> > > > > > $java -version >> > > > > > java version "1.8.0_371" >> > > > > > Java(TM) SE Runtime Environment (build 1.8.0_371-b11) >> > > > > > Java HotSpot(TM) 64-Bit Server VM (build 25.371-b11, mixed mode) >> > > > > > $./gradlew build >> > > > > > FAILURE: Build completed with 5 failures. >> > > > > > >> > > > > > 1: Task failed with an exception. >> > > > > > ----------- >> > > > > > * What went wrong: >> > > > > > Execution failed for task ':metrics:checkstyleMain'. >> > > > > >> A failure occurred while executing >> > > > org.gradle.api.plugins.quality.internal.CheckstyleAction >> > > > > > > com/puppycrawl/tools/checkstyle/ant/CheckstyleAntTask has >> > been >> > > > > > compiled by a more recent version of the Java Runtime (class >> file >> > > > > > version 55.0), this version of the Java Runtime only recognizes >> > class >> > > > > > file versions up to 52.0 >> > > > > > >> > > > > > Francis Chuang <[email protected]> 于2023年11月27日周一 >> 07:54写道: >> > > > > >> >> > > > > >> Hi all, >> > > > > >> >> > > > > >> I have created a build for Apache Calcite Avatica 1.24.0, >> release >> > > > > >> candidate 0. >> > > > > >> >> > > > > >> Thanks to everyone who has contributed to this release. >> > > > > >> >> > > > > >> You can read the release notes here: >> > > > > >> >> > > > >> > > >> > >> https://github.com/apache/calcite-avatica/blob/avatica-1.24.0-rc0/site/_docs/history.md >> > > > > >> >> > > > > >> The commit to be voted upon: >> > > > > >> >> > > > >> > > >> > >> https://gitbox.apache.org/repos/asf?p=calcite-avatica.git;a=commit;h=01a7a9e956b3fe8ad999a5b82e5d9924434cb309 >> > > > > >> >> > > > > >> Its hash is 01a7a9e956b3fe8ad999a5b82e5d9924434cb309 >> > > > > >> >> > > > > >> Tag: >> > > > > >> >> https://github.com/apache/calcite-avatica/tree/avatica-1.24.0-rc0 >> > > > > >> >> > > > > >> The artifacts to be voted on are located here: >> > > > > >> >> > > > >> > > >> > >> https://dist.apache.org/repos/dist/dev/calcite/apache-calcite-avatica-1.24.0-rc0 >> > > > > >> >> > > > > >> The hashes of the artifacts are as follows: >> > > > > >> >> > > > >> > > >> > >> 927707b23a1338105fbb9d0a9a1836baf3e95e20002407b483b8f663927c5d41d844b2a09ec2cd1e580ae2e29d930ad32ee308d0d04550c35d8daefa7ad777c3 >> > > > > >> *apache-calcite-avatica-1.24.0-src.tar.gz >> > > > > >> >> > > > > >> A staged Maven repository is available for review at: >> > > > > >> >> > > > >> > > >> > >> https://repository.apache.org/content/repositories/orgapachecalcite-1221/org/apache/calcite/ >> > > > > >> >> > > > > >> Release artifacts are signed with the following key: >> > > > > >> https://people.apache.org/keys/committer/francischuang.asc >> > > > > >> https://www.apache.org/dist/calcite/KEYS >> > > > > >> >> > > > > >> To create the jars and test Apache Calcite Avatica: "gradle >> build >> > > > > >> -Prelease -PskipSign". >> > > > > >> >> > > > > >> If you do not have a Java/Gradle environment available, you can >> > run >> > > > the >> > > > > >> tests using docker. To do so, install docker and >> docker-compose, >> > > then >> > > > > >> run "docker-compose run test" from the root of the directory. >> > > > > >> >> > > > > >> Please vote on releasing this package as Apache Calcite Avatica >> > > > 1.24.0. >> > > > > >> >> > > > > >> The vote is open for the next 72 hours and passes if a >> majority of >> > > at >> > > > > >> least three +1 PMC votes are cast. >> > > > > >> >> > > > > >> [ ] +1 Release this package as Apache Calcite Avatica 1.24.0 >> > > > > >> [ ] 0 I don't feel strongly about it, but I'm okay with the >> > release >> > > > > >> [ ] -1 Do not release this package because... >> > > > > >> >> > > > > >> >> > > > > >> Here is my vote: >> > > > > >> >> > > > > >> +1 (binding) >> > > > > >> >> > > > > >> Francis >> > > > > > >> > > > > > >> > > > > > >> > > > >> > > > >> > > > >> > > > -- >> > > > >> > > > Best, >> > > > Benchao Li >> > > > >> > > >> > > >> > > -- >> > > *István Tóth* | Sr. Staff Software Engineer >> > > *Email*: [email protected] >> > > cloudera.com <https://www.cloudera.com> >> > > [image: Cloudera] <https://www.cloudera.com/> >> > > [image: Cloudera on Twitter] <https://twitter.com/cloudera> [image: >> > > Cloudera on Facebook] <https://www.facebook.com/cloudera> [image: >> > Cloudera >> > > on LinkedIn] <https://www.linkedin.com/company/cloudera> >> > > ------------------------------ >> > > ------------------------------ >> > > >> > >> >> >> -- >> *István Tóth* | Sr. Staff Software Engineer >> *Email*: [email protected] >> cloudera.com <https://www.cloudera.com> >> [image: Cloudera] <https://www.cloudera.com/> >> [image: Cloudera on Twitter] <https://twitter.com/cloudera> [image: >> Cloudera on Facebook] <https://www.facebook.com/cloudera> [image: >> Cloudera >> on LinkedIn] <https://www.linkedin.com/company/cloudera> >> ------------------------------ >> ------------------------------ >> > > > -- > Best regards, > Sergey > -- Best regards, Sergey
