Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Twirl compiler imports from deprecated TemplateMagic instead of new imports #131

Closed
rktoomey opened this issue Dec 30, 2016 · 1 comment
Closed

Comments

@rktoomey
Copy link

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 😸 )

@import play.twirl.api.TwirlFeatureImports.defining

Thank you!

@rktoomey
Copy link
Author

rktoomey commented Jan 3, 2017

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.

@rktoomey rktoomey closed this as completed Jan 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant