mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-15 22:28:10 +08:00
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:
@@ -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()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user