Add an env-gated inferred type dump

This commit is contained in:
Dennis Kobert
2026-08-22 20:59:37 +00:00
parent c4b22c03b9
commit cdc6f11d92

View File

@@ -847,6 +847,9 @@ impl TypingContext {
// Get the node input type from the proto node declaration
let impls = self.lookup.get(&node.identifier).ok_or_else(|| vec![GraphError::new(node, GraphErrorType::NoImplementations)])?;
let (node_io, entry) = resolve_entry(node, &inputs, impls)?;
if std::env::var("GRAPHENE_TYPE_DEBUG").is_ok() {
eprintln!("type {} {} -> {}", node_id, node.identifier, node_io.ty());
}
self.inferred.insert(node_id, node_io.clone());
self.constructor.insert(node_id, entry.constructor);
Ok(node_io)