Fork me on GitHub
#cursive
<
2016-03-22
>
ricardo09:03:02

Well, this is weird. I just started getting a KotlinReflectionNotSupportedError exception on both IDEA 15 and 2016.1 when I try to run lein tasks.

ricardo09:03:11

And kotlin-reflect.jar is on both applications.

ricardo10:03:32

OK, known issue.

cfleming20:03:47

@ricardo: yeah, I thought this was a new issue in v2016.1 because people started reporting it right after the release, but it looks like it predates that.

cfleming20:03:58

Anyway, it’s fixed now.

ricardo21:03:22

@cfleming: I’m curious, what was the cause? I didn’t get it right after upgrading, but only until today, and it then showed up on both 15 and 2016.1, which had me thinking was an environment issue.

cfleming21:03:09

@ricardo: It’s weird, I can’t see why people wouldn’t have got this earlier.

cfleming21:03:45

This is using Kotlin:

cfleming21:03:54

val logger: Logger = Logger.getInstance(LeiningenCommandLineState::class.simpleName)

cfleming21:03:47

The trick there is that LeiningenCommandLineState::class returns a Kotlin class, not the Java class (I don’t fully understand the difference), and calling simpleName on the Kotlin one apparently requires the reflection classes.

cfleming21:03:09

Changing it to:

val logger: Logger = Logger.getInstance(LeiningenCommandLineState::class.java.simpleName)

cfleming21:03:24

returns the actual Java class, which works fine.

cfleming21:03:55

The only thing I can think of is that the latest plugin bundles a later version of Kotlin, and that behaviour has changed in Kotlin.

ricardo21:03:36

Interesting, thanks.