How do I know if my build really uses the JVM IR c...
# compiler
m
How do I know if my build really uses the JVM IR compiler? I’ve compiled so many libraries without any issues that I’m skeptical that my JVM IR setup is correct 😄
I checked for now by intentionally running into known IR compiler crashes 🙂
k
I've found out
kotlinOptions.useIR = true
definitely works because compiling my main code with it and tests without it doesn't work 😄
So it's doing something...
m
Yeah but it also depends on what tasks you set these options on 🙂
w
Yeah I added some prints to the Gradle tasks that were configuring Kotlin tasks to make sure they’re called as expected. The first time out I actually didn’t configure it properly 😕
And then I found a bug triggered by the IR, that made me 100% confident the setup is correct 😄 So I +1 that way of verifying 🙂
k
That's the way to verify if your spelchecker is working 😄
u
Take a look at the value of
xi
in the
@Metadata
annotation on any compiled class file. With 1.4.30, if it's
48
or
50
, it means it's compiled with JVM IR. :) (More details: https://kotlinlang.slack.com/archives/C7L3JB43G/p1598385937027400?thread_ts=1598382471.026600&cid=C7L3JB43G)
m
Interesting, thanks 😀