From d4eb197b49d4fde217b9d8a5e0e314c1fd56d4ed Mon Sep 17 00:00:00 2001 From: jochen Date: Tue, 24 Nov 2026 00:14:57 +0100 Subject: [PATCH] Design 47 H2: H-A-633, a Go package artifact's import set is listed in the environment its build uses (issue 1984) --- .../01-to-be/47-milestones/H2-lead-answers-3.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/03-DESIGN/01-to-be/47-milestones/H2-lead-answers-3.md b/03-DESIGN/01-to-be/47-milestones/H2-lead-answers-3.md index 45995305..b6ba8dea 100644 --- a/03-DESIGN/01-to-be/47-milestones/H2-lead-answers-3.md +++ b/03-DESIGN/01-to-be/47-milestones/H2-lead-answers-3.md @@ -546,3 +546,18 @@ where the design and the code disagree; the lead's answers follow, each against does not take it for the first one (principle 3: each step says what is true, as H-A-629 (2) does for the phase; principle 7: the existing event, no new one). How it is checked: a row of the composition run's unit tests (after the put, a reader's newest `wait-held` is for a build node). Principles 3 and 7. +- **H-A-633 (a Go package artifact's import set is listed in the environment its build uses, 00:14)** 24 Nov, issue 1984; + answers the fault main.510 met (mesh-delivery-contracts' build on the build node, "the imports of + mesh-delivery-contracts: go list of go-containerimageregistryclient: ... module lookup disabled by GOPROXY=off"): + the Go build module's import step, which lists each path of a package artifact as H-A-518, H-A-541 and H-A-532 + DQ-5 say, runs every listing with the environment of the module's directory, while the build of that path runs with + the environment of the path's own directory: its own module file of the fetch's pins and the tree a package of the + module's own repository is built from. So a path whose Go module requires another module of its own repository at + the zero version, as a contracts client requires mesh-delivery-sdk, builds and is published, then fails its listing. + Each listing runs with the environment the build gives that path's directory, never a second one (principle 3: the + import set is read as the build resolved it, never a failure where the build passed; principle 7: the existing + environment, no new one). The quick fix and the thorough fix are one here: the fetch already takes each directory's + own module file. In the Go build module (mesh-catalog). How it is checked: a row of the import step's unit tests + where a package path's Go module requires a module of its own repository at the zero version, resolved only through + that path's module file, and its listing names that module's imports; live, the next pipeline whose movers hold + mesh-delivery-contracts passes its build. Principles 3 and 7.