I got the above working fine for JVM targets, but...
# arrow-meta
c
I got the above working fine for JVM targets, but macOS builds are throwing:
The provided plugin io.arrowkt.example.MetaPlugin is not compatible with this version of compiler
and JS builds are throwing
project ':create-plugin' is not configured for JS usage
I disabled JS as it wasn’t something I was planing on targeting anyway, but the macOS error is a bit puzzling. Searching this Slack I can see various other reports of it, but the reasons seem a bit different. I would kinda assume that everything uses the same version of Kotlin all dependency versions are only defined in one place. Anyone got any ideas what could be causing it?
s
It looks like the issue I encountered with native compiler depending on
com.intellij.*
instead of
<http://org.jetbrains.kotlin.com|org.jetbrains.kotlin.com>.intellij
provided by compiler embeddable. You can try to relocate it with shadowJar using config like this: https://github.com/arrow-kt/arrow-meta/blob/master/compiler-plugin/build.gradle#L55
c
Thanks for the hint. Adding those relocates actually solved the build problem on Kotlin Native, but the bug then just moved to the JVM side, which now throws it. If the JVM compiler and Native compiler uses different packages, it seems like creating a shadowJar is a wrong approach for Multiplatform projects?
I’m still struggling with this. So far I seem to be able to trace the error back to the arrow meta compiler plugin itself, and is now looking into rebuilding that locally. What is the thinking behind shipping it as a fat Jar? Is it just so it is easier to consume from a commandline or am I missing something? E.g. I looked at the allopen and noarg compiler plugins from JetBrains and none of them seems to need these tricks?
s
Jetbrains actually does shadowing for every plugin and they shipping separate artifacts for native and "non-native" platforms. They have a Gradle plugin which applies those plugins and asks for native artifact separately.
c
Hmm, I must have missed that when reading their code. Thanks for the hint 👍
r
@chrmelchior Did you ever get this working? Started poking around some today but I don't know enough around compiler plugins to understand what's going wrong.
n
c
@russhwolf Sorry, must have missed this. No, I never got it working. I compiled my issues here https://github.com/arrow-kt/arrow-meta/issues/432, but as the state is right now it doesn’t look like Arrow Meta will work in a Multiplatform setting. From looking at the state of the project it looks like this will not happen until IR is stable either.