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

Incorrect calculation the column of error for template with first line comments #571

Open
ihostage opened this issue Nov 14, 2022 · 2 comments

Comments

@ihostage
Copy link
Member

No description provided.

@mkurz
Copy link
Member

mkurz commented Nov 14, 2022

Can you give more detail or an example?

@ihostage
Copy link
Member Author

Sorry, Matthias @mkurz . I didn't have time to finish it yesterday. Just I needed an issue number for cross-link in another PR with adding copyrights.

Can you give more detail or an example?

Example right now is had in our tests, that were broken when I added copyrights header to twirl templates 😞

"fail compilation for error.scala.html" in {
val helper = newCompilerHelper
the[CompilationError] thrownBy helper.compile[(() => Html)]("error.scala.html", "html.error") must have(
Symbol("line")(2),
Symbol("column")(12)
)
}
"fail compilation for errorInTemplateArgs.scala.html" in {
val helper = newCompilerHelper
the[CompilationError] thrownBy helper
.compile[(() => Html)]("errorInTemplateArgs.scala.html", "html.errorInTemplateArgs") must have(
Symbol("line")(1),
Symbol("column")(6)
)
}

It is related with that Twirl use first comment block as comments for constructor args and has a special behavior for this comments. Yesterday I hadn't found a quick and nice solution for this bud and decided move this to separate issue because I don't think that it's a stopper to merge #568 🤷‍♂️

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

2 participants