mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-24 09:58:11 +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:
co-authored by
Claude Fable 5
parent
0001cdf04d
commit
348e9022a6
@@ -20,7 +20,7 @@ impl Compiler {
|
||||
proto_networks.map(move |mut proto_network| {
|
||||
proto_network.insert_context_nullification_nodes()?;
|
||||
let _ = proto_network.resolve_types(registry);
|
||||
proto_network.compute_layouts();
|
||||
proto_network.compute_layouts().map_err(|errors| errors.iter().map(|error| format!("{:?}", error.error)).collect::<Vec<_>>().join("\n"))?;
|
||||
proto_network.generate_stable_node_ids();
|
||||
Ok(proto_network)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user