mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-15 22:28:10 +08:00
Keep the name placeholder out of the kernel entirely
A name input declares where a placeholder's name is wired and nothing more. The name is spent resolving the layout when the graph compiles, so the kernel neither declares it nor is passed it; the return type's `Named<X, V>` is the only tie between the write slot and the folded name. The wire is untouched: the input keeps its declared position and crosses as constant text, so a document's input order is unchanged. The placeholder stays a concrete token, so it adds no generic for the node to carry and none to go unconstrained. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -376,8 +376,8 @@ pub fn stamp_layer_path<'e, T>(ctx: impl Ctx + ExtractArena<'e>, element: T, pat
|
||||
pub fn write_attribute<'e, T, V: WireValue>(
|
||||
ctx: impl Ctx + ExtractArena<'e>,
|
||||
content: T,
|
||||
/// The attribute name, which the compiler folds and the kernel never reads.
|
||||
_name: Named<Name0>,
|
||||
/// The attribute name, folded into the layout when the graph compiles.
|
||||
name: Named<Name0>,
|
||||
#[implementations(f64, u32, u64, bool, DVec2, DAffine2, Color, Vec<NodeId>, String)] value: V,
|
||||
) -> Result<(T, Attr<'e, Named<Name0, V::Row>>), Interrupt> {
|
||||
let parked = value.park(ctx.arena()).ok_or(GraphError {
|
||||
|
||||
Reference in New Issue
Block a user