aristanetworks / goarista

Fairly general building blocks used in Arista Go code and open-sourced for the benefit of all.
Apache License 2.0
206 stars 66 forks source link

deal with go-tip errors in test.Diff #34

Closed rski closed 10 months ago

rski commented 5 years ago

since commit

37f84817247d3b8e687a701ccb0d6bc7ffe3cb78 Author: Marcel van Lohuizen mpvl@golang.org AuthorDate: Fri Feb 22 23:41:38 2019 +0100 Commit: Marcel van Lohuizen mpvl@golang.org CommitDate: Wed Feb 27 19:07:22 2019 +0000

Parent: 1d992f2e36 math/big: better initial guess for nat.sqrt Contained: master Follows: go1.12beta2 (261)

errors: add Frame and Formatter/Printer interfaces

errors.New now implements Formatter and includes Frame information that is reported when detail is requested.

Partly implements proposal Issue #29934.

Change-Id: Id76888d246d7d862595b5e92d517b9c03f23a7a6 Reviewed-on: https://go-review.googlesource.com/c/163557 Run-TryBot: Marcel van Lohuizen mpvl@golang.org TryBot-Result: Gobot Gobot gobot@golang.org Reviewed-by: Damien Neil dneil@google.com

It seems that test.Diffing two errors returns something like

Diff:attributes "Error" are different: attributes "frame" are different: attributes "frames" are different: In arrays, values are different at index 1: uintptr(8313386) != uintptr(4636598)

rski commented 5 years ago

See; https://github.com/golang/go/issues/29934 there is some pushback because this breaks reflect.DeepEqual. Until this is fixed in go, I don't see a reason to fix goarista