-
Notifications
You must be signed in to change notification settings - Fork 17.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cmd/go: go test -json has non-JSON printed to stdout when build fails #35169
Comments
This issue might be related to (or a duplicate of) #23037 but I'm not sure because that ticket seems to ask for |
/cc @bcmills @jayconrod |
For now I believe the rule is that stdout gets JSON and stderr gets non-JSON. We should probably open a separate issue for structuring go build's failures (go build -json?) and then we'd just enable it during go test -json too. |
Change https://go.dev/cl/529120 mentions this issue: |
Change https://go.dev/cl/536399 mentions this issue: |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Run
go test -json
when a package has a build failure. Here is myexample_test.go
:What did you expect to see?
I expected to see JSON events similar to when a package is skipped because it has no tests. Here is an example:
What did you see instead?
The package result is printed as-is to stdout:
The text was updated successfully, but these errors were encountered: