Open raboof opened 6 years ago
I'm not sure it is a good idea, we also need to maintain that template, and flattening it to make the generated code "normal" makes the template very hard to read.
Perhaps related to https://github.com/playframework/twirl/issues/141 ?
Yeah, if twirl could output something that looks nice without much tweaking the template source that would be awesome.
Here are the steps I used to have a look at this (thanks @raboof for the help!):
akka-grpc-play-interop-test-scala/test:products
play-interop-test-scala/target/scala-2.12/src_managed/main/example/myapp/helloworld/grpc/helloworld/GreeterServiceClient.scala
Given https://github.com/playframework/twirl/pull/169 I tried upgrade sbt-twirl to 1.3.14, but GreeterServiceClient.scala
still contains:
private val sayHelloRequestBuilder = {
new ScalaUnaryRequestBuilder(sayHelloDescriptor, channel, options, settings)
}
/cc @mkurz who authored the change in twirl. Do you know why the indentation isn't fixed?
Because of the loops in our templates, the whitespace in the generated code is quite jumbled-up.
Since people may be looking at the generated code, it might be worth it to tweak some things to make the generated code look neater at the cost of making the templates less easily readable.