Hi! Thanks for maintaining Ktor :raised_hands: Whe...
# ktor
r
Hi! Thanks for maintaining Ktor 🙌 When building a fat JAR with
ktor-server-config-yaml
on the classpath, we observed that YamlConfigLoader gets selected and application.conf is not loaded. (It took several hours to solve this problem...) This looks related to how
META-INF/services
files are merged for a fat JAR and how JVM ServiceLoader resolves providers, rather than a Ktor-specific bug. I saw some issues referencing this behavior like • https://youtrack.jetbrains.com/issue/KTOR-6610/Log-which-ConfigLoader-has-been-used-for-loading-the-server-configurationhttps://kotlinlang.slack.com/archives/C0A974TJ9/p1736451975122839 As Patrik Csikós says in YouTrack issue comment, I thought it would be beneficial to take these actions below. (A) Improve logging: when multiple ConfigLoaders are discovered, log the list of candidates and the reason one was selected. (B) Document the behavior when including multiple ConfigLoader on the classpath. If this direction makes sense, I'd be happy to open a PR for (A) logging and/or (B) docs. Would appreciate guidance on the preferred approach. Thank you!
I created sample project to reproduce this issue: https://github.com/Ryuheeeei/ktor-server-conf/tree/main And I also implemented some simple logging to
ktor-server-core
. 😄
Thank you for always maintaining ktor! I hope I can be of some help!
a
Both the logging of the chosen config loader and the documentation improvements would be helpful. Can you please file an issue with the problem description and the attached sample project? The pull requests are most welcome. Thank you.
👍 1
thank you color 1