Resolve scopes before flattening network (#4235)

* Compiler changes

* Run preprocessor on wrapping network

* Remove test nodes

* FIx

* move generate_node_paths call to compiler

* Make it more obvious what input is set to
This commit is contained in:
Timon
2026-06-15 14:39:55 +00:00
committed by Keavon Chambers
parent 34e0fd7757
commit 077d11bdba
8 changed files with 132 additions and 110 deletions

View File

@@ -242,10 +242,10 @@ fn compile_graph(document_string: String, editor_api: Arc<PlatformEditorApi>) ->
let mut network = load_network(&document_string);
fix_nodes(&mut network);
let preprocessor = preprocessor::Preprocessor::new();
preprocessor.expand_network(&mut network, &ResourceRegistry::default()).expect("Failed to expand network"); // TODO: actually load the resources from the document
let mut wrapped_network = wrap_network_in_scope(network, editor_api);
let wrapped_network = wrap_network_in_scope(network.clone(), editor_api);
let preprocessor = preprocessor::Preprocessor::new();
preprocessor.preprocess(&mut wrapped_network, &ResourceRegistry::default()).expect("Failed to expand network"); // TODO: actually load the resources from the document
let compiler = Compiler {};
compiler.compile_single(wrapped_network).map_err(|x| x.into())