aboutsummaryrefslogtreecommitdiff
path: root/src/runtime
diff options
context:
space:
mode:
authorAlan Donovan <adonovan@google.com>2025-09-11 11:02:03 -0400
committerGopher Robot <gobot@golang.org>2025-09-12 14:16:27 -0700
commitac803b5949f6dbc5bfa559afe506d35f9e1b3195 (patch)
tree43a7ece5665a0e676ea7f6093a65990d7628e189 /src/runtime
parent889e71c2ac43f22dbd41c0b935acac2e778c8f87 (diff)
downloadgo-ac803b5949f6dbc5bfa559afe506d35f9e1b3195.tar.xz
cmd/go/internal/work: copy vet tool's stdout to our stdout
The go command connects both the stdout and stderr files of its child commands (cmd/compile, cmd/vet, etc) to the go command's own stderr. If the child command is supposed to produce structure output on stderr, as is the case for go vet -json or go fix -diff, it will be merged with the error stream, making it useless. This change to the go vet <-> unitchecker protocol specifies the name of a file into which the vet tool should write its stdout. On success, the go command will then copy the entire content of that file to its own stdout, under a lock. This ensures that partial writes to stdout in case of failure, concurrent writes to stdout by parallel vet tasks, or other junk on stderr, cannot interfere with the integrity of the go command's structure output on stdout. CL 702835 is the corresponding change on the x/tools side. For #75432 Change-Id: Ib4db25b6b0095d359152d7543bd9bf692551bbfa Reviewed-on: https://go-review.googlesource.com/c/go/+/702815 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Michael Matloob <matloob@google.com> Auto-Submit: Alan Donovan <adonovan@google.com>
Diffstat (limited to 'src/runtime')
0 files changed, 0 insertions, 0 deletions