In my library, which provides a KSP plugin for a c...
# eap
r
In my library, which provides a KSP plugin for a client to generate code I've been using the following pattern - the library provides an empty stub for a function (like this one) and the real function with the same signature (in the same package) is generated by KSP when building the application. This way the code is correct even before running KSP - it can be opened in the IDE without errors. This no longer works with Kotlin
2.5.0-Beta1
(the function from the library is called instead of the generated one). Is it an intentional change or a regression? Can someone help me identify the YT issue for this? And if this is intentional - what are the alternatives now? I use this on JS and WasmJS targets and it doesn't work on both (but the same "trick" still works on JVM).
y
I've seen plugins intentionally make such functions lower priority by e.g. adding extra default parameters, so that it still resolves in IDE, but once it's generated, it'll resolve to the generated version. Maybe that will do the trick?
👍 2
✅ 1
r
It seems to work. Thanks!