playframework / twirl

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

Support >22 args in Scala 3 in Twirl 2.0.5 is a breaking change #801

Closed dwestheide closed 3 months ago

dwestheide commented 3 months ago

The support for > 22 args in Scala 3 has been implemented as a breaking change: Where Twirl templates previously were of type TemplateX, for example Template2[Int, HtmlFormat.Appendable], that type is now gone. We have Scala 3 code that deals with multiple templates of the same type, abstracting over the concrete Twirl template. Code like this breaks when upgrading from Twirl 2.0.4 to Twirl 2.0.5. That should not happen with a patch release.

I can probably work around this by using structural typing. Nevertheless, I wanted to address the issue of introducing a breaking change in a patch release. Not sure what the correct way forward is, now that the release is out in the wild, though.

mkurz commented 3 months ago

This will be fixed in Twirl 2.0.6:

dwestheide commented 3 months ago

That's great to hear, thanks a lot for the quick reply. :)