eclipse-jdt / eclipse.jdt.debug

Eclipse Public License 2.0
16 stars 47 forks source link

[22] Merge BETA_JAVA22 to master #2167 #411

Closed jarthana closed 6 months ago

jarthana commented 6 months ago

What it does

Fixes https://github.com/eclipse-jdt/eclipse.jdt.core/issues/2167

How to test

Author checklist

jukzi commented 6 months ago

@jarthana the checks had shown an error which now is on master https://ci.eclipse.org/jdt/job/eclipse.jdt.debug-Github/job/master/63/

[INFO] eclipse.jdt.debug 4.32.0-SNAPSHOT .................. SUCCESS [  3.645 s]
[INFO] [bundle] JDI Debug Model 3.21.400-SNAPSHOT ......... SUCCESS [ 54.779 s]
[INFO] org.eclipse.jdt.launching 3.21.200-SNAPSHOT ........ FAILURE [ 10.502 s]
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  02:33 min
[INFO] Finished at: 2024-03-20T09:39:17Z
[INFO] ------------------------------------------------------------------------
Error:  Failed to execute goal org.eclipse.tycho:tycho-compiler-plugin:4.0.7-SNAPSHOT:compile (default-compile) on project org.eclipse.jdt.launching: Compilation failure: Compilation failure: 
Error:  /home/runner/work/eclipse.jdt.debug/eclipse.jdt.debug/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/EECompilationParticipant.java:[237] 
Error:      } else if (version.startsWith(JavaCore.VERSION_22)) {
Error:                                             ^^^^^^^^^^
Error:  VERSION_22 cannot be resolved or is not a field
jarthana commented 6 months ago

@jarthana the checks had shown an error which now is on master https://ci.eclipse.org/jdt/job/eclipse.jdt.debug-Github/job/master/63/

[INFO] eclipse.jdt.debug 4.32.0-SNAPSHOT .................. SUCCESS [  3.645 s]
[INFO] [bundle] JDI Debug Model 3.21.400-SNAPSHOT ......... SUCCESS [ 54.779 s]
[INFO] org.eclipse.jdt.launching 3.21.200-SNAPSHOT ........ FAILURE [ 10.502 s]
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  02:33 min
[INFO] Finished at: 2024-03-20T09:39:17Z
[INFO] ------------------------------------------------------------------------
Error:  Failed to execute goal org.eclipse.tycho:tycho-compiler-plugin:4.0.7-SNAPSHOT:compile (default-compile) on project org.eclipse.jdt.launching: Compilation failure: Compilation failure: 
Error:  /home/runner/work/eclipse.jdt.debug/eclipse.jdt.debug/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/EECompilationParticipant.java:[237] 
Error:    } else if (version.startsWith(JavaCore.VERSION_22)) {
Error:                                           ^^^^^^^^^^
Error:  VERSION_22 cannot be resolved or is not a field

This requires the matching jdt.core change, which is already in master. Next I build should have all the relevant changes, hopefully.

jukzi commented 6 months ago

When jdt.core adds API that another bundle uses the updated bundle version should be used. i.e. /org.eclipse.jdt.launching/META-INF/MANIFEST.MF should now require org.eclipse.jdt.core 3.38

jarthana commented 6 months ago

When jdt.core adds API that another bundle uses the updated bundle version should be used. i.e. /org.eclipse.jdt.launching/META-INF/MANIFEST.MF should now require org.eclipse.jdt.core 3.38

I see this now - org.eclipse.jdt.core;bundle-version="[3.34.0,4.0.0)", Why is this not good enough?

jukzi commented 6 months ago

It pretends launching would compile and run with 3.34. It does not anymore. Normally you would not recognize the error when just using only latest bundles. But sometimes people (or CI Jobs;-)) try to use old versions.

jarthana commented 6 months ago

It pretends launching would compile and run with 3.34. It does not anymore. Normally you would not recognize the error when just using only latest bundles. But sometimes people (or CI Jobs;-)) try to use old versions.

So, what do you suggest? [3.38.0,4.0.0) like we have in jdt.ui or just "3.38.0"? And why is this a problem only now? We seem to be having 3.34 for a while now?

jukzi commented 6 months ago

javadoc of JavaCore.VERSION_22 states it was added @since 3.38, so "3.38" should be fine.

jukzi commented 6 months ago

And why is this a problem only now? We seem to be having 3.34 for a while now?

I can only guess, that it already was wrong, but did not became visible since nobody tried it- So that it worked by chance

SarikaSinha commented 6 months ago

We don't restrict it to a version like 3.38 as JDT Core can increase to 3.39 but no impact on launching. so please keep the range of [3.38.0,4.0.0)