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

x/tools/cmd/goyacc: "DO NOT EDIT" header missing trailing newline #26478

Closed
jim-minter opened this issue Jul 19, 2018 · 3 comments
Closed

x/tools/cmd/goyacc: "DO NOT EDIT" header missing trailing newline #26478

jim-minter opened this issue Jul 19, 2018 · 3 comments

Comments

@jim-minter
Copy link

Since #26158 / https://golang.org/cl/122095 / goyacc adds a "DO NOT EDIT" header. This is missing a trailing newline. It breaks generations of the form

%{
package foo
%}

because the output becomes

// Code generated by goyacc -l -o foo.go -v /dev/null foo.y. DO NOT EDIT.package foo

when it should be

// Code generated by goyacc -l -o foo.go -v /dev/null foo.y. DO NOT EDIT.
package foo

Workaround is to add a new line

%{

package foo
%}

but it's pretty dumb to have to do that.

@gopherbot gopherbot added this to the Unreleased milestone Jul 19, 2018
@jim-minter
Copy link
Author

@kwoodson @Kargakis fyi

@mvdan
Copy link
Member

mvdan commented Jul 19, 2018

cc @vishen

@gopherbot
Copy link

Change https://golang.org/cl/124995 mentions this issue: cmd/goyacc: append trailing newline to text "Code generated by goyacc"

@golang golang locked and limited conversation to collaborators Jul 19, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants