apple / pkl

A configuration as code language with rich validation and tooling.
https://pkl-lang.org
Apache License 2.0
10.38k stars 280 forks source link

fat jars incorrectly shade kotlin-reflect #794

Open bioball opened 1 week ago

bioball commented 1 week ago

The shaded kotlin reflect API tries to load a resource at the wrong path, causing:

java.lang.IllegalStateException: Resource not found in classpath: kotlin/kotlin.kotlin_builtins
    at org.pkl.thirdparty.kotlin.reflect.jvm.internal.impl.serialization.deserialization.builtins.BuiltInsLoaderImpl.createBuiltInPackageFragmentProvider(BuiltInsLoaderImpl.kt:59)
    at org.pkl.thirdparty.kotlin.reflect.jvm.internal.impl.serialization.deserialization.builtins.BuiltInsLoaderImpl.createPackageFragmentProvider(BuiltInsLoaderImpl.kt:35)
    at org.pkl.thirdparty.kotlin.reflect.jvm.internal.impl.builtins.KotlinBuiltIns.createBuiltInsModule(KotlinBuiltIns.java:105)
    at org.pkl.thirdparty.kotlin.reflect.jvm.internal.impl.builtins.DefaultBuiltIns.<init>(DefaultBuiltIns.kt:24)
    at org.pkl.thirdparty.kotlin.reflect.jvm.internal.impl.builtins.DefaultBuiltIns.<init>(DefaultBuiltIns.kt:21)
    at org.pkl.thirdparty.kotlin.reflect.jvm.internal.impl.builtins.DefaultBuiltIns.<clinit>(DefaultBuiltIns.kt:31)