package build import ( "context" "git.novox.be/novox/mesh-delivery/modules/mesh-delivery-builder/builds" "git.novox.be/novox/mesh-delivery/modules/mesh-delivery-sdk/buildstep" ) // agreedFor are the toolchains the build nodes agree on now, for the languages of the manifest's plan: the toolchains the // candidate's fingerprint was computed with, as the indexer recomputes it whenever they change. A language with none agreed // is left out, and the build then waits for it as the trunk's does. func (b *Builder) agreedFor(ctx context.Context, manifest string) map[string]builds.ToolchainUsed { plan, err, _ := b.planOf(ctx, manifest) if err != nil { return nil } out := map[string]builds.ToolchainUsed{} for _, bm := range plan.Modules() { if !plan.NeedsToolchain(bm) { continue } language, _ := b.Seats.LanguageOf(bm) if tc, none := buildstep.AgreedToolchain(b.Toolchains.Entries(language)); none == "" { out[language] = builds.ToolchainUsed{Version: tc.Version, Recipe: tc.Recipe} } } if len(out) == 0 { return nil } return out }