VirtuslabRnD / pulumi-kotlin

Experimental support for Kotlin language in Pulumi
Apache License 2.0
58 stars 3 forks source link

Better solution for Kotlin Poet hard spaces #133

Open myhau opened 1 year ago

jplewa commented 1 year ago

For now, we manually add hard spaces in some places, like here:

.addStatement("return %T.values().first·{·it.javaValue·==·%L·}", kotlinClass, JAVA_TYPE_PARAMETER_NAME)

Without this, Kotlin Poet used to add line breaks to the generated expression, which resulted in non-compiling code.