-
Notifications
You must be signed in to change notification settings - Fork 139
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
DRAFT: Make AST map pre 1.8 versions to 1.8 #3533
base: master
Are you sure you want to change the base?
Conversation
@iloveeclipse What do you think? |
Jenkins is not accessible, how many test fails are there? I'm not AST expert, I can only remember I've tried to use latest AST in JDT debug and that failed with tons of errors... |
Jenkins issue is https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/issues/5498 . My question is more about the goal not that much about the work involved ( I know it will require quite some). |
I assume working with "old" level AST for Java version we don't support anymore should be more of academic interest? I don't know if consumers like Xtext use AST at some minimal JLS level internally and expect us to keep it going forever. @szarnekow ?
I see I've finally managed to fix it: eclipse-jdt/eclipse.jdt.debug#109, so that should be fine. |
@iloveeclipse FYI, there are no test failures, presumably because the maps changes make tests run with 1.8 level which all the tests are supposedly succeeding with. |
Cool. |
May I assume that if @szarnekow (or someone else ) doesn't raise serious concern this approach if fine to proceed with? |
@mpalat, @srikanth-sankaran, @jarthana , @noopur2507 : any objections? |
@akurtakov : looking at the code, you only touched the mapping. But the AST constructor still uses
Do you plan to update this as well? |
Yes, I do. Also cleaning the tests to not run old compliance e.g jls2 compliance ( Line 621 in 0c3986b
Line 628 in 0c3986b
|
I have none from jdt.core pov. Still would be good to hear from @noopur2507 on how this affect the UI. |
I don't see any concerns with this approach from the UI side. However, updates or cleaning up the usage of old AST levels will be needed. Also, the AST view can be updated to support only 1.8 and above. It will be good to run the UI and Debug tests as well with this PR before the merge. |
As the compiler mandates 1.8 already it makes sense for the AST to do the same.
no |
case JavaCore.VERSION_1_3: return AST.JLS8; | ||
case JavaCore.VERSION_1_4: return AST.JLS8; | ||
case JavaCore.VERSION_1_5: return AST.JLS8; | ||
case JavaCore.VERSION_1_6: return AST.JLS8; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This may not be a correctness issue - but I see the case for VERSION_1_7 is dropped - why
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My bad. I'll actually start an enhancement to AST (in separate PR) adding getAllJLSVersionsSupported/isSupportedJLSVersions/etc. mimicking JavaCore methods so we can have a more consistent API rather than this wild refering of constants like in https://github.com/eclipse-jdt/eclipse.jdt.ui/blob/41eae491f2720d3febbc0063ee644b01f0e5bb40/org.eclipse.jdt.astview/src/org/eclipse/jdt/astview/views/ASTView.java#L507 . And this part will be rewritten based on it.
No objections. Minor review comment added. |
As the compiler mandates 1.8 already it makes sense for the AST to do the same.