playframework / twirl

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

compiler: account for Scala 2 and 3 differences in generated varargs code #737

Closed ahjohannessen closed 8 months ago

ahjohannessen commented 8 months ago

This adds a bit of redudant overloads. The most important aspect for me now is that mima and tests pass plus a minor release can be shipped. At a later time, one can remove overloads and duplication, do a cleanup with a breaking change and bump major version or similar.

ihostage commented 8 months ago

@ahjohannessen @mkurz I checked this for Gradle and as I expected all is fine. The changes in twirl-compiler works fine for all supported build systems.

ahjohannessen commented 8 months ago

@ihostage That is great to hear :)

mkurz commented 8 months ago

@Mergifyio backport 1.6.x

mergify[bot] commented 8 months ago

backport 1.6.x

✅ Backports have been created

* [#738 [1.6.x] compiler: account for Scala 2 and 3 differences in generated varargs code (backport #737) by @ahjohannessen](https://github.com/playframework/twirl/pull/738) has been created for branch `1.6.x` but encountered conflicts
ahjohannessen commented 8 months ago

@mkurz Super :) Next thing could perhaps be to introduce something like:

trait TwirlCompiler {
   def compile(…)
   // perhaps not necessary
   def compileVirtual(…)
}

and do some cleanup with compile options.

mkurz commented 8 months ago

@ahjohannessen Pull requests always welcome :wink: