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?

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

kt  => => 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?


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:

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?


Back to the top