Fold attribute names out of their constant inputs when the graph compiles

`compute_layouts` resolves every name-from-input write against the text
its name input carries, so a folded meta is indistinguishable from a
marker node's and the layout holds a `&'static str` from there on. That
leaves nowhere for a name to be computed, which is the whole of the
rule: a name input that is not a constant is refused right here, per
node, with the path the editor pins its diagnostic to.

One name carries one value type, checked across the census and the
names a node folds together, so no graph can declare one field at two
widths. `compute_layouts` returns those refusals rather than panicking.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Dennis Kobert
2026-09-09 08:51:05 +00:00
parent 4f12de68a7
commit db9a59aa7d
5 changed files with 157 additions and 3 deletions

View File

@@ -721,7 +721,7 @@ mod test {
fn build_executor(mut network: ProtoNetwork) -> DynamicExecutor {
network.resolve_types(&node_registry::NODE_REGISTRY).unwrap();
network.compute_layouts();
network.compute_layouts().unwrap();
DynamicExecutor::new(network).unwrap()
}