Deprecate automatic composition (#3088)

* Make manual_compositon non optional and rename to call_argument

* Fix clippy warnings

* Remove automatic composition compiler infrastructure

* Implement document migration

* Fix tests

* Fix compilation on web

* Fix doble number test

* Remove extra parens

* Cleanup

* Update demo artwork

* Remove last compose node mention

* Remove last mention of manual composition
This commit is contained in:
Dennis Kobert
2025-08-24 10:34:59 +02:00
committed by GitHub
parent bb364c92ad
commit d9cbf975ff
29 changed files with 184 additions and 676 deletions

View File

@@ -1,6 +1,6 @@
use dyn_any::StaticType;
pub use graph_craft::proto::{Any, NodeContainer, TypeErasedBox, TypeErasedNode};
use graph_craft::proto::{DynFuture, FutureAny, SharedNodeContainer};
use graph_craft::proto::{FutureAny, SharedNodeContainer};
use graphene_core::NodeIO;
use graphene_core::WasmNotSend;
pub use graphene_core::registry::{DowncastBothNode, DynAnyNode, FutureWrapperNode, PanicNode};
@@ -19,27 +19,6 @@ where
}
}
pub struct ComposeTypeErased {
first: SharedNodeContainer,
second: SharedNodeContainer,
}
impl<'i> Node<'i, Any<'i>> for ComposeTypeErased {
type Output = DynFuture<'i, Any<'i>>;
fn eval(&'i self, input: Any<'i>) -> Self::Output {
Box::pin(async move {
let arg = self.first.eval(input).await;
self.second.eval(arg).await
})
}
}
impl ComposeTypeErased {
pub const fn new(first: SharedNodeContainer, second: SharedNodeContainer) -> Self {
ComposeTypeErased { first, second }
}
}
pub fn input_node<O: StaticType>(n: SharedNodeContainer) -> DowncastBothNode<(), O> {
downcast_node(n)
}