From ea25e4d5891859936cb76c3286dfc41627e74b7a Mon Sep 17 00:00:00 2001 From: jochen Date: Sat, 7 Nov 2026 08:14:15 +0100 Subject: [PATCH] The compose test downloads the composer's modules as the fetch step does, so no cache of this machine decides (issue 1921, milestone 47/G, the group check of c5d32074c945) Claude-Session: https://claude.ai/code/session_01NcbgfFSnn24M3GcqttoU7i --- .../cmd/mesh-build-go/compose_integration_test.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/modules/mesh-build-go/cmd/mesh-build-go/compose_integration_test.go b/modules/mesh-build-go/cmd/mesh-build-go/compose_integration_test.go index a29837621..e69064ac5 100644 --- a/modules/mesh-build-go/cmd/mesh-build-go/compose_integration_test.go +++ b/modules/mesh-build-go/cmd/mesh-build-go/compose_integration_test.go @@ -5,6 +5,7 @@ package main import ( "context" "encoding/json" + "fmt" "io/fs" "os" "os/exec" @@ -190,6 +191,14 @@ func TestAComposeAskIsBuiltOnceAndAnsweredOnTheBus(t *testing.T) { return nil, err } workFile = filepath.Join(m.Work, ws, "go.work") + // What the real fetch does before any build (fetchInto, downloadAndVerify): every module the graph + // names is downloaded into the cache, so the build with GOPROXY=off needs none, however much of the + // graph this machine's cache (filled by this module's own build) lacks. Go here is the same go + // command in the same environment, with the workspace in place of the tree's own go.mod. + r := m.Run(ctx, m.goEnv(), "go", "-C", tree, "mod", "download") + if r.Status != 0 || r.Err != "" { + return nil, fmt.Errorf("NOT CHECKED: the composer's modules cannot be downloaded as the fetch step downloads them: %s", causeLine(r.Err+"\n"+r.Stdout+"\n"+r.Stderr)) + } } return map[string]any{"workspace": ws}, nil }