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/sys/unix: extra trailing newlines in zsyscall_openbsd_*.go files #64820

Closed
jrick opened this issue Dec 20, 2023 · 1 comment
Closed

x/sys/unix: extra trailing newlines in zsyscall_openbsd_*.go files #64820

jrick opened this issue Dec 20, 2023 · 1 comment
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@jrick
Copy link
Contributor

jrick commented Dec 20, 2023

Opening a tracking issue for something reported to me by @jtagcat via email:

Hey, you made a change with extra newlines: https://cs.opensource.google/go/x/sys/+/661d749b94a62dfdcbe1027bb3c2cdea498377b9

Could you please ensure one (not two) newline at the end of files? It is non-standard and giving errors with my global pre-commit
hook.

git diff --check --staged

vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go:2300: new blank line at EOF.
vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go:2300: new blank line at EOF.
vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go:2300: new blank line at EOF.
vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.go:2300: new blank line at EOF.
vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.go:2300: new blank line at EOF.
vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.go:2300: new blank line at EOF.
vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.go:2300: new blank line at EOF.

https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206
https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_403

Thanks

-jc

This is due to a custom generator script I created to generate just these syscall files without running mkall.sh, which can not cross generate for other host arches.

@gopherbot gopherbot added the compiler/runtime Issues related to the Go compiler and/or runtime. label Dec 20, 2023
@gopherbot gopherbot added this to the Unreleased milestone Dec 20, 2023
jrick added a commit to jrick/sys that referenced this issue Dec 20, 2023
These newlines are written by mksyscall.go but should not appear in the final
generated files once the output is passed through gofmt.  This is done by
mkall.sh but I had written a custom script just to generate these openbsd
zsyscall files in CL 468095.

Running the mksyscall.go output through gofmt fixes this issue.

Fixes golang/go#64820
@gopherbot
Copy link
Contributor

Change https://go.dev/cl/551715 mentions this issue: unix: remove extra trailing newlines in zsyscall_openbsd_*.go

@thanm thanm added the NeedsFix The path to resolution is known, but the work has not been done. label Dec 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants