go: x/sys/windows: API break in SecurityAttributes struct

What version of Go are you using (go version)?

$ go version
go version go1.11.13 darwin/amd64

Does this issue reproduce with the latest release?

Yes

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
N/A

What did you do?

In this revision of x/sys, there was a breaking API change: https://github.com/golang/sys/commit/5c00192e8ce6429d705e1e4d83b4b22e79482964#diff-c4ffa695b270239c949ef5b31be6c4f5

This means that Docker doesn’t compile any more: https://github.com/moby/moby/blob/master/pkg/system/filesys_windows.go#L112

What did you expect to see?

Successful compilation.

What did you see instead?

cannot use uintptr(unsafe.Pointer(&sd[0])) (type uintptr) as type *"golang.org/x/sys/windows".SECURITY_DESCRIPTOR in assignment

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 21 (17 by maintainers)

Commits related to this issue

Most upvoted comments

What happened to us, (and caused us to notice this break), was doing:

  • go get -u google.golang.org/grpc
  • go get -u github.com/golang/protobuf

then suddenly Docker stopped compiling, as x/sys/windows got updated. Then we had to search the history to find a version Docker still compiled against.

go get -u golang.org/x/sys@acfa387b8d69adbeab4af0736737d42b9f2e8254

It wasn’t the end of the world, but pretty inconvenient.

Modules only help if we tag the sources appropriately, which we aren’t doing. And a breaking change requires changing the import path to golang.org/x/sys/windows/v2, which seems undesirable for a minor change like this.

I guess if this is underway we can continue. But let’s please pay more attention to breaking changes.