Understood, Andy. Should I create an issue so that we can track this?
I would probably need to see a lot of demand before exploring an ajc like experience for Kotlin. It would be a very large amount of effort and binary weaving of the class files can get you a long way. If I had cycles to work on the compile time experience I'd probably prefer to put that into improving the annotation based model, but I know that isn't great for folks relying on inter type declarations and static checking at compile time.
cheers, Andy No, Martin, I’m not experiencing these problems, and my mentioning Spring was tangential.
I’m basically asking that ajc support Kotlin source files.
from what i see its not a matter of spring like or dislike..its a matter of keeping JDK class file consist aj => .java => .class kt => .java => .class but this same scenario goes fubar when you switch JDKs ..this is an example aj => 1_dot_eight.java => 1_dot_eight.class kt => 1_dot_nine.java => 1_dot_none.class because spring is native compiled to 1.8 class format ..all .aj and all .kt dsl files will compile to 1.8 class access to class files in jar is no problem doing reflection e.g. Class.forName(One_dot_eight); also no problem things fall apart quickly with aj, kt or .java files when you mix 1.8 class files with 1.9 class files (1.9 lambda functions fubar on accessing 1.8 class files) maven folk say full compile the whole lot to your runtime JDK will supposedly cure this scenario is this what you're experiencing? martin- https://stackoverflow.com/questions/36780990/convert-inter-type-declaraton-from-aj-to-java-with-aspect-annotationshttps://stackoverflow.com/questions/34957430/how-to-convert-a-kotlin-source-file-to-a-java-source-file | To convert a Kotlin source file to a Java source file you need to (when you in Android Studio):. Press Cmd-Shift-A on a Mac, or press Ctrl-Shift-A on a Windows machine.. Type the action you're looking for: Kotlin Bytecode and choose Show Kotlin Bytecode from menu. Press Decompile button on the top of Kotlin Bytecode panel.; Now you get a Decompiled Java file along with Kotlin file in a ... |
| What you want is not possible with @AspectJ style, you need to use the more powerful native syntax. (Why do you want to switch anyway?) The reason behind this is that the Java compiler can only convert @DeclareParents to a form in which Village is a subclass of whatever interface implementation you define in your aspect, for example something like this: |
Hi all,
There are of course many more hits, but it appears the current state of the art is to compile with kotlin, then apply AspectJ to the kotlin .class files.
Problem is, we have some libraries that we can only compile via ajc due to their design, so I’m wondering what thought has been given to adding kotlin language support to ajc. I didn’t see any issues requesting Kotlin language support in ajc so far. Kotlin looks promising, and it appears that Spring also is liking Kotlin enough to add support for it. I’d love to have my Kotlin & AspectJ, too.
Any comments, folks?
-matthew
_______________________________________________aspectj-users mailing listaspectj-users@xxxxxxxxxxxTo change your delivery options, retrieve your password, or unsubscribe from this list, visithttps://www.eclipse.org/mailman/listinfo/aspectj-users
_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/aspectj-users
_______________________________________________ aspectj-users mailing list aspectj-users@xxxxxxxxxxxTo change your delivery options, retrieve your password, or unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/aspectj-users
|