Read the foundation's ports from each node's settings, wherever a port is used (hq ADR 0100)
This commit is contained in:
@@ -101,6 +101,11 @@ func settle(base map[string]any, layers []Layer, protected map[string]bool, what
|
||||
merged := deepCopy(base)
|
||||
for _, layer := range layers {
|
||||
for key, value := range layer.Values {
|
||||
if key == PortsSetting {
|
||||
// Where the machine puts a port is the mesh's to apply, not a value for a file or
|
||||
// for what a consumer is told (novox/hq ADR 0100); it reaches both as the port.
|
||||
continue
|
||||
}
|
||||
if protected[key] {
|
||||
// The module said it must own this one. Refused rather than ignored: a setting
|
||||
// that is quietly dropped is somebody believing they changed something.
|
||||
@@ -176,6 +181,11 @@ func UnusedSettings(m Manifest, layers []Layer) []string {
|
||||
if key == ExposeSetting && len(m.Listens) > 0 {
|
||||
continue
|
||||
}
|
||||
// `ports` gives a module's port a machine port on one node (novox/hq ADR 0100),
|
||||
// validated in GivenPorts, so it is not stray here either.
|
||||
if key == PortsSetting {
|
||||
continue
|
||||
}
|
||||
unused = append(unused, fmt.Sprintf(
|
||||
"%s sets %q, and %s has no file or contribution to merge it into",
|
||||
layer.From, key, m.Module))
|
||||
|
||||
Reference in New Issue
Block a user