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
When compiling a template with twirl-compiler 1.3.0, I noticed that @defining was being sourced from the deprecated TemplateMagic (deprecated since 1.2.0) instead of the new imports, TwirlFeatureImports and TwirlHelperImports.
Like #105, we compile with -Xfatal-warnings. The solution proposed there, overwrite the list of default imports with an empty Seq, isn't practical for a project with a number of templates to modify.
Could you please make TwirlCompiler stop importing TemplateMagic and start importing the new files instead?
As a temporary workaround, instead I imported the helpers I was using in each template directly, thus causing the TemplateMagic import to be unused. (But my compile doesn't break on unused imports, just deprecated ones 😸 )
Turns out there are two issues: first, the Play 2.5.10 plugin brings in the older twirl-compiler into scope for sbt tasks like twirlCompileTemplates, and second, that somewhere lurking in my main app classpath I still had 1.1.1. So it was entirely my fault.
When compiling a template with twirl-compiler 1.3.0, I noticed that
@defining
was being sourced from the deprecatedTemplateMagic
(deprecated since 1.2.0) instead of the new imports,TwirlFeatureImports
andTwirlHelperImports
.Like #105, we compile with
-Xfatal-warnings
. The solution proposed there, overwrite the list of default imports with an empty Seq, isn't practical for a project with a number of templates to modify.Could you please make
TwirlCompiler
stop importingTemplateMagic
and start importing the new files instead?As a temporary workaround, instead I imported the helpers I was using in each template directly, thus causing the
TemplateMagic
import to be unused. (But my compile doesn't break on unused imports, just deprecated ones 😸 )Thank you!
The text was updated successfully, but these errors were encountered: