-
Notifications
You must be signed in to change notification settings - Fork 6
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
Detect dependencies through Java 8 Lambdas #55
Comments
I pushed a branch that contains the basic fix - updating the used AST parser. I didn't file a pull request yet as there's the ramification of the required Eclipse version, or rather its bundle So far the minimum required Eclipse version for Usus was 3.4, but the Java 8 aware AST was only introduced with Also, I'm hesitant to add a unit test for Java 8 relations, as it would suggest to update the runtime of Any suggestions? |
Luna was released in 2014 so I think it would be ok to drop support for prior versions. |
Sounds totally reasonable to me. Thanks @maxbechtold for bringing this up and for fixing it! |
Thanks for your feedback, I'll try and create the pull request soon. Can you comment on whether or not to update the test project to Java 8? |
I would very much like to keep the test .java files under IDE control in order to make sure that they compile. Having said that, I think it is totally reasonable to update the whole project to Java 8 (prod and test code). But I'm not sure whether / how this step might influence compatibility with Eclipse versions -- do you know about that? It seems that only Eclipse 4.6 actually requires Java 8 as its runtime, but I assume that the actual Usus JAR can be created for Java 6 or so?! (sorry, i did not do any "real" Java development for the past few years, so I forgot about those details...) |
I think we're on the same page then. |
I was thinking that while you're at it, you might as well switch everything to Java 8 :-) so that you can make use of the nice language features in Usus as well. If this doesn't work out for compatibility reasons, then I guess we can have the tests at a different language level than the prod code. |
…d JDT API. Tycho -> 0.18.1
…ectusus.core.test: 1.8)
It's actually sufficient to let Eclipse treat the test project (without prod/test distinction) as a Java 8 project. The Tycho/Maven build is not affected, and the required Java runtime stays 1.6. Still, it's probably about time to move the projects to the recent Java version, which would be 9 (albeit Eclipse support is still to be finally released). However, this is not something I would like to do in a fix contribution. Also, it would probably be a good opportunity to update Tycho and the used libraries (jgrapht, guava etc.) plus apply some formatting clean up (use of the diamond operator, replace anonymous classes with lambdas etc.) |
@marcphilipp and I agreed on me releasing the next Usus version. I created the release notes, feel free to review Release_Notes_0.8.0.md. Remaining tasks:
|
I can also edit the marketplace entry. Moreover, I can add you to the editors if you give me your Eclipse account (or create an account if you don't have one already). |
Sounds excellent! Thank you :-) |
Most of it is done, except spreading the word and updating the Eclipse Marketplace (I'm https://www.eclipse.org/user/mbechtoldnhp) |
You should now be able to edit the Eclipse Marketplace entry. |
Thanks, and I did. |
I just noticed that the package graph will not highlight dependencies when these are only based on references to other types in Lambda expressions or method references.
So to Usus, a type
A
does not depend on a typeB
ifA
only contains usages like() -> new B()
orB::someMethod
.This is probably due to the fact that most of Usus was developed prior to Java 8.
It might not be a show stopper, but still reduces Usus' benefit to me.
The text was updated successfully, but these errors were encountered: