-
Notifications
You must be signed in to change notification settings - Fork 161
[WIP][Experimental][Known to fail] Rewire lambda expression in the proper place in the grammar hierarchy #4667
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
base: master
Are you sure you want to change the base?
Conversation
srikanth-sankaran
commented
Dec 1, 2025
- Lambdas are not primary expressions, but are top level expressions
- Align grammar productions to match with JLS
- Note: All the scanner and parser magic handshake via Vanguard parser and various synthetic tokens are untouched. (so far)
|
The PR as of now has this grammar change - this aligns perfectly with JLS and is LALR(1) (because the various synthetic harbinger terminal tokens that continue to be injected) |
7d0bfa0 to
ddccf4f
Compare
|
An earlier very partial attempt at this can be seen at this at the abandoned PR #1750 |
|
@laeubi @iloveeclipse - for this kind of a report : https://github.com/eclipse-jdt/eclipse.jdt.core/pull/4667/checks?check_run_id=56905329431 where would I access the differing class files ? It is not immediately obvious to me - Thanks for any pointers When the class file comparison fails on an I-build, we get an archive of differing files. Can I get similar data for CI builds ? |
|
You have to click on the "Details" of jenkins/pr-head entry above, and there on the Jenkins build number: https://ci.eclipse.org/jdt/job/eclipse.jdt.core-Github/job/PR-4667/9/ |
Thanks - that is useful. For posterity, this is what I had to do: From the main PR page, I clicked the failing check |
|
OK, those comparator differences are expected and don't account for the 477 tests failures seen in CI. These tests are not failing locally, so something mysterious is happening here |
Not only are these tests not failing locally - they don't fail in an inner eclipse instance launched from a JDT-Core development workspace and into which all jdt source and tests projects are imported as source projects. Plot thickens 🤔 |
|
Here is one interesting observation - all failing tests are from the package |
|
Just a guess
You could run build and tests locally by maven to verify that. |
I would/could readily rule out the first two, the maven run suggestion I will try after resorting to some easier (for me) experiments such as rolling back the last change - these failures started suddenly (earlier there were failures but along expected lines and locally reproducible). I don't see how the last change itself could be connected but it would be a worthwhile exercise to roll back to a cleaner state and move forward. (note to self - I need to stop amending previous commits 😧) |
|
Backing out the recent change still produces the same 477 AIOOBs - I am 100% certain these failures were NOT there before the last one line change to the grammar file - I suspect some flakiness in github CI infra To check all is well, I created a dummy PR #4669 - that fails with: 15:15:13 org.eclipse.jdt.core.tests.compiler.regression.LocalStaticsTest.testBug564557AnnotInterface_001 - 21 |
(Lambdas are not primary expressions, but are top level expressions) All the scanner and parser handshake via Vanguard parser and various synthetic tokens are untouched. (so far)
e5e7e99 to
052d8d5
Compare
|
Updating with some related info on an offline conversation from Srikant:
Additional (maybe useless) info - @srikanth-sankaran : I did a parser generation of the "new" java.g from the Pulled PR. PR looks good - no omissions/delta after the generation as well - this was just to double check. Tests are passing on my machine. Note: Just did a rebuild as well in case it turns out to be a timeout issue |
get retained and don't get tossed away and replaced with baseline!
7bf3900 to
bf4945a
Compare
This calls for a bit more set up and skills than I have readily at my disposal :) @mpalat @jarthana and I did some brainstorming and decided to take the equivalent route of downloading the built bits from github CI infra itself. From https://ci.eclipse.org/jdt/job/eclipse.jdt.core-Github/job/PR-4667/15/artifact/repository/target/, download the zipped bits, explode them and into a clean workspace import these as This establishes the JDT projects in a debuggable workspace exactly incorporating the bits from jenkins. Now I imported the test projects from the target platform and ran the failing tests and voila! I was able to reproduce the problem. Now here is the thing that surprised me totally. When the build reports a class file comparator failure, I always assumed that it is flagging a unchanged source file that has resulted in a changed class file that needed to be validated for the quality gate check to pass and for the PR to be integrated. I had paid scant attention to the part of the diagnostic about the concerned artifact being changed and replaced with the baseline version!!! That step in the present instance replaced valid new changed class file (change due to externally defined inlined constant) with a version with the stale value of the constant. So when class file differences are reported in the checks steps, the required protocol seem to be:
as opposed to:
That the logs contain a very clear message about the artifact being replaced with baseline version is undeniably true, but the assumption that a class file can change only when the corresponding source has changed is a very brittle one! |
|
The tests will take a while to finish but it is good news that I see some of the tests were failing earlier with |
Hoorah! All green - this basically refactors the lambda grammar to align closer with JLS. But would/could such alignment result in some simplifications (such as eliminating synthetic terminal injection or vanguard parser detours) - that is to be taken up next week! |
|
Thanks @iloveeclipse @mpalat @jarthana for your tips and inputs in reproducing the failures seen in Jenkins. Appreciated! |
@stephan-herrmann - I checked with @mpalat and @jarthana about this - they confess to being as surprised as I am. What is your reaction ? |
Already in the past I have been confused about the various baseline-related checks performed by the build. Your latest observation adds to that confusion :) My conclusion: we need to enhance our understanding of what the build does and why.
|