You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
compileVirtual should not depend on File object to template #143
I think TwirlCompiler.compileVirtual should not depend on File object to template because internally it's used only to generate template name. This prevent clients from compiling twirl templates on the fly. In my case I'd like admins of web-service to be able to update templates via API which are stored in DB.
+1
When I was writing compiler tests I had to create a temporary template file, I was wondering why it is not possible to compile a template without having to create a file:
Activity
mkurz commentedon Sep 7, 2017
@unoexperto How about a pull request? 😄
mkurz commentedon Dec 4, 2025
+1
When I was writing compiler tests I had to create a temporary template file, I was wondering why it is not possible to compile a template without having to create a file:
twirl/compiler/src/test/scala/play/twirl/compiler/test/CompilerSpec.scala
Line 26 in c6e9ee2
twirl/compiler/src/test/scala/play/twirl/compiler/test/CompilerSpec.scala
Lines 391 to 403 in c6e9ee2
twirl/compiler/src/test/scala/play/twirl/compiler/test/CompilerSpec.scala
Lines 55 to 58 in c6e9ee2
mkurz commentedon Dec 4, 2025