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

Handle an exception from scalameta when parsing template args fail #512

Merged
merged 4 commits into from Apr 28, 2022

Conversation

tototoshi
Copy link
Member

TwirlCompiler uses scalameta to analyze template parameters.
I found that there was no error handling during the parsing by scalameta and the compiler would abort if the type was not specified in the template argument. This PR fixes it.

Copy link
Member

@mkurz mkurz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM Thanks!

@mkurz
Copy link
Member

mkurz commented Apr 28, 2022

@tototoshi Oh no! 😉

[warn] scalafmt: /home/runner/work/twirl/twirl/compiler/src/test/scala/play/twirl/compiler/test/CompilerSpec.scala isn't formatted properly!
...
[warn] scalafmt: /home/runner/work/twirl/twirl/compiler/src/main/scala/play/twirl/compiler/TwirlCompiler.scala isn't formatted properly!

@mkurz
Copy link
Member

mkurz commented Apr 28, 2022

@tototoshi
Copy link
Member Author

🤔

@mergify mergify bot merged commit c4d0336 into playframework:main Apr 28, 2022
@tototoshi tototoshi deleted the error-in-template-args branch April 28, 2022 14:06
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

Successfully merging this pull request may close these issues.

None yet

2 participants