efemoney
02/04/2019, 5:08 AMIs there IDE support forSo I put “log statements” (diagnostics) in the refinement handler and it turns out that kotlinscript does in fact support it … 😄 Its honestly amazing. The actual initial issue was that I defined a complex annotation sort of and so script annotation processing wasn’t able to correctly parse my annotation and was returning anannotations?Import
InvalidScriptResolverAnnotation
annotation error. Had to replace with plain string fields to get it to work like:
// take 1:
annotation class Res(val key: String, val code: Array<String>, val value: Array<String>) // choke 💀
// take 2:
annotation class Res(val key: String, vararg val entries: Entry) { // choke 💀
annotation class Entry(val code: String, val value: String)
}
// take 3:
@Repeatable
annotation class Res(val key: String, val code: String, val value: String) // 👍
3 is obviously the least desirable of all the options but its what works currently. I am generating kts files on the go based on annotation and they are correctly imported and referenced. Probably because I am generating directly into the src folder where the original script lives but I believe it should still work perfectly if the kts files are generated into src/resource folders (based on the ide.acceptedLocations
config)Nikky
02/04/2019, 5:49 AMNikky
02/04/2019, 5:52 AMannotation class Include(val path: String)
that just does add a .kt file in a predefined include folderefemoney
02/04/2019, 10:41 AMilya.chernikov
02/05/2019, 2:31 PMefemoney
02/06/2019, 4:19 PMilya.chernikov
02/11/2019, 12:01 PM