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

https://tip.golang.org/doc/go1.14 is serving "template: main:846: unexpected EOF" #37070

Closed
dmitshur opened this issue Feb 5, 2020 · 4 comments
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done. Soon This needs to be done soon. (regressions, serious bugs, outages)
Milestone

Comments

@dmitshur
Copy link
Contributor

dmitshur commented Feb 5, 2020

It looks like one of the recent doc/go1.14.html changes may be causing this error. I'm looking into it.

@dmitshur dmitshur added NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. Soon This needs to be done soon. (regressions, serious bugs, outages) labels Feb 5, 2020
@dmitshur dmitshur self-assigned this Feb 5, 2020
@dmitshur dmitshur pinned this issue Feb 5, 2020
@dmitshur
Copy link
Contributor Author

dmitshur commented Feb 5, 2020

The error in logs is:

go=9ee51745/website=d0b4462f: 2020/02/05 23:33:56 2020/02/05 23:33:56 parsing template doc/go1.14.html: template: main:846: unexpected EOF

@gopherbot
Copy link

Change https://golang.org/cl/217979 mentions this issue: doc/go1.14: quote {{ and }} in text/template note

@dmitshur dmitshur added NeedsFix The path to resolution is known, but the work has not been done. and removed NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. labels Feb 5, 2020
@dmitshur dmitshur added this to the Unreleased milestone Feb 5, 2020
@gopherbot
Copy link

Change https://golang.org/cl/218058 mentions this issue: doc/go1.14: disable text/template processing in HTML page

gopherbot pushed a commit that referenced this issue Feb 6, 2020
HTML pages served by the website have the option to opt-in to template
processing, by including "Template: true" in the page metadata.
This functionality is documented at
https://github.com/golang/tools/blob/403f1254bdfd3da27c92a0e9e37dd180a9a82b3c/godoc/template.go#L5-L30.

Historically, the Go 1 release notes have used template processing
to a great extent, but release notes for all subsequent major Go
releases have not.

Since this feature is generally not used and not very well known,
it tends to do more harm than good by making it possible for errors
in the template to prevent the release notes from showing up at all.

Disable this feature for Go 1.14 release notes and onwards.
We can consider enabling it when there's a stronger need for it.

Fixes #37072
Updates #37070

Change-Id: If93553d52df12544b46c4edcf3aa5eddc2a155ad
Reviewed-on: https://go-review.googlesource.com/c/go/+/218058
Reviewed-by: Ian Lance Taylor <iant@golang.org>
@dmitshur dmitshur unpinned this issue Feb 6, 2020
@gopherbot
Copy link

Change https://golang.org/cl/229079 mentions this issue: content: convert doc/{conduct,security}.html to non-template

gopherbot pushed a commit to golang/website that referenced this issue Apr 20, 2020
There are no template features being used in either of these two files,
so convert them to regular non-template HTML files. Having template be
off has proven to be a safer default, and it uses less CPU.

For golang/go#37070.
For golang/go#37072.
For golang/go#37090.

Change-Id: Ib0de115e58c51a9660d648dbb8793fcaae9a7197
Reviewed-on: https://go-review.googlesource.com/c/website/+/229079
Reviewed-by: Alexander Rakoczy <alex@golang.org>
@golang golang locked and limited conversation to collaborators Apr 20, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done. Soon This needs to be done soon. (regressions, serious bugs, outages)
Projects
None yet
Development

No branches or pull requests

3 participants