Skip to content

Commit ac19bf5

Browse files
DevSrSouzaTadeasKriz
authored andcommitted
Fix Skie Kotlin Compiler Subplugin loading
1 parent beb6530 commit ac19bf5

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

SKIE/kotlin-compiler/core/src/commonMain/kotlin/co/touchlab/skie/spi/SkiePluginLoader.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@ import java.util.ServiceLoader
55

66
class SkiePluginLoader {
77

8-
val pluginRegistrars: List<SkiePluginRegistrar> = ServiceLoader.load(SkiePluginRegistrar::class.java).toList()
8+
val pluginRegistrars: List<SkiePluginRegistrar> = ServiceLoader.load(
9+
SkiePluginRegistrar::class.java,
10+
SkiePluginRegistrar::class.java.classLoader
11+
).toList()
912

1013
fun registerAll(initPhaseContext: InitPhase.Context) {
1114
pluginRegistrars.forEach {

SKIE/kotlin-compiler/linker-plugin/src/kgp_common/kotlin/co/touchlab/skie/compilerinject/interceptor/PhaseInterceptorRegistrar.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ object PhaseInterceptorRegistrar {
3636

3737
val phaseInterceptors =
3838
(this::class.java.classLoader as? URLClassLoader)?.let { ServiceLoaderLite.loadImplementations(it) }
39-
?: ServiceLoader.load(PhaseInterceptor::class.java)
39+
?: ServiceLoader.load(PhaseInterceptor::class.java, this::class.java.classLoader)
4040

4141
phaseInterceptors
4242
.groupBy { it.getInterceptedPhase() }

0 commit comments

Comments
 (0)