Merge main into the branch: the assignment's placement sits beside the mesh's own place (issue 174)

This commit is contained in:
2026-09-30 23:47:09 +02:00
7 changed files with 610 additions and 5 deletions
+7
View File
@@ -67,11 +67,18 @@ func dataRoot(with Rendering) string {
func dirsFor(m Manifest, with Rendering) map[string]string {
dirs := map[string]string{}
var beneath []map[string]any
// The assignment's placement wins over both (novox/hq issue 153). Refused elsewhere when
// malformed; here an invalid setting simply places nothing.
placed, _ := Places(m, with.Settings[m.Module])
for _, r := range m.Resources {
if fmt.Sprint(r["type"]) != "directory" {
continue
}
id := fmt.Sprint(r["id"])
if p, said := placed[id]; said {
dirs[id] = p.Path
continue
}
if path, stated := r["path"].(string); stated && path != "" {
if strings.HasPrefix(path, "${dir:") {
beneath = append(beneath, r)