[ 
https://issues.apache.org/jira/browse/CASSANDRA-18190?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ekaterina Dimitrova updated CASSANDRA-18190:
--------------------------------------------
    Test and Documentation Plan: 
Replacement of ant eclipse-warnings by a new task using the CheckerFramework is 
happening as part of CASSANDRA-18239.

Thus, I upgraded ecj to the latest possible version that supports both JDK11 
and 17 for the Java UDFs and removed ant eclipse-warnings (including 
eclipse_compiler.properties). I do not entirely remove the ant target from 
build.xml. I left a fake empty task to confuse Jenkins as there are ongoing 
changes for trunk and cassandra-builds, so I decided to make changes there when 
the concurrent changes related to moving in-tree the build scripts for trunk 
are done. Though I removed the task from CircleCI as that was quick and easy. I 
will open a follow-up task for Jenkins. 

I did not find a changelog so I looked into the ECJ changes here - 
[https://github.com/eclipse-jdt/eclipse.jdt.core/compare/R4_6_maintenance...R4_27_maintenance]
We will be able to commit the patch to trunk when we drop JDK8 as the new 
version is JDK11+.
All tests pass. I did minor changes:
 - added the new methods of ICompilationUnit to our implementation - 
ECJCompilationUnit. At this point I think keeping the unnamed module Is fine 
for us.
 - Bumped the version of CompilerOptions to 11
The compiler has added enablePreviewFeatures, enableJdtDebugCompileMode, 
ignoreUnnamedModuleForSplit which are false by default. I keep this as I do not 
believe we want to enable those. I also kept the ReportDeprecations untouched - 
it is enabled by default.

CI looks good and fixes the two tests that were reported broken with JDK17 as 
our ECJ version was not supporting JDK17. 
(org.apache.cassandra.cql3.validation.entities.UFJavaTest, 
org.apache.cassandra.cql3.validation.entities.UFSecurityTest)
CircleCI run #2380

CI: 
[https://app.circleci.com/pipelines/github/ekaterinadimitrova2/cassandra?branch=18190-udf]

PR: [https://github.com/apache/cassandra/pull/2429] 

I also tested locally the fake task that it completes successfully without 
running anything.

  was:
Replacement of ant eclipse-warnings by a new task using the CheckerFramework is 
happening as part of CASSANDRA-18239.

Thus, I upgraded ecj to the latest possible version that supports both JDK11 
and 17 for the Java UDFs and removed ant eclipse-warnings (including 
eclipse_compiler.properties). I do not entirely remove the ant target from 
build.xml. I left a fake empty task to confuse Jenkins as there are ongoing 
changes for trunk and cassandra-builds, so I decided to make changes there when 
the concurrent changes related to moving in-tree the build scripts for trunk 
are done. Though I removed the task from CircleCI as that was quick and easy. I 
will open a follow-up task for Jenkins. 

I did not find a changelog so I looked into the ECJ changes here - 
[https://github.com/eclipse-jdt/eclipse.jdt.core/compare/R4_6_maintenance...R4_27_maintenance]
We will be able to commit the patch to trunk when we drop JDK8 as the new 
version is JDK11+.
All tests pass. I did minor changes:
 - added the new methods of ICompilationUnit to our implementation - 
ECJCompilationUnit. At this point I think keeping the unnamed module Is fine 
for us.
 - Bumped the version of CompilerOptions to 11
The compiler has added enablePreviewFeatures, enableJdtDebugCompileMode, 
ignoreUnnamedModuleForSplit which are false by default. I keep this as I do not 
believe we want to enable those. I also kept the ReportDeprecations untouched - 
it is enabled by default.

CI looks good and fixes the two tests that were reported broken with JDK17 as 
our ECJ version was not supporting JDK17. 
(org.apache.cassandra.cql3.validation.entities.UFJavaTest, 
org.apache.cassandra.cql3.validation.entities.UFSecurityTest)
CircleCI run #2380

CI: 
[https://app.circleci.com/pipelines/github/ekaterinadimitrova2/cassandra?branch=18190-udf]

PR: [https://github.com/apache/cassandra/pull/2429] 


> ECJ upgrade
> -----------
>
>                 Key: CASSANDRA-18190
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-18190
>             Project: Cassandra
>          Issue Type: Task
>          Components: Feature/UDF
>            Reporter: Ekaterina Dimitrova
>            Assignee: Ekaterina Dimitrova
>            Priority: Normal
>             Fix For: 5.x
>
>
> During testing it was identified that we will need to update ECJ for the Java 
> UDF functions in order to bring Java 17 in.
> It seems the compiler artifacts are moved from 
> [here|https://mvnrepository.com/artifact/org.eclipse.jdt.core.compiler/ecj] 
> to [here|https://mvnrepository.com/artifact/org.eclipse.jdt/ecj] and there is 
> change of license from EPL1.0 to EPL2.0 too. But if I read correctly 
> [here|https://www.apache.org/legal/resolved.html#weak-copyleft-licenses] that 
> should not affect us
> Further testing and review of all changes between artifacts to be done.
> ECJ is used for the eclipse-warnings and Java UDFs
> As agreed on the [dev mailing 
> list|https://lists.apache.org/thread/8ok01odwx79crxw45cnfh0n1j4nsf9cp] we 
> will replace eclipse-warnings in trunk with CheckerFramework equivalent one 
> but better.
> So as part of this ticket we are removing ant eclipse-warnings task and 
> upgrading ecj for Java UDFs.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org

Reply via email to