From d7a758894a9a2f4b8a9979d5fefb2b331672999c Mon Sep 17 00:00:00 2001 From: jochen Date: Tue, 27 Oct 2026 21:03:17 +0100 Subject: [PATCH] Leave a module the node runs inside its own composition to its manifest, as the fold composes it, so taking builds in moves no folded module (issue 1126) --- go/compose/frombus/frombus.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/go/compose/frombus/frombus.go b/go/compose/frombus/frombus.go index bf8f4ed..0c1c28f 100644 --- a/go/compose/frombus/frombus.go +++ b/go/compose/frombus/frombus.go @@ -35,6 +35,7 @@ import ( "encoding/json" "fmt" "net/netip" + "slices" "sort" "strings" @@ -398,7 +399,9 @@ func fromBuilds(ctx context.Context, r Reader, in *compose.Input, s Scope, p del } for _, pm := range p.Modules { m, ok := modules[pm.Module] - if !ok || m.FP2 == "" || s.KeptAt[pm.Module] != "" { + if !ok || m.FP2 == "" || s.KeptAt[pm.Module] != "" || slices.Contains(s.InOwn, pm.Module) { + // A module it runs inside its own composition is composed there as before: no build of the new form is what + // it runs (Scope.InOwn). continue } if man, ok := in.Catalogue[pm.Module]; !ok || (man.Build == nil && !man.Templated()) {