runPending needs to print valid JSON to w.out when dist is invoked in -json mode. It normally does this because it runs a go test -json command, except we missed that in the case it prints a skip message. This causes consumers of dist test -json output to encounter non-JSON in such cases, and making sense of that can be wasteful of human time.
The fix is fairly trivial, but the diff ended up a bit bigger than I'd like as a result of cleaning things up and writing down more of how work fields are used. So I'll split most of that into a separate CL for Go 1.22, and do a minimal safe fix for Go 1.21.
CC @golang/release, @aclements.
runPending needs to print valid JSON to w.out when dist is invoked in -json mode. It normally does this because it runs a go test -json command, except we missed that in the case it prints a skip message. This causes consumers of dist test -json output to encounter non-JSON in such cases, and making sense of that can be wasteful of human time.
The fix is fairly trivial, but the diff ended up a bit bigger than I'd like as a result of cleaning things up and writing down more of how
workfields are used. So I'll split most of that into a separate CL for Go 1.22, and do a minimal safe fix for Go 1.21.CC @golang/release, @aclements.