The runtime backstop for templates built without the compiler plugin has three gaps (storm-kotlin/src/main/kotlin/st/orm/template/TemplateString.kt):
- The check at
:142 fires only when !autoInterpolation && !interpolateCalled. One explicit t() call sets interpolateCalled, after which every other raw interpolation in the same template passes silently: { "SELECT ${t(User::class)} FROM user WHERE name = '$name'" } concatenates $name into the SQL with no warning at any log level. Counting interpolations against t() calls would close this.
- The
when over the mode at :152-156 has no else, so a typo'd property value silently disables the check entirely. Unknown values should fail fast.
- The code names the disabled mode
off; docs/configuration.md names it none. Align them.
Also worth deciding: the default mode is warn, which means a missing compiler plugin turns injection into a log line. A throw default is the safer contract; if that is too breaking for this milestone, the docs should at least tell production users to set throw.
The runtime backstop for templates built without the compiler plugin has three gaps (
storm-kotlin/src/main/kotlin/st/orm/template/TemplateString.kt)::142fires only when!autoInterpolation && !interpolateCalled. One explicitt()call setsinterpolateCalled, after which every other raw interpolation in the same template passes silently:{ "SELECT ${t(User::class)} FROM user WHERE name = '$name'" }concatenates$nameinto the SQL with no warning at any log level. Counting interpolations againstt()calls would close this.whenover the mode at:152-156has noelse, so a typo'd property value silently disables the check entirely. Unknown values should fail fast.off;docs/configuration.mdnames itnone. Align them.Also worth deciding: the default mode is warn, which means a missing compiler plugin turns injection into a log line. A throw default is the safer contract; if that is too breaking for this milestone, the docs should at least tell production users to set throw.