-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Fix []int8 to []byte in disk/disk_openbsd.go due to x/sys/unix type change #1310
Conversation
Per change in x/sys/unix, these Statfs_t fields are now converted to []byte rather than []int8. Callers with updated x/sys/unix versions will now see something like: > Error: ../../../go/pkg/mod/github.com/shirou/[email protected]+incompatible/disk/disk_openbsd.go:59:53: cannot use stat.F_mntfromname[:] (type []byte) as type []int8 in argument to common.IntToString > Error: ../../../go/pkg/mod/github.com/shirou/[email protected]+incompatible/disk/disk_openbsd.go:60:51: cannot use stat.F_mntonname[:] (type []byte) as type []int8 in argument to common.IntToString > Error: ../../../go/pkg/mod/github.com/shirou/[email protected]+incompatible/disk/disk_openbsd.go:61:52: cannot use stat.F_fstypename[:] (type []byte) as type []int8 in argument to common.IntToString > Error: ../../../go/pkg/mod/github.com/shirou/[email protected]+incompatible/disk/disk_openbsd.go:149:45: cannot use stat.F_fstypename[:] (type []byte) as type []int8 in argument to common.IntToString It is probably prudent to update to the newer struct definitions as a result. See also: https://groups.google.com/g/golang-codereviews/c/bPBR9-4hV6E See also: https://go-review.googlesource.com/c/sys/+/407195/2 See also: golang/sys@bc2c85a Signed-off-by: Alexander Scheel <[email protected]>
Updated via: $ go get -u golang.org/x/sys && go mod tidy We now require upstream commit bc2c85a on OpenBSD due to type changes. Signed-off-by: Alexander Scheel <[email protected]>
FWIW, I tested this on an OpenBSD 7.1 machine and it passed.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the fix and the link to the detailed information. It is very easy to understand. Awesome!
Hi, @shirou! Do you happen to have an estimate for when this will land in a release? We're looking to get this updated in Vault to move some other dependencies forward. Thank you! |
gopsutil has a monthly based release policy. so we will release end of June. |
This was noticed in the Hashicorp Vault CI pipelines during cross-compilation to OpenBSD.
See also: #1309 for context around this change in upstream
x/sys/unix
.Resolves: #1309
N.B.: I don't have access to a OpenBSD box to test this out natively.See comment below, thanks @schultz-is!