Skip to content

text/template: new keywords (e.g. break, continue) breaks older working programs [1.19 backport] #56591

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

Closed
bep opened this issue Nov 4, 2022 · 2 comments
Labels
CherryPickCandidate Used during the release process for point releases FrozenDueToAge
Milestone

Comments

@bep
Copy link
Contributor

bep commented Nov 4, 2022

Backport rationale; a “serious” problem is one that prevents a program from working at all.

See #56538

@gopherbot gopherbot added this to the Go1.19.4 milestone Nov 4, 2022
@seankhliao seankhliao added NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made. CherryPickCandidate Used during the release process for point releases and removed NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made. labels Nov 6, 2022
@eliben
Copy link
Member

eliben commented Nov 8, 2022

I would vote against packporting in this case.

Rationale: @bep's is the only report we have of this issue, and even in their case the problem didn't actually manifest but was foreseen for future keywords like return. The problem is very easy to work around if it occurs (rename function to be something other than break or continue, which are very untypical function names in the first place)

In addition, backporting this CL would be tricky because the template lexer was rewritten by @robpike during the recent cycle to remove concurrency. The original CL that introduced the problem was fixing a race condition, and the fix for #56538 could be simple because there are no longer concurrency issues in master. So this wouldn't be a straightforward merge fix to 1.19 - we'd have to figure out how to make the fix while still avoiding the race condition in the original code. I don't think it's worth the effort.

@mknyszek
Copy link
Contributor

mknyszek commented Nov 9, 2022

Given that we haven't heard any other reports of this issue, and the fix is complex, we're deciding not to backport this. If we start getting reports we can reconsider. Closing for now.

@mknyszek mknyszek closed this as not planned Won't fix, can't repro, duplicate, stale Nov 9, 2022
@golang golang locked and limited conversation to collaborators Nov 9, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CherryPickCandidate Used during the release process for point releases FrozenDueToAge
Projects
None yet
Development

No branches or pull requests

5 participants