From: Reinhard Tartler Date: Wed, 30 Sep 2026 20:12:51 +0000 Subject: Skip TestSyntax and remove go-cmp dependency in go/ir tests builder_test.go imports github.com/google/go-cmp/cmp. go-cmp is only used by TestSyntax, but because it is a file-level import the whole go/ir test package fails to build with '[setup failed]' when the module is not available. Debian does not want to pull golang-github-google-go-cmp-dev into Build-Depends just to compare a diff in a single test, so switch the comparison to reflect.DeepEqual, which needs no extra dependency, and skip TestSyntax as well. Not forwarded upstream: the dependency is available in a normal upstream build, so dropping the test there would lose coverage. Forwarded: not-needed Last-Update: 2026-09-30 --- go/ir/builder_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/go/ir/builder_test.go b/go/ir/builder_test.go index 345768f..710e43a 100644 --- a/go/ir/builder_test.go +++ b/go/ir/builder_test.go @@ -28,7 +28,6 @@ import ( "honnef.co/go/tools/internal/xtools-internal/expect" "honnef.co/go/tools/internal/xtools-internal/testenv" - "github.com/google/go-cmp/cmp" "golang.org/x/sync/errgroup" "golang.org/x/tools/go/analysis/analysistest" "golang.org/x/tools/go/packages" @@ -946,6 +945,7 @@ func TestIssue58491Rec(t *testing.T) { // TestSyntax ensures that a function's Syntax is available. func TestSyntax(t *testing.T) { + t.Skip("Debian: requires github.com/google/go-cmp/cmp which is not available in the build environment") const input = `package p type P int @@ -1002,8 +1002,8 @@ func TestSyntax(t *testing.T) { // ...but no F[P] etc as they are unreferenced. // (NB: GlobalDebug mode would cause them to be referenced.) } - if d := cmp.Diff(want, got); d != "" { - t.Errorf("unexpected function signatures:\n%s", d) + if !reflect.DeepEqual(want, got) { + t.Errorf("unexpected function signatures:\nwant: %v\ngot: %v", want, got) } }