Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] Formal support for Kotlin?

No, Martin, I’m not experiencing these problems, and my mentioning Spring was tangential.

I’m basically asking that ajc support Kotlin source files.

On May 13, 2019, at 5:43 PM, Martin Gainty <mgainty@xxxxxxxxxxx> wrote:

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-annotations
https://stackoverflow.com/questions/34957430/how-to-convert-a-kotlin-source-file-to-a-java-source-file





From: aspectj-users-bounces@xxxxxxxxxxx <aspectj-users-bounces@xxxxxxxxxxx> on behalf of Matthew Adams <matthew@xxxxxxxxxxxxxxx>
Sent: Monday, May 13, 2019 5:53 PM
To: aspectj-users@xxxxxxxxxxx
Subject: [aspectj-users] Formal support for Kotlin?
 
Hi all,

I’ve been doing some googling around to see what I can find with regard to using AspectJ with Kotlin.  Things don’t look particularly great at first glance:  https://stackoverflow.com/questions/44364633/aspectj-doesnt-work-with-kotlin

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 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


Back to the top