-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I-build 84 fails due to usage of newer than Java 17 construct in bundle with Java 17 BREE #2739
I-build 84 fails due to usage of newer than Java 17 construct in bundle with Java 17 BREE #2739
Comments
I could handle it by moving such problematic bundles to Java 21 so no code changes are needed as the SDK already requires Java 21. |
I think it makes sense to use Java 21, the fact that ECJ has supported this construct ahead of time and that some bundles have started happily using it is a showcase that the construct is desired for current (and even past) development and worth bumping some BREEs. |
+1 for moving the bundle to Java 21 |
+1 move to 21
|
instanceof-pattern is used that often by now, that i would even suggest to move all bundles to 21 |
Jobs is quite central and moving it to Java 21 will make almost all other bundles instantly depend on java 21, so I would be more comfortable in fixing the wrong pattern here instead of moving it to Java 21 for no good reason (e.g. I don't see any benefit for this switch expression used here compared to a "classic" one). So -1 from my side due to the ripple effect in platform! |
@laeubi In this case you would have to fix the known failure, start I-build to uncover whether there are more and repeat till there is successful I-build as you seem to be the only one interested in doing it right now. |
See this, IMO completely useless "improvement" just to save a simple |
A simple aggregator build should uncover the problem equally well: |
This argument seems invalid: other bundles can still use Java 17 as BREE if they're happy with it and could be deployed with an older version of jobs that is still Java-17 able if it's important to them.
The fact that some other people found it valuable when coding is per se a good reason. The fact that you don't use or like that style mustn't be used to diminish the rationale of other people. However, as you started to change the code to keep compatibility with Java 17, that's probably fine merging your changes instead of bumping BREE. I would personally find it a waste of my time if I were to do it; but as long as it's someone else's time, I won't complain... |
Thanks everyone for having jumped in with options as well changes to resolve this. Process question: Is there a better way to have handled such a fix that has a potential for build breakage ? All I did in the present case was (a) satisfied myself that we are not close to a milestone build or late stage of release cycle (b) requested to trigger an early I-build. Is there a better protocol for a co-ordinated move across components that could have been followed or this is it? |
While we can invent new workflows and protocols here, but this case seems very unfrequent and the current protocol (trigger an I-Build just after a compiler change) already has a short and efficient feedback loop IMO. |
I would say this is pretty special case which I don't remember another instance of in all these years which makes it quite hard to catch in any process. |
I have already suggested a while back to make the batch-compiler an own deployable (and releasable!) artifact ... |
As far as I understand the PMC decision, it is fine to move a bundle to Java 21 in case a committer sees an advantage in using the new Java features in this bundle. @akurtakov please correct me if I'm wrong. |
I've suggested eclipse-pde/eclipse.pde#1136 as a way to prove such work but as I never found time for it myself nothing happens :( and we see that improvements happen only when someone actively works on them to drive them to success. |
Yes this "argument" is always given, and mostly by people that think they are not affected, and in theory it would work. In practice actually no one ever will test such combination and they can break at any time due to different reasons. And this issue is actually the perfect example for this, one might argue to "simply" use the older ECJ to resolve the issue here, or "simply" use a newer ECJ in the IDE to see the issue there, but both are not really easy given the current process and strong coupling of components, and bad maintained version ranges (if used at all) and singleton bundles all around. Anyways as expsected this PR show the problem so we don't need a full I-Build to get some confidence we have possibly cached any of those.: |
And where is the "advantage" here? Saving one single local variable in exchange for a WTF moment? Seeing |
That is the case. Still, I am giving opportunity for community members to step up and do the work to keep such compatibilty and as long as this happens without preventing the rest of the community that don't care about Java 17 anymore to continue progressing all is fine IMO. |
Let's keep it open till we have I-build . |
Can you explain what exactly this console log illustrates ? I don't understand. Is it showing that none other than JobManager.java uses the offending construct ? That we don't have to iterate through |
Next failure is :
I'll to the java 21 bump for it as JDT committer. |
Just for the record this seems to be introduced by this commit in the last release. I really wonder how such things can slip through, do we have java 21 compliance by default somewhere? |
NOTE: My (now deleted) regex is not correct, it is only in which the pattern matching when the type is already of the tested one - that was not allowed in Java 17. Not sure how to find theses cases with pattern matching. |
Yes, Alex mentioned that as well. Sorry, sorry, sorry for adding noise that is unhelpful! |
Next failure is (bundle [358/513]):
As this is test bundle I am doing the change now. |
Needed by eclipse-platform/eclipse.platform.releng.aggregator#2739 Fixed deprecated usage of Thread.getId.
Needed by eclipse-platform/eclipse.platform.releng.aggregator#2739 Fixed deprecated usage of Thread.getId.
Needed by eclipse-platform/eclipse.platform.releng.aggregator#2739 Fixed deprecated usage of Thread.getId.
Needed by eclipse-platform/eclipse.platform.releng.aggregator#2739 Fixed deprecated usage of Thread.getId.
Thanks @akurtakov for your conscientious, methodical effort to get us back on track! |
Needed by eclipse-platform/eclipse.platform.releng.aggregator#2739 Fixed deprecated usage of Thread.getId.
Next one (388/513):
|
You are not alone: https://www.youtube.com/watch?v=zg8xM0xxFa8&t=1820s |
https://ci.eclipse.org/platform/job/eclipse.platform.releng.aggregator/job/PR-2740/7/console succeeded. |
Closing. If there are any further issues they are past the build phase so to be handled separately https://download.eclipse.org/eclipse/downloads/drops4/I20250110-1400/ |
Many thanks @akurtakov for driving this to completion. Much obliged. |
Tests finished on two platforms all green and this is all platform independent code. Looking good! (https://download.eclipse.org/eclipse/downloads/drops4/I20250110-1800/) |
In my opinion I think in general it would help if you would run the releng.aggregator build in PRs that change ECJ with the changes of ECJ applied. Similar to like the build for this repo is doing it. This way youl would catch 'breaking' changes even before a PR is submitted. The same would apply for changes that change the produced byte-code and therefore require enforced qualifier bumps. |
As can be seen at https://ci.eclipse.org/releng/job/Builds/job/I-build-4.35/84/console org.eclipse.core.jobs (first issue of unknown number) uses construct that is not allowed in Java 17 (but compiled fine with ECJ till now due to eclipse-jdt/eclipse.jdt.core#3478 ).
The text was updated successfully, but these errors were encountered: