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
With Go 1.12:
$ go test -v -run=TestForeachRepo -count=1 golang.org/x/build/maintner === RUN TestForeachRepo --- PASS: TestForeachRepo (0.00s) github_test.go:751: Tested Reviews PASS ok golang.org/x/build/maintner 0.146s
With Go tip (at commit df557fe):
$ gotip test -v -run=TestForeachRepo -count=1 golang.org/x/build/maintner === RUN TestForeachRepo --- FAIL: TestForeachRepo (0.00s) github_test.go:743: Will Error: ForeachReview errs differ. got: Planned Failure, want: Planned Failure github_test.go:743: Will Error Late: ForeachReview errs differ. got: Planned Failure, want: Planned Failure github_test.go:751: Tested Reviews FAIL FAIL golang.org/x/build/maintner 0.148s
I suspect it's because of 6be6f11. It changed the internal representation of the result of fmt.Errorf, making it so that !deep.ReflectEqual no longer compares favorably in github_test.go#L742-L744:
fmt.Errorf
!deep.ReflectEqual
if !reflect.DeepEqual(tt.wantErr, err) { t.Errorf("%s: ForeachReview errs differ. got: %s, want: %s", tt.name, err, tt.wantErr) }
This makes trybots in x/build repo fail, e.g., https://go-review.googlesource.com/c/build/+/163205/2#message-8c683121b60291567babee1aed8cd19a0f83bfc6.
/cc @bradfitz
The text was updated successfully, but these errors were encountered:
We could switch to using https://github.com/google/go-cmp instead of reflect.
Sorry, something went wrong.
That sounds like a good fix for the issue in x/build/maintner.
Since it was just two error values being compared, and not a more deeply nested struct, I went with a simpler solution in CL 164297 for now.
error
Change https://golang.org/cl/164297 mentions this issue: maintner: compare errors via their public API
maintner: compare errors via their public API
golang/build@d93cedd
No branches or pull requests
With Go 1.12:
With Go tip (at commit df557fe):
I suspect it's because of 6be6f11. It changed the internal representation of the result of
fmt.Errorf
, making it so that!deep.ReflectEqual
no longer compares favorably in github_test.go#L742-L744:This makes trybots in x/build repo fail, e.g., https://go-review.googlesource.com/c/build/+/163205/2#message-8c683121b60291567babee1aed8cd19a0f83bfc6.
/cc @bradfitz
The text was updated successfully, but these errors were encountered: