1
0
mirror of https://github.com/golang/go synced 2024-11-22 20:24:47 -07:00
go/doc/next
Austin Clements f9a95b1bdc cmd/go: print build errors during go test -json in JSON
Currently, if a test or imported package fails to build during "go
test -json", the build error text will be interleaved with the JSON
output of tests. Furthermore, there’s currently no way to reliably
associate a build error with the test package or packages it affected.
This creates unnecessary friction and complexity in tools that consume
the "go test -json" output.

This CL makes "go test -json" enable JSON reporting of build errors.
It also adds a "FailedBuild" field to the "fail" TestEvent, which
gives the package ID of the package that failed to build and caused
the test to fail.

Using this, CI systems should be able to consume the entire output
stream from "go test -json" in a structured way and easily associate
build failures with test failures during reporting.

Fixes #62067.
Updates #35169.
Updates #37486.

Change-Id: I49091dcc7aa52db01fc9fa6042771633e97b8407
Reviewed-on: https://go-review.googlesource.com/c/go/+/536399
Reviewed-by: Russ Cox <rsc@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2024-11-17 14:32:05 +00:00
..
6-stdlib runtime: implement AddCleanup 2024-11-16 03:26:04 +00:00
1-intro.md doc: initialize next directory for Go 1.24 2024-07-22 17:55:04 +00:00
2-language.md doc: initialize next directory for Go 1.24 2024-07-22 17:55:04 +00:00
3-tools.md cmd/go: print build errors during go test -json in JSON 2024-11-17 14:32:05 +00:00
4-runtime.md doc: initialize next directory for Go 1.24 2024-07-22 17:55:04 +00:00
5-toolchain.md cmd/dist: require Go 1.22.6 as minimum bootstrap toolchain 2024-08-20 17:52:42 +00:00
7-ports.md doc/next: pre-announce dropping macOS 11 support 2024-11-15 16:11:06 +00:00