Open michaelsafyan opened 7 years ago
I'll triage this for Go1.10, but if someone thinks this should be for Unplanned, please feel free and change that.
This may be a partial dup of #19408, which is about column information.
Other than that I think we need specific examples to improve. Show us a bad template, and the error you get, and how the error could be better. Thanks.
What's the best way to share such examples? Is there an @google.com email alias that I can share with privately?
Any idea when this might be addressed? Just ran smack into it when trying to make changes to a golang project:
EROR[20:32:00.378-07:00] Server error code=500 method=GET path=/groups err="html/template:groups: ends in a non-text context: {stateRCDATA delimNone urlPartNone jsCtxRegexp attrNone elementTextarea <nil>}"
There's no line number in this error message and I have no idea aside from just commenting out vast swaths of template how to start finding the problem.
Im using Go 1.11, I have just hit this error as well. It is not clear to me where in the template might be the problem.
@skimbrel I opened #30635 to track your specific error, which is not what this bug is about. The issue with your problem is that the provided template ends unexpectedly. That error is saying "unexpected EOF while parsing".
About this bug: how would you thing should errors be reported?
@zaddok could you please post here your errors and what you'd like to have instead?
Any idea when this might be addressed? Just ran smack into it when trying to make changes to a golang project:
EROR[20:32:00.378-07:00] Server error code=500 method=GET path=/groups err="html/template:groups: ends in a non-text context: {stateRCDATA delimNone urlPartNone jsCtxRegexp attrNone elementTextarea <nil>}"
There's no line number in this error message and I have no idea aside from just commenting out vast swaths of template how to start finding the problem.
replace
it works fine
Any idea when this might be addressed? Just ran smack into it when trying to make changes to a golang project:
EROR[20:32:00.378-07:00] Server error code=500 method=GET path=/groups err="html/template:groups: ends in a non-text context: {stateRCDATA delimNone urlPartNone jsCtxRegexp attrNone elementTextarea <nil>}"
There's no line number in this error message and I have no idea aside from just commenting out vast swaths of template how to start finding the problem.replace
literally close it
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?Unsure; this is in the Blaze version of "go_binary", "go_library", etc. (I'm having difficulty understanding which particular version of Go that is invoking).
What operating system and processor architecture are you using (
go env
)?gLinux (Ubuntu 14.04.5 LTS) and also BuildRabbit
What did you do?
What did you expect to see?
When the parsing fails, I expect the error to include sufficient context to diagnose. For example:
error parsing template: template: body:3 unexpected bad character U+002D '-' in command in the vicinity of "{{end-}}"; expected " " or "}}".
What did you see instead?
The error does not give any context. For example, it prints:
Or:
... but doesn't give any surrounding context to understand what the specific error is.