Currently at tip, the only package from x/sys vendored into the std module of the main Go repo is x/sys/cpu, and the dependency policy permits x/sys/cpu to only have "OS" package as dependencies:
https://cs.opensource.google/go/go/+/master:src/go/build/deps_test.go;l=222-223;drc=080aa8e9647e5211650f34f3a93fb493afbe396d
go.dev/cl/740880 added x/sys/windows as a dependency to x/sys/cpu, so whenever a newer version of x/sys gets vendored into the main Go repo, that policy will get violated as reported by the TestDependencies test:
$ go test go/build
--- FAIL: TestDependencies (2.12s)
deps_test.go:922: unexpected dependency: golang.org/x/sys/cpu imports [golang.org/x/sys/windows]
deps_test.go:922: unexpected dependency: golang.org/x/sys/windows imports [bytes encoding/binary errors fmt net runtime strings sync sync/atomic syscall time unicode/utf16 unsafe]
FAIL
FAIL go/build 2.964s
The policy stated in deps_test.go:
// DO NOT CHANGE THIS DATA TO FIX BUILDS.
// Existing packages should not have their constraints relaxed
// without prior discussion.
So the discussion should happen first, and it doesn't seem that has happened yet. For now I'll do a roll back to resolve this, and the CL can be applied again after discussion or potentially by avoiding the use of the x/sys/windows import.
Currently at tip, the only package from x/sys vendored into the std module of the main Go repo is x/sys/cpu, and the dependency policy permits x/sys/cpu to only have "OS" package as dependencies:
https://cs.opensource.google/go/go/+/master:src/go/build/deps_test.go;l=222-223;drc=080aa8e9647e5211650f34f3a93fb493afbe396d
go.dev/cl/740880 added x/sys/windows as a dependency to x/sys/cpu, so whenever a newer version of x/sys gets vendored into the main Go repo, that policy will get violated as reported by the TestDependencies test:
The policy stated in deps_test.go:
So the discussion should happen first, and it doesn't seem that has happened yet. For now I'll do a roll back to resolve this, and the CL can be applied again after discussion or potentially by avoiding the use of the x/sys/windows import.