Conversation
msridhar
left a comment
There was a problem hiding this comment.
This is awesome @juliandolby! It will take me a little while to review this; I hope that's ok. A couple of initial slightly nit-picky comments are below.
High-level questions:
- Is the lambda support here intended to be complete? Or are there cases with lambdas that are still not handled?
- Are method references handled at all, or is that a separate effort?
| CAstCallGraphUtil.dumpCG(B.getCFAContextInterpreter(), B.getPointerAnalysis(), CG); | ||
| } | ||
|
|
||
| /* |
There was a problem hiding this comment.
Can we put this change in a separate PR if we really want it? Doesn't seem to relate to Java 8. On Gradle if you want to skip these slow tests you can add the flag -PexcludeSlowTests
There was a problem hiding this comment.
i didn't know about that option... in that case, we likely don't need it.
There was a problem hiding this comment.
Ok, sounds good can we revert to the version in the master branch then?
| org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled | ||
| org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate | ||
| org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 | ||
| org.eclipse.jdt.core.compiler.codegen.targetPlatform=17 |
There was a problem hiding this comment.
I'm not sure if all these changes to the Eclipse config files were intended to be part of this PR. But specifically, we might want to revert these changes that target JDK 17 instead of JDK 11, as WALA still supports running on JDK 11. Otherwise, an Eclipse developer might erroneously not see errors when using Java 17 constructs (though the Gradle build should still fail).
There was a problem hiding this comment.
Ah, that is an oversight due to the fact that much work here requires Java 17. Most likely my Eclipse updated that without my asking. Sorry about that.
There was a problem hiding this comment.
No worries, could you revert the changes to all the Eclipse config files then for this PR?
It is intended to be complete, but whether it really is complete and bug free is another question. We do have two tests of basic functionality, and the implementation relies on the same machinery that supports inner classes. However, more rigorous testing would be a good thing.
This request is focused on lambda expressions. But aren't method references and their friends mostly a library thing anyway? The existing support for them in bytecode might be sufficient... |
And now we have a third test, and needed fixes... |
A method reference is something like |
Ah yes. We have not (yet) attempted to handle those. |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #1507 +/- ##
============================================
+ Coverage 50.15% 50.20% +0.05%
- Complexity 12632 12652 +20
============================================
Files 1365 1365
Lines 85113 85204 +91
Branches 14717 14732 +15
============================================
+ Hits 42691 42780 +89
+ Misses 37630 37628 -2
- Partials 4792 4796 +4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
msridhar
left a comment
There was a problem hiding this comment.
Hoping we can clean up a couple high-level things and then I can glance through the code more easily
| org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled | ||
| org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate | ||
| org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 | ||
| org.eclipse.jdt.core.compiler.codegen.targetPlatform=17 |
There was a problem hiding this comment.
No worries, could you revert the changes to all the Eclipse config files then for this PR?
| CAstCallGraphUtil.dumpCG(B.getCFAContextInterpreter(), B.getPointerAnalysis(), CG); | ||
| } | ||
|
|
||
| /* |
There was a problem hiding this comment.
Ok, sounds good can we revert to the version in the master branch then?
| @@ -0,0 +1,265 @@ | |||
| /* | |||
There was a problem hiding this comment.
It looks like a top-level java directory was added erroneously in this PR. Assuming that's correct could we delete it?
There was a problem hiding this comment.
It seems this comment has still not been addressed? I still see an unneeded top-level java directory
ide/tests/build.properties
Outdated
| output.. = bin/test | ||
| bin.includes = META-INF/,\ | ||
| .,\ | ||
| bin.includes = .,\ |
There was a problem hiding this comment.
Is this change important for this PR? If not could we undo it?
There was a problem hiding this comment.
All of your changes sound good to me. I am not sure how the top-level java dir got there, rather than cast/java, but it was not deliberate.
I think the change to ide/tests/build.properties made a warning go away in Eclipse, which I still use, but it is not vital.
reverting the .prefs files and TestSimpleCallGraphShape is all fine.
There was a problem hiding this comment.
Thanks, @juliandolby. Please let me know once you've had time to make all these changes (no hurry on my end), and then after that I'll take another look. I expect we'll be able to land the PR soon after.
There was a problem hiding this comment.
If we could also undo changes to build.properties files that'd be great; we can put them in a separate PR maybe? If it's too painful to undo it's ok.
There was a problem hiding this comment.
reverted that file too
TestSimpleCallGraphShape, java17
|
Took a while to get back to this, but we finally did. @patricklapgar and I have attempted to address the comments on this pull request: we have put the Java version back to 11 and undone our change on the slow JS test. We have also merged the latest WALA. More comments, suggestions and requests are welcome. |
|
@juliandolby let me know when this is ready for another look 🙂 |
I think it is ready now... |
msridhar
left a comment
There was a problem hiding this comment.
LGTM now! So great to see source frontend lambda support finally landing!
|
@juliandolby would it be helpful to have a WALA release that includes this support? |
We have been working on Java 8 supports in the source front end, and this is work on lambda expressions, complete with two tests.