hey guys, im looking at leaning into properties fi...
# tornadofx
g
hey guys, im looking at leaning into properties files + ResourceBundles for some i18n work thats going to be needed in the not to distant future. One thing I'm consistently annoyed by is that all my keys are strings, meaning they're dynamic, and if i spell them wrong i get bad runtime behaviours that are difficult to QA. Does anybody here have a workflow they like for this? Behing somebody with some C# background, I started thinking about code generation and how it wouldn't be too difficult to have a pre-build command that created an enum with entires corresponding to keys in a properties file => the compiler would now fail the build if i miss-spelt a resource. Anybody doing anything like this or are we all just suffering through spelling mistakes?
m
There are various way to perform code generation for Kotlin. You may write a gradle plugin, or an ArrowMeta compiler plugin, for example.
m
will the mispelling at least throw an exception?