FabricMC / fabric-language-kotlin

Fabric language module for Kotlin.
Apache License 2.0
299 stars 33 forks source link

Kotlin JSR223 Support #13

Closed LemmaEOF closed 5 years ago

LemmaEOF commented 5 years ago

Kotlin has a library called kotlin-scripting-jsr223-embeddable. This allows it to be run from JSR-223 contexts, like the ones used for LibCD and Cotton Scripting. Would it be possible to add jsr223 kotlin scripting to Fabric Language Kotlin?

natanfudge commented 5 years ago

I Don’t think this is related to this project. A separate mod is more suitable.

LemmaEOF commented 5 years ago

The embeddable lib is 23 KB. Any separate mod would need to depend on FLK, and it adds no bloat if nothing calls it, so no reason not to have it here.

natanfudge commented 5 years ago

Ok, I support this then.

Juuxel commented 5 years ago

That depends on kotlin-compiler-embeddable which is a 35MB dependency.

LemmaEOF commented 5 years ago

Huh. Thought that FLK already included that.

Juuxel commented 5 years ago

FLK only has the stdlib, kotlin-reflect, kotlinx.coroutines, jetbrains annotations and the language adapter.

LemmaEOF commented 5 years ago

Ah, yeah. Guess a separate mod would be worth it then. I'll talk to Nikky about it sometime, since I don't know nearly enough about kotlin.

natanfudge commented 5 years ago

That depends on kotlin-compiler-embeddable which is a 35MB dependency.

Hmm. That changes things

modmuss50 commented 5 years ago

Yeah 35MB is a lot, the scala plug-in is 20MB so it’s doable but seems a bit excessive for one or two mods.

Juuxel commented 5 years ago

I think a separate Kotlin scripting library would be fine to avoid bundling the compiler with FLK.

LemmaEOF commented 5 years ago

I'll look into getting that done. This issue isn't really needed anymore.