Files
mesh-delivery/modules/mesh-delivery-builder/internal/build/toolchains.go
T
jschoubben 71a35a6376 MV1: move contracts and sdk under modules/, importers follow
The delivery repository's contracts and SDK live under modules/ as
mesh-delivery-contracts and mesh-delivery-sdk, their Go module paths
renamed to match the folders (the TypeScript names already did), and
every importer in mesh-delivery, mesh-catalog, mesh-host, mesh-tools
and mesh-sdk follows in the same group: a design as it should be, one
path per module, checked by the group's check building every importer.

Builds: design 47 G §427, §88

Claude-Session: https://claude.ai/code/session_01NcbgfGKaxw984XyAPfLm4h
2026-11-12 05:09:56 +01:00

29 lines
1.1 KiB
Go

package build
import (
"git.novox.be/novox/mesh-delivery/modules/mesh-delivery-builder/builds"
"git.novox.be/novox/mesh-delivery/modules/mesh-delivery-contracts/go/seats/meshcatalog"
sdkstep "git.novox.be/novox/mesh-delivery/modules/mesh-delivery-sdk/buildstep"
)
// CatalogToolchains are the toolchains of a build, by language, as a module's value holds them (the catalog's form names
// the language in the entry).
func CatalogToolchains(used map[string]builds.ToolchainUsed) map[string]meshcatalog.ToolchainUsed {
if used == nil {
return nil
}
out := make(map[string]meshcatalog.ToolchainUsed, len(used))
for language, t := range used {
out[language] = meshcatalog.ToolchainUsed{Language: language, Recipe: t.Recipe, Version: t.Version}
}
return out
}
// buildToolchain is the toolchain a build ask names for a language (the ask's form names the language in the entry).
func buildToolchain(language string, t *builds.ToolchainUsed) *sdkstep.ToolchainUsed {
if t == nil {
return nil
}
return &sdkstep.ToolchainUsed{Language: language, Recipe: t.Recipe, Version: t.Version}
}