playframework / twirl

Twirl is Play's default template engine
Apache License 2.0
545 stars 108 forks source link

Scala 3.4.0 complains about x: _* syntax #736

Closed ahjohannessen closed 6 months ago

ahjohannessen commented 7 months ago

Using Scala 3.4.0 with twirl results in warnings like:

The syntax x: _* is no longer supported for vararg splices; use x* instead

The source of the issue comes from here and here using .toIndexedSeq:_* in codegen.

So, the methods compile and compileVirtual need to feed syntax variant options when invoking parseAndGenerateCode that in turn invokes generateFinalTemplate->generateCode.

Probably many ways to solve this. One is to change compile and compileVirtual to include scala version. I have no idea what maven-twirl and cradle-twirl do.