fat jars incorrectly shade kotlin-reflect
- Dominant language
- Java
- Stars
- 11.5k
- Forks
- 402
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 20
Description
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.(DefaultBuiltIns.kt:24)
at org.pkl.thirdparty.kotlin.reflect.jvm.internal.impl.builtins.DefaultBuiltIns.(DefaultBuiltIns.kt:21)
at org.pkl.thirdparty.kotlin.reflect.jvm.internal.impl.builtins.DefaultBuiltIns.(DefaultBuiltIns.kt:31)
```
Contributor guide
Research direction
Start by reproducing the failure when using a fat jar, then inspect how kotlin-reflect is shaded and how its built-in resource is packaged. Done means the shaded artifact can load kotlin/kotlin.kotlin_builtins without raising the reported IllegalStateException.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, kotlin
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100