giter8 icon indicating copy to clipboard operation
giter8 copied to clipboard

`g8Test` uses other code path than actual template application

Open jrudolph opened this issue 6 years ago • 2 comments

It seems that g8Test uses another code path than actually using the command line tool or sbt new to apply a template. With the tool / sbt new template generation can fail fatally for issues like #333. Using g8Test it works because there's a fallback defined that falls back to copying the template verbatim if actually running the ST template fails. That makes it really hard to test template generation in CI.

It seems the difference is in using G8.applyT version G8.apply.

Observed here: https://github.com/akka/akka-http-quickstart-scala.g8/issues/15

jrudolph avatar Aug 14 '17 11:08 jrudolph

+1, we've been hit by this bug too: https://github.com/UdashFramework/udash.g8/issues/14

ddworak avatar Sep 02 '19 05:09 ddworak

is there any workaround to disable the fallback option?

g8Test command is not as helpful as it could be if it cannot report issues like An unexpected error occurred while processing the template. Check that all literal '$' are properly escaped with '\$' (which are not that unlikely to happen and which would break the template)

To stay safer, atm i'm manually running sbt new .. as part of the ci, instead of relying on g8Test but it would be great if it were possible to use g8Test

alessandrocandolini avatar Dec 27 '21 08:12 alessandrocandolini