commands icon indicating copy to clipboard operation
commands copied to clipboard

Add support for Kotlin coroutines

Open kacgal opened this issue 5 years ago • 5 comments

Handles exceptions thrown by Kotlin suspend functions.

kacgal avatar Jul 08 '20 21:07 kacgal

I'm not interested in adding kotlin to the build. There has to be a less invasive way to pull this off....

Id suggest trying to achieve this by registering your own context, and maybe setting exception handler.

aikar avatar Jul 08 '20 21:07 aikar

Do you mean that you don't want kotlin in every final jar of acf, or don't want kotlin at build time at all? Because this method doesn't include kotlin in the jar, it's completely optional. Just required at build time

Edit: Sorry! I was wrong. <optional> didn't do what I expected! But setting kotlin to scope = provided should do the trick

kacgal avatar Jul 08 '20 21:07 kacgal

Surely this will cause a failure if Kotlin isn't on the classpath - i.e. if the plugin isn't using it?

bristermitten avatar Oct 15 '20 12:10 bristermitten

No, there is no failure. The JVM does throw exceptions that the classes can't be found, but those are caught and silently ignored - meaning no Kotlin is required at runtime

kacgal avatar Oct 15 '20 13:10 kacgal

Lil late but any updates or future thoughts on this?

Nopock avatar Feb 10 '23 04:02 Nopock