Files
dsl_flow/doc/performance-default.md
ayou 81da0fe61f feat: 重构项目结构并添加核心功能
refactor: 将代码按功能模块重新组织到 core/runtime/control 等目录
feat(core): 添加 Context、FlowNode 等核心 trait 和类型
feat(runtime): 实现 FlowEngine 和状态管理
feat(control): 添加顺序/并行/条件控制流节点
feat(nodes): 实现 HTTP/DB/MQ 等业务节点
docs: 更新 README 添加架构说明和快速开始示例
test: 添加性能测试脚本和示例代码
2025-12-14 23:50:40 +08:00

101 KiB

dsl-flow Test Performance

Default features

  • test_rhai_expr_set_and_get: Compiling dsl-flow v0.1.0 (/Users/yangshiyou/Develop/code/rust/dsl_flow/dsl-flow) warning: unused import: serde_json::Value --> dsl-flow/src/engine.rs:5:5 | 5 | use serde_json::Value; | ^^^^^^^^^^^^^^^^^ | = note: #[warn(unused_imports)] (part of #[warn(unused)]) on by default

warning: unused import: rhai::EvalAltResult --> dsl-flow/src/expr.rs:43:13 | 43 | use rhai::EvalAltResult; | ^^^^^^^^^^^^^^^^^^^

warning: unused imports: FlowNode and NodeRef --> dsl-flow/src/dsl.rs:1:19 | 1 | use crate::node::{FlowNode, NodeRef}; | ^^^^^^^^ ^^^^^^^

warning: unused imports: ForkJoinNode, GroupNode, and SequenceNode --> dsl-flow/src/dsl.rs:2:19 | 2 | use crate::node::{SequenceNode, ForkJoinNode, GroupNode, ExprSetNode, ExprGetNode, MergeMode}; | ^^^^^^^^^^^^ ^^^^^^^^^^^^ ^^^^^^^^^

warning: unused import: std::sync::Arc --> dsl-flow/src/dsl.rs:4:5 | 4 | use std::sync::Arc; | ^^^^^^^^^^^^^^

warning: unused import: FlowNode --> dsl-flow/src/engine.rs:3:19 | 3 | use crate::node::{FlowNode, NodeOutput, NodeRef, SequenceNode}; | ^^^^^^^^

warning: variable does not need to be mutable --> dsl-flow/src/expr.rs:34:13 | 34 | let mut engine = rhai::Engine::new(); | ----^^^^^^ | | | help: remove this mut | = note: #[warn(unused_mut)] (part of #[warn(unused)]) on by default

warning: field engine is never read --> dsl-flow/src/node.rs:102:5 | 100 | pub struct ExprSetNode { | ----------- field in this struct 101 | id: NodeId, 102 | engine: ExprEngineKind, | ^^^^^^ | = note: #[warn(dead_code)] (part of #[warn(unused)]) on by default

warning: field engine is never read --> dsl-flow/src/node.rs:135:5 | 133 | pub struct ExprGetNode { | ----------- field in this struct 134 | id: NodeId, 135 | engine: ExprEngineKind, | ^^^^^^

warning: field engine is never read --> dsl-flow/src/node.rs:270:5 | 268 | pub struct ConditionalNode { | --------------- field in this struct 269 | id: NodeId, 270 | engine: ExprEngineKind, | ^^^^^^

warning: dsl-flow (lib test) generated 10 warnings (10 duplicates) warning: dsl-flow (lib) generated 10 warnings (run cargo fix --lib -p dsl-flow to apply 6 suggestions) warning: unused import: serde_json::json --> dsl-flow/examples/basic.rs:2:5 | 2 | use serde_json::json; | ^^^^^^^^^^^^^^^^ | = note: #[warn(unused_imports)] (part of #[warn(unused)]) on by default

error[E0277]: the trait bound Arc<ForkJoinNode>: FlowNode is not satisfied --> dsl-flow/examples/basic.rs:9:26 | 9 | let flow = Flow::new(sequence! { | _____________________^ 10 | | expr_set(ExprEngineKind::Rhai, "1 + 2", "calc.sum"), 11 | | fork_join! { 12 | | expr_set(ExprEngineKind::Rhai, "ctx.calc.sum * 2", "calc.double"), ... | 15 | | }); | |^ the trait FlowNode is not implemented for Arc<ForkJoinNode> | = help: the following other types implement trait FlowNode: ConditionalNode DbNode ExprGetNode ExprSetNode ForkJoinNode GroupNode HttpNode LineageNode and 2 others = note: required for the cast from Arc<Arc<ForkJoinNode>> to Arc<dyn FlowNode> = note: this error originates in the macro sequence (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: ? couldn't convert the error: dyn std::error::Error + Send + Sync: Sized is not satisfied --> dsl-flow/examples/basic.rs:17:53 | 17 | let out = engine.run_stateless(&flow, ctx).await?; | --------------------------------------^ doesn't have a size known at compile-time | | | this can't be annotated with ? because it has type Result<_, Box<dyn std::error::Error + Send + Sync>> | = help: the trait Sized is not implemented for dyn std::error::Error + Send + Sync = note: the question mark operation (?) implicitly performs a conversion on the error value using the From trait = note: required for Box<dyn std::error::Error + Send + Sync> to implement std::error::Error = note: required for Box<dyn std::error::Error> to implement From<Box<dyn std::error::Error + Send + Sync>>

For more information about this error, try rustc --explain E0277. warning: dsl-flow (example "basic") generated 1 warning error: could not compile dsl-flow (example "basic") due to 2 previous errors; 1 warning emitted warning: build failed, waiting for other jobs to finish... error[E0277]: ? couldn't convert the error: dyn std::error::Error + Send + Sync: Sized is not satisfied --> dsl-flow/tests/flow_tests.rs:45:53 | 45 | let out = engine.run_stateless(&flow, ctx).await?; | --------------------------------------^ doesn't have a size known at compile-time | | | this can't be annotated with ? because it has type Result<_, Box<dyn std::error::Error + Send + Sync>> | = help: the trait Sized is not implemented for dyn std::error::Error + Send + Sync = note: the question mark operation (?) implicitly performs a conversion on the error value using the From trait = note: required for Box<dyn std::error::Error + Send + Sync> to implement std::error::Error = note: required for anyhow::Error to implement From<Box<dyn std::error::Error + Send + Sync>>

error[E0599]: no method named clone found for struct ConditionalNode in the current scope --> dsl-flow/tests/flow_tests.rs:62:46 | 62 | let flow = Flow::new(sequence! { (*cond).clone() }); | ^^^^^ method not found in ConditionalNode

error[E0277]: ? couldn't convert the error: dyn std::error::Error + Send + Sync: Sized is not satisfied --> dsl-flow/tests/flow_tests.rs:64:53 | 64 | let out = engine.run_stateless(&flow, ctx).await?; | --------------------------------------^ doesn't have a size known at compile-time | | | this can't be annotated with ? because it has type Result<_, Box<dyn std::error::Error + Send + Sync>> | = help: the trait Sized is not implemented for dyn std::error::Error + Send + Sync = note: the question mark operation (?) implicitly performs a conversion on the error value using the From trait = note: required for Box<dyn std::error::Error + Send + Sync> to implement std::error::Error = note: required for anyhow::Error to implement From<Box<dyn std::error::Error + Send + Sync>>

error[E0277]: ? couldn't convert the error: dyn std::error::Error + Send + Sync: Sized is not satisfied --> dsl-flow/tests/flow_tests.rs:112:53 | 112 | let out = engine.run_stateless(&flow, ctx).await?; | --------------------------------------^ doesn't have a size known at compile-time | | | this can't be annotated with ? because it has type Result<_, Box<dyn std::error::Error + Send + Sync>> | = help: the trait Sized is not implemented for dyn std::error::Error + Send + Sync = note: the question mark operation (?) implicitly performs a conversion on the error value using the From trait = note: required for Box<dyn std::error::Error + Send + Sync> to implement std::error::Error = note: required for anyhow::Error to implement From<Box<dyn std::error::Error + Send + Sync>>

error[E0277]: ? couldn't convert the error: dyn std::error::Error + Send + Sync: Sized is not satisfied --> dsl-flow/tests/flow_tests.rs:129:65 | 129 | let _out1 = engine.run_stateful(s, &flow, ctx.clone()).await?; | ------------------------------------------------^ doesn't have a size known at compile-time | | | this can't be annotated with ? because it has type Result<_, Box<dyn std::error::Error + Send + Sync>> | = help: the trait Sized is not implemented for dyn std::error::Error + Send + Sync = note: the question mark operation (?) implicitly performs a conversion on the error value using the From trait = note: required for Box<dyn std::error::Error + Send + Sync> to implement std::error::Error = note: required for anyhow::Error to implement From<Box<dyn std::error::Error + Send + Sync>>

error[E0277]: ? couldn't convert the error: dyn std::error::Error + Send + Sync: Sized is not satisfied --> dsl-flow/tests/flow_tests.rs:130:64 | 130 | let out2 = engine.run_stateful(s, &flow, ctx.clone()).await?; | ------------------------------------------------^ doesn't have a size known at compile-time | | | this can't be annotated with ? because it has type Result<_, Box<dyn std::error::Error + Send + Sync>> | = help: the trait Sized is not implemented for dyn std::error::Error + Send + Sync = note: the question mark operation (?) implicitly performs a conversion on the error value using the From trait = note: required for Box<dyn std::error::Error + Send + Sync> to implement std::error::Error = note: required for anyhow::Error to implement From<Box<dyn std::error::Error + Send + Sync>>

error[E0277]: ? couldn't convert the error: dyn std::error::Error + Send + Sync: Sized is not satisfied --> dsl-flow/tests/flow_tests.rs:146:53 | 146 | let out = engine.run_stateless(&flow, ctx).await?; | --------------------------------------^ doesn't have a size known at compile-time | | | this can't be annotated with ? because it has type Result<_, Box<dyn std::error::Error + Send + Sync>> | = help: the trait Sized is not implemented for dyn std::error::Error + Send + Sync = note: the question mark operation (?) implicitly performs a conversion on the error value using the From trait = note: required for Box<dyn std::error::Error + Send + Sync> to implement std::error::Error = note: required for anyhow::Error to implement From<Box<dyn std::error::Error + Send + Sync>>

error[E0599]: no method named clone found for trait object dyn dsl_flow::FlowNode in the current scope --> dsl-flow/tests/flow_tests.rs:159:71 | 159 | let group = group_merge! { "agg.group", merge_mode_array(), (*n1).clone(), (*n2).clone() }; | ^^^^^ method not found in dyn dsl_flow::FlowNode

error[E0599]: no method named clone found for trait object dyn dsl_flow::FlowNode in the current scope --> dsl-flow/tests/flow_tests.rs:159:86 | 159 | let group = group_merge! { "agg.group", merge_mode_array(), (*n1).clone(), (*n2).clone() }; | ^^^^^ method not found in dyn dsl_flow::FlowNode

error[E0599]: no method named clone found for struct GroupNode in the current scope --> dsl-flow/tests/flow_tests.rs:160:47 | 160 | let flow = Flow::new(sequence! { (*group).clone() }); | ^^^^^ method not found in GroupNode

error[E0277]: ? couldn't convert the error: dyn std::error::Error + Send + Sync: Sized is not satisfied --> dsl-flow/tests/flow_tests.rs:163:51 | 163 | let _ = engine.run_stateless(&flow, ctx).await?; | --------------------------------------^ doesn't have a size known at compile-time | | | this can't be annotated with ? because it has type Result<_, Box<dyn std::error::Error + Send + Sync>> | = help: the trait Sized is not implemented for dyn std::error::Error + Send + Sync = note: the question mark operation (?) implicitly performs a conversion on the error value using the From trait = note: required for Box<dyn std::error::Error + Send + Sync> to implement std::error::Error = note: required for anyhow::Error to implement From<Box<dyn std::error::Error + Send + Sync>>

error[E0277]: the trait bound Arc<ForkJoinNode>: dsl_flow::FlowNode is not satisfied --> dsl-flow/tests/flow_tests.rs:185:26 | 185 | let flow = Flow::new(sequence! { | _____________________^ 186 | | fork_join_merge! { "agg.fork", merge_mode_object_by_id(), 187 | | expr_set(ExprEngineKind::Rhai, "10", "a.x"), 188 | | expr_set(ExprEngineKind::Rhai, "20", "b.y") 189 | | }, 190 | | expr_get(ExprEngineKind::Rhai, "ctx.agg.fork") 191 | | }); | |^ the trait dsl_flow::FlowNode is not implemented for Arc<ForkJoinNode> | = help: the following other types implement trait dsl_flow::FlowNode: ConditionalNode DbNode ExprGetNode ExprSetNode ForkJoinNode GroupNode HttpNode LineageNode and 3 others = note: required for the cast from Arc<Arc<ForkJoinNode>> to Arc<dyn dsl_flow::FlowNode> = note: this error originates in the macro sequence (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: ? couldn't convert the error: dyn std::error::Error + Send + Sync: Sized is not satisfied --> dsl-flow/tests/flow_tests.rs:193:53 | 193 | let out = engine.run_stateless(&flow, ctx).await?; | --------------------------------------^ doesn't have a size known at compile-time | | | this can't be annotated with ? because it has type Result<_, Box<dyn std::error::Error + Send + Sync>> | = help: the trait Sized is not implemented for dyn std::error::Error + Send + Sync = note: the question mark operation (?) implicitly performs a conversion on the error value using the From trait = note: required for Box<dyn std::error::Error + Send + Sync> to implement std::error::Error = note: required for anyhow::Error to implement From<Box<dyn std::error::Error + Send + Sync>>

Some errors have detailed explanations: E0277, E0599. For more information about an error, try rustc --explain E0277. error: could not compile dsl-flow (test "flow_tests") due to 13 previous errors 2.565s

  • test_conditional_node_then_else: warning: unused import: serde_json::Value --> dsl-flow/src/engine.rs:5:5 | 5 | use serde_json::Value; | ^^^^^^^^^^^^^^^^^ | = note: #[warn(unused_imports)] (part of #[warn(unused)]) on by default

warning: unused import: rhai::EvalAltResult --> dsl-flow/src/expr.rs:43:13 | 43 | use rhai::EvalAltResult; | ^^^^^^^^^^^^^^^^^^^

warning: unused imports: FlowNode and NodeRef --> dsl-flow/src/dsl.rs:1:19 | 1 | use crate::node::{FlowNode, NodeRef}; | ^^^^^^^^ ^^^^^^^

warning: unused imports: ForkJoinNode, GroupNode, and SequenceNode --> dsl-flow/src/dsl.rs:2:19 | 2 | use crate::node::{SequenceNode, ForkJoinNode, GroupNode, ExprSetNode, ExprGetNode, MergeMode}; | ^^^^^^^^^^^^ ^^^^^^^^^^^^ ^^^^^^^^^

warning: unused import: std::sync::Arc --> dsl-flow/src/dsl.rs:4:5 | 4 | use std::sync::Arc; | ^^^^^^^^^^^^^^

warning: unused import: FlowNode --> dsl-flow/src/engine.rs:3:19 | 3 | use crate::node::{FlowNode, NodeOutput, NodeRef, SequenceNode}; | ^^^^^^^^

warning: variable does not need to be mutable --> dsl-flow/src/expr.rs:34:13 | 34 | let mut engine = rhai::Engine::new(); | ----^^^^^^ | | | help: remove this mut | = note: #[warn(unused_mut)] (part of #[warn(unused)]) on by default

warning: field engine is never read --> dsl-flow/src/node.rs:102:5 | 100 | pub struct ExprSetNode { | ----------- field in this struct 101 | id: NodeId, 102 | engine: ExprEngineKind, | ^^^^^^ | = note: #[warn(dead_code)] (part of #[warn(unused)]) on by default

warning: field engine is never read --> dsl-flow/src/node.rs:135:5 | 133 | pub struct ExprGetNode { | ----------- field in this struct 134 | id: NodeId, 135 | engine: ExprEngineKind, | ^^^^^^

warning: field engine is never read --> dsl-flow/src/node.rs:270:5 | 268 | pub struct ConditionalNode { | --------------- field in this struct 269 | id: NodeId, 270 | engine: ExprEngineKind, | ^^^^^^

warning: dsl-flow (lib) generated 10 warnings (run cargo fix --lib -p dsl-flow to apply 6 suggestions) Compiling dsl-flow v0.1.0 (/Users/yangshiyou/Develop/code/rust/dsl_flow/dsl-flow) warning: dsl-flow (lib test) generated 10 warnings (10 duplicates) warning: unused import: serde_json::json --> dsl-flow/examples/basic.rs:2:5 | 2 | use serde_json::json; | ^^^^^^^^^^^^^^^^ | = note: #[warn(unused_imports)] (part of #[warn(unused)]) on by default

error[E0277]: the trait bound Arc<ForkJoinNode>: FlowNode is not satisfied --> dsl-flow/examples/basic.rs:9:26 | 9 | let flow = Flow::new(sequence! { | _____________________^ 10 | | expr_set(ExprEngineKind::Rhai, "1 + 2", "calc.sum"), 11 | | fork_join! { 12 | | expr_set(ExprEngineKind::Rhai, "ctx.calc.sum * 2", "calc.double"), ... | 15 | | }); | |^ the trait FlowNode is not implemented for Arc<ForkJoinNode> | = help: the following other types implement trait FlowNode: ConditionalNode DbNode ExprGetNode ExprSetNode ForkJoinNode GroupNode HttpNode LineageNode and 2 others = note: required for the cast from Arc<Arc<ForkJoinNode>> to Arc<dyn FlowNode> = note: this error originates in the macro sequence (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: ? couldn't convert the error: dyn std::error::Error + Send + Sync: Sized is not satisfied --> dsl-flow/examples/basic.rs:17:53 | 17 | let out = engine.run_stateless(&flow, ctx).await?; | --------------------------------------^ doesn't have a size known at compile-time | | | this can't be annotated with ? because it has type Result<_, Box<dyn std::error::Error + Send + Sync>> | = help: the trait Sized is not implemented for dyn std::error::Error + Send + Sync = note: the question mark operation (?) implicitly performs a conversion on the error value using the From trait = note: required for Box<dyn std::error::Error + Send + Sync> to implement std::error::Error = note: required for Box<dyn std::error::Error> to implement From<Box<dyn std::error::Error + Send + Sync>>

For more information about this error, try rustc --explain E0277. warning: dsl-flow (example "basic") generated 1 warning error: could not compile dsl-flow (example "basic") due to 2 previous errors; 1 warning emitted warning: build failed, waiting for other jobs to finish... error[E0277]: ? couldn't convert the error: dyn std::error::Error + Send + Sync: Sized is not satisfied --> dsl-flow/tests/flow_tests.rs:45:53 | 45 | let out = engine.run_stateless(&flow, ctx).await?; | --------------------------------------^ doesn't have a size known at compile-time | | | this can't be annotated with ? because it has type Result<_, Box<dyn std::error::Error + Send + Sync>> | = help: the trait Sized is not implemented for dyn std::error::Error + Send + Sync = note: the question mark operation (?) implicitly performs a conversion on the error value using the From trait = note: required for Box<dyn std::error::Error + Send + Sync> to implement std::error::Error = note: required for anyhow::Error to implement From<Box<dyn std::error::Error + Send + Sync>>

error[E0599]: no method named clone found for struct ConditionalNode in the current scope --> dsl-flow/tests/flow_tests.rs:62:46 | 62 | let flow = Flow::new(sequence! { (*cond).clone() }); | ^^^^^ method not found in ConditionalNode

error[E0277]: ? couldn't convert the error: dyn std::error::Error + Send + Sync: Sized is not satisfied --> dsl-flow/tests/flow_tests.rs:64:53 | 64 | let out = engine.run_stateless(&flow, ctx).await?; | --------------------------------------^ doesn't have a size known at compile-time | | | this can't be annotated with ? because it has type Result<_, Box<dyn std::error::Error + Send + Sync>> | = help: the trait Sized is not implemented for dyn std::error::Error + Send + Sync = note: the question mark operation (?) implicitly performs a conversion on the error value using the From trait = note: required for Box<dyn std::error::Error + Send + Sync> to implement std::error::Error = note: required for anyhow::Error to implement From<Box<dyn std::error::Error + Send + Sync>>

error[E0277]: ? couldn't convert the error: dyn std::error::Error + Send + Sync: Sized is not satisfied --> dsl-flow/tests/flow_tests.rs:112:53 | 112 | let out = engine.run_stateless(&flow, ctx).await?; | --------------------------------------^ doesn't have a size known at compile-time | | | this can't be annotated with ? because it has type Result<_, Box<dyn std::error::Error + Send + Sync>> | = help: the trait Sized is not implemented for dyn std::error::Error + Send + Sync = note: the question mark operation (?) implicitly performs a conversion on the error value using the From trait = note: required for Box<dyn std::error::Error + Send + Sync> to implement std::error::Error = note: required for anyhow::Error to implement From<Box<dyn std::error::Error + Send + Sync>>

error[E0277]: ? couldn't convert the error: dyn std::error::Error + Send + Sync: Sized is not satisfied --> dsl-flow/tests/flow_tests.rs:129:65 | 129 | let _out1 = engine.run_stateful(s, &flow, ctx.clone()).await?; | ------------------------------------------------^ doesn't have a size known at compile-time | | | this can't be annotated with ? because it has type Result<_, Box<dyn std::error::Error + Send + Sync>> | = help: the trait Sized is not implemented for dyn std::error::Error + Send + Sync = note: the question mark operation (?) implicitly performs a conversion on the error value using the From trait = note: required for Box<dyn std::error::Error + Send + Sync> to implement std::error::Error = note: required for anyhow::Error to implement From<Box<dyn std::error::Error + Send + Sync>>

error[E0277]: ? couldn't convert the error: dyn std::error::Error + Send + Sync: Sized is not satisfied --> dsl-flow/tests/flow_tests.rs:130:64 | 130 | let out2 = engine.run_stateful(s, &flow, ctx.clone()).await?; | ------------------------------------------------^ doesn't have a size known at compile-time | | | this can't be annotated with ? because it has type Result<_, Box<dyn std::error::Error + Send + Sync>> | = help: the trait Sized is not implemented for dyn std::error::Error + Send + Sync = note: the question mark operation (?) implicitly performs a conversion on the error value using the From trait = note: required for Box<dyn std::error::Error + Send + Sync> to implement std::error::Error = note: required for anyhow::Error to implement From<Box<dyn std::error::Error + Send + Sync>>

error[E0277]: ? couldn't convert the error: dyn std::error::Error + Send + Sync: Sized is not satisfied --> dsl-flow/tests/flow_tests.rs:146:53 | 146 | let out = engine.run_stateless(&flow, ctx).await?; | --------------------------------------^ doesn't have a size known at compile-time | | | this can't be annotated with ? because it has type Result<_, Box<dyn std::error::Error + Send + Sync>> | = help: the trait Sized is not implemented for dyn std::error::Error + Send + Sync = note: the question mark operation (?) implicitly performs a conversion on the error value using the From trait = note: required for Box<dyn std::error::Error + Send + Sync> to implement std::error::Error = note: required for anyhow::Error to implement From<Box<dyn std::error::Error + Send + Sync>>

error[E0599]: no method named clone found for trait object dyn dsl_flow::FlowNode in the current scope --> dsl-flow/tests/flow_tests.rs:159:71 | 159 | let group = group_merge! { "agg.group", merge_mode_array(), (*n1).clone(), (*n2).clone() }; | ^^^^^ method not found in dyn dsl_flow::FlowNode

error[E0599]: no method named clone found for trait object dyn dsl_flow::FlowNode in the current scope --> dsl-flow/tests/flow_tests.rs:159:86 | 159 | let group = group_merge! { "agg.group", merge_mode_array(), (*n1).clone(), (*n2).clone() }; | ^^^^^ method not found in dyn dsl_flow::FlowNode

error[E0599]: no method named clone found for struct GroupNode in the current scope --> dsl-flow/tests/flow_tests.rs:160:47 | 160 | let flow = Flow::new(sequence! { (*group).clone() }); | ^^^^^ method not found in GroupNode

error[E0277]: ? couldn't convert the error: dyn std::error::Error + Send + Sync: Sized is not satisfied --> dsl-flow/tests/flow_tests.rs:163:51 | 163 | let _ = engine.run_stateless(&flow, ctx).await?; | --------------------------------------^ doesn't have a size known at compile-time | | | this can't be annotated with ? because it has type Result<_, Box<dyn std::error::Error + Send + Sync>> | = help: the trait Sized is not implemented for dyn std::error::Error + Send + Sync = note: the question mark operation (?) implicitly performs a conversion on the error value using the From trait = note: required for Box<dyn std::error::Error + Send + Sync> to implement std::error::Error = note: required for anyhow::Error to implement From<Box<dyn std::error::Error + Send + Sync>>

error[E0277]: the trait bound Arc<ForkJoinNode>: dsl_flow::FlowNode is not satisfied --> dsl-flow/tests/flow_tests.rs:185:26 | 185 | let flow = Flow::new(sequence! { | _____________________^ 186 | | fork_join_merge! { "agg.fork", merge_mode_object_by_id(), 187 | | expr_set(ExprEngineKind::Rhai, "10", "a.x"), 188 | | expr_set(ExprEngineKind::Rhai, "20", "b.y") 189 | | }, 190 | | expr_get(ExprEngineKind::Rhai, "ctx.agg.fork") 191 | | }); | |^ the trait dsl_flow::FlowNode is not implemented for Arc<ForkJoinNode> | = help: the following other types implement trait dsl_flow::FlowNode: ConditionalNode DbNode ExprGetNode ExprSetNode ForkJoinNode GroupNode HttpNode LineageNode and 3 others = note: required for the cast from Arc<Arc<ForkJoinNode>> to Arc<dyn dsl_flow::FlowNode> = note: this error originates in the macro sequence (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: ? couldn't convert the error: dyn std::error::Error + Send + Sync: Sized is not satisfied --> dsl-flow/tests/flow_tests.rs:193:53 | 193 | let out = engine.run_stateless(&flow, ctx).await?; | --------------------------------------^ doesn't have a size known at compile-time | | | this can't be annotated with ? because it has type Result<_, Box<dyn std::error::Error + Send + Sync>> | = help: the trait Sized is not implemented for dyn std::error::Error + Send + Sync = note: the question mark operation (?) implicitly performs a conversion on the error value using the From trait = note: required for Box<dyn std::error::Error + Send + Sync> to implement std::error::Error = note: required for anyhow::Error to implement From<Box<dyn std::error::Error + Send + Sync>>

Some errors have detailed explanations: E0277, E0599. For more information about an error, try rustc --explain E0277. error: could not compile dsl-flow (test "flow_tests") due to 13 previous errors 0.318s

  • test_http_node_with_mock: warning: unused import: serde_json::Value --> dsl-flow/src/engine.rs:5:5 | 5 | use serde_json::Value; | ^^^^^^^^^^^^^^^^^ | = note: #[warn(unused_imports)] (part of #[warn(unused)]) on by default

warning: unused import: rhai::EvalAltResult --> dsl-flow/src/expr.rs:43:13 | 43 | use rhai::EvalAltResult; | ^^^^^^^^^^^^^^^^^^^

warning: unused imports: FlowNode and NodeRef --> dsl-flow/src/dsl.rs:1:19 | 1 | use crate::node::{FlowNode, NodeRef}; | ^^^^^^^^ ^^^^^^^

warning: unused imports: ForkJoinNode, GroupNode, and SequenceNode --> dsl-flow/src/dsl.rs:2:19 | 2 | use crate::node::{SequenceNode, ForkJoinNode, GroupNode, ExprSetNode, ExprGetNode, MergeMode}; | ^^^^^^^^^^^^ ^^^^^^^^^^^^ ^^^^^^^^^

warning: unused import: std::sync::Arc --> dsl-flow/src/dsl.rs:4:5 | 4 | use std::sync::Arc; | ^^^^^^^^^^^^^^

warning: unused import: FlowNode --> dsl-flow/src/engine.rs:3:19 | 3 | use crate::node::{FlowNode, NodeOutput, NodeRef, SequenceNode}; | ^^^^^^^^

warning: variable does not need to be mutable --> dsl-flow/src/expr.rs:34:13 | 34 | let mut engine = rhai::Engine::new(); | ----^^^^^^ | | | help: remove this mut | = note: #[warn(unused_mut)] (part of #[warn(unused)]) on by default

warning: field engine is never read --> dsl-flow/src/node.rs:102:5 | 100 | pub struct ExprSetNode { | ----------- field in this struct 101 | id: NodeId, 102 | engine: ExprEngineKind, | ^^^^^^ | = note: #[warn(dead_code)] (part of #[warn(unused)]) on by default

warning: field engine is never read --> dsl-flow/src/node.rs:135:5 | 133 | pub struct ExprGetNode { | ----------- field in this struct 134 | id: NodeId, 135 | engine: ExprEngineKind, | ^^^^^^

warning: field engine is never read --> dsl-flow/src/node.rs:270:5 | 268 | pub struct ConditionalNode { | --------------- field in this struct 269 | id: NodeId, 270 | engine: ExprEngineKind, | ^^^^^^

warning: dsl-flow (lib) generated 10 warnings (run cargo fix --lib -p dsl-flow to apply 6 suggestions) Compiling dsl-flow v0.1.0 (/Users/yangshiyou/Develop/code/rust/dsl_flow/dsl-flow) warning: dsl-flow (lib test) generated 10 warnings (10 duplicates) warning: unused import: serde_json::json --> dsl-flow/examples/basic.rs:2:5 | 2 | use serde_json::json; | ^^^^^^^^^^^^^^^^ | = note: #[warn(unused_imports)] (part of #[warn(unused)]) on by default

error[E0277]: the trait bound Arc<ForkJoinNode>: FlowNode is not satisfied --> dsl-flow/examples/basic.rs:9:26 | 9 | let flow = Flow::new(sequence! { | _____________________^ 10 | | expr_set(ExprEngineKind::Rhai, "1 + 2", "calc.sum"), 11 | | fork_join! { 12 | | expr_set(ExprEngineKind::Rhai, "ctx.calc.sum * 2", "calc.double"), ... | 15 | | }); | |^ the trait FlowNode is not implemented for Arc<ForkJoinNode> | = help: the following other types implement trait FlowNode: ConditionalNode DbNode ExprGetNode ExprSetNode ForkJoinNode GroupNode HttpNode LineageNode and 2 others = note: required for the cast from Arc<Arc<ForkJoinNode>> to Arc<dyn FlowNode> = note: this error originates in the macro sequence (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: ? couldn't convert the error: dyn std::error::Error + Send + Sync: Sized is not satisfied --> dsl-flow/examples/basic.rs:17:53 | 17 | let out = engine.run_stateless(&flow, ctx).await?; | --------------------------------------^ doesn't have a size known at compile-time | | | this can't be annotated with ? because it has type Result<_, Box<dyn std::error::Error + Send + Sync>> | = help: the trait Sized is not implemented for dyn std::error::Error + Send + Sync = note: the question mark operation (?) implicitly performs a conversion on the error value using the From trait = note: required for Box<dyn std::error::Error + Send + Sync> to implement std::error::Error = note: required for Box<dyn std::error::Error> to implement From<Box<dyn std::error::Error + Send + Sync>>

For more information about this error, try rustc --explain E0277. warning: dsl-flow (example "basic") generated 1 warning error: could not compile dsl-flow (example "basic") due to 2 previous errors; 1 warning emitted warning: build failed, waiting for other jobs to finish... error[E0277]: ? couldn't convert the error: dyn std::error::Error + Send + Sync: Sized is not satisfied --> dsl-flow/tests/flow_tests.rs:45:53 | 45 | let out = engine.run_stateless(&flow, ctx).await?; | --------------------------------------^ doesn't have a size known at compile-time | | | this can't be annotated with ? because it has type Result<_, Box<dyn std::error::Error + Send + Sync>> | = help: the trait Sized is not implemented for dyn std::error::Error + Send + Sync = note: the question mark operation (?) implicitly performs a conversion on the error value using the From trait = note: required for Box<dyn std::error::Error + Send + Sync> to implement std::error::Error = note: required for anyhow::Error to implement From<Box<dyn std::error::Error + Send + Sync>>

error[E0599]: no method named clone found for struct ConditionalNode in the current scope --> dsl-flow/tests/flow_tests.rs:62:46 | 62 | let flow = Flow::new(sequence! { (*cond).clone() }); | ^^^^^ method not found in ConditionalNode

error[E0277]: ? couldn't convert the error: dyn std::error::Error + Send + Sync: Sized is not satisfied --> dsl-flow/tests/flow_tests.rs:64:53 | 64 | let out = engine.run_stateless(&flow, ctx).await?; | --------------------------------------^ doesn't have a size known at compile-time | | | this can't be annotated with ? because it has type Result<_, Box<dyn std::error::Error + Send + Sync>> | = help: the trait Sized is not implemented for dyn std::error::Error + Send + Sync = note: the question mark operation (?) implicitly performs a conversion on the error value using the From trait = note: required for Box<dyn std::error::Error + Send + Sync> to implement std::error::Error = note: required for anyhow::Error to implement From<Box<dyn std::error::Error + Send + Sync>>

error[E0277]: ? couldn't convert the error: dyn std::error::Error + Send + Sync: Sized is not satisfied --> dsl-flow/tests/flow_tests.rs:112:53 | 112 | let out = engine.run_stateless(&flow, ctx).await?; | --------------------------------------^ doesn't have a size known at compile-time | | | this can't be annotated with ? because it has type Result<_, Box<dyn std::error::Error + Send + Sync>> | = help: the trait Sized is not implemented for dyn std::error::Error + Send + Sync = note: the question mark operation (?) implicitly performs a conversion on the error value using the From trait = note: required for Box<dyn std::error::Error + Send + Sync> to implement std::error::Error = note: required for anyhow::Error to implement From<Box<dyn std::error::Error + Send + Sync>>

error[E0277]: ? couldn't convert the error: dyn std::error::Error + Send + Sync: Sized is not satisfied --> dsl-flow/tests/flow_tests.rs:129:65 | 129 | let _out1 = engine.run_stateful(s, &flow, ctx.clone()).await?; | ------------------------------------------------^ doesn't have a size known at compile-time | | | this can't be annotated with ? because it has type Result<_, Box<dyn std::error::Error + Send + Sync>> | = help: the trait Sized is not implemented for dyn std::error::Error + Send + Sync = note: the question mark operation (?) implicitly performs a conversion on the error value using the From trait = note: required for Box<dyn std::error::Error + Send + Sync> to implement std::error::Error = note: required for anyhow::Error to implement From<Box<dyn std::error::Error + Send + Sync>>

error[E0277]: ? couldn't convert the error: dyn std::error::Error + Send + Sync: Sized is not satisfied --> dsl-flow/tests/flow_tests.rs:130:64 | 130 | let out2 = engine.run_stateful(s, &flow, ctx.clone()).await?; | ------------------------------------------------^ doesn't have a size known at compile-time | | | this can't be annotated with ? because it has type Result<_, Box<dyn std::error::Error + Send + Sync>> | = help: the trait Sized is not implemented for dyn std::error::Error + Send + Sync = note: the question mark operation (?) implicitly performs a conversion on the error value using the From trait = note: required for Box<dyn std::error::Error + Send + Sync> to implement std::error::Error = note: required for anyhow::Error to implement From<Box<dyn std::error::Error + Send + Sync>>

error[E0277]: ? couldn't convert the error: dyn std::error::Error + Send + Sync: Sized is not satisfied --> dsl-flow/tests/flow_tests.rs:146:53 | 146 | let out = engine.run_stateless(&flow, ctx).await?; | --------------------------------------^ doesn't have a size known at compile-time | | | this can't be annotated with ? because it has type Result<_, Box<dyn std::error::Error + Send + Sync>> | = help: the trait Sized is not implemented for dyn std::error::Error + Send + Sync = note: the question mark operation (?) implicitly performs a conversion on the error value using the From trait = note: required for Box<dyn std::error::Error + Send + Sync> to implement std::error::Error = note: required for anyhow::Error to implement From<Box<dyn std::error::Error + Send + Sync>>

error[E0599]: no method named clone found for trait object dyn dsl_flow::FlowNode in the current scope --> dsl-flow/tests/flow_tests.rs:159:71 | 159 | let group = group_merge! { "agg.group", merge_mode_array(), (*n1).clone(), (*n2).clone() }; | ^^^^^ method not found in dyn dsl_flow::FlowNode

error[E0599]: no method named clone found for trait object dyn dsl_flow::FlowNode in the current scope --> dsl-flow/tests/flow_tests.rs:159:86 | 159 | let group = group_merge! { "agg.group", merge_mode_array(), (*n1).clone(), (*n2).clone() }; | ^^^^^ method not found in dyn dsl_flow::FlowNode

error[E0599]: no method named clone found for struct GroupNode in the current scope --> dsl-flow/tests/flow_tests.rs:160:47 | 160 | let flow = Flow::new(sequence! { (*group).clone() }); | ^^^^^ method not found in GroupNode

error[E0277]: ? couldn't convert the error: dyn std::error::Error + Send + Sync: Sized is not satisfied --> dsl-flow/tests/flow_tests.rs:163:51 | 163 | let _ = engine.run_stateless(&flow, ctx).await?; | --------------------------------------^ doesn't have a size known at compile-time | | | this can't be annotated with ? because it has type Result<_, Box<dyn std::error::Error + Send + Sync>> | = help: the trait Sized is not implemented for dyn std::error::Error + Send + Sync = note: the question mark operation (?) implicitly performs a conversion on the error value using the From trait = note: required for Box<dyn std::error::Error + Send + Sync> to implement std::error::Error = note: required for anyhow::Error to implement From<Box<dyn std::error::Error + Send + Sync>>

error[E0277]: the trait bound Arc<ForkJoinNode>: dsl_flow::FlowNode is not satisfied --> dsl-flow/tests/flow_tests.rs:185:26 | 185 | let flow = Flow::new(sequence! { | _____________________^ 186 | | fork_join_merge! { "agg.fork", merge_mode_object_by_id(), 187 | | expr_set(ExprEngineKind::Rhai, "10", "a.x"), 188 | | expr_set(ExprEngineKind::Rhai, "20", "b.y") 189 | | }, 190 | | expr_get(ExprEngineKind::Rhai, "ctx.agg.fork") 191 | | }); | |^ the trait dsl_flow::FlowNode is not implemented for Arc<ForkJoinNode> | = help: the following other types implement trait dsl_flow::FlowNode: ConditionalNode DbNode ExprGetNode ExprSetNode ForkJoinNode GroupNode HttpNode LineageNode and 3 others = note: required for the cast from Arc<Arc<ForkJoinNode>> to Arc<dyn dsl_flow::FlowNode> = note: this error originates in the macro sequence (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: ? couldn't convert the error: dyn std::error::Error + Send + Sync: Sized is not satisfied --> dsl-flow/tests/flow_tests.rs:193:53 | 193 | let out = engine.run_stateless(&flow, ctx).await?; | --------------------------------------^ doesn't have a size known at compile-time | | | this can't be annotated with ? because it has type Result<_, Box<dyn std::error::Error + Send + Sync>> | = help: the trait Sized is not implemented for dyn std::error::Error + Send + Sync = note: the question mark operation (?) implicitly performs a conversion on the error value using the From trait = note: required for Box<dyn std::error::Error + Send + Sync> to implement std::error::Error = note: required for anyhow::Error to implement From<Box<dyn std::error::Error + Send + Sync>>

Some errors have detailed explanations: E0277, E0599. For more information about an error, try rustc --explain E0277. error: could not compile dsl-flow (test "flow_tests") due to 13 previous errors 0.300s

  • test_stateful_engine: warning: unused import: serde_json::Value --> dsl-flow/src/engine.rs:5:5 | 5 | use serde_json::Value; | ^^^^^^^^^^^^^^^^^ | = note: #[warn(unused_imports)] (part of #[warn(unused)]) on by default

warning: unused import: rhai::EvalAltResult --> dsl-flow/src/expr.rs:43:13 | 43 | use rhai::EvalAltResult; | ^^^^^^^^^^^^^^^^^^^

warning: unused imports: FlowNode and NodeRef --> dsl-flow/src/dsl.rs:1:19 | 1 | use crate::node::{FlowNode, NodeRef}; | ^^^^^^^^ ^^^^^^^

warning: unused imports: ForkJoinNode, GroupNode, and SequenceNode --> dsl-flow/src/dsl.rs:2:19 | 2 | use crate::node::{SequenceNode, ForkJoinNode, GroupNode, ExprSetNode, ExprGetNode, MergeMode}; | ^^^^^^^^^^^^ ^^^^^^^^^^^^ ^^^^^^^^^

warning: unused import: std::sync::Arc --> dsl-flow/src/dsl.rs:4:5 | 4 | use std::sync::Arc; | ^^^^^^^^^^^^^^

warning: unused import: FlowNode --> dsl-flow/src/engine.rs:3:19 | 3 | use crate::node::{FlowNode, NodeOutput, NodeRef, SequenceNode}; | ^^^^^^^^

warning: variable does not need to be mutable --> dsl-flow/src/expr.rs:34:13 | 34 | let mut engine = rhai::Engine::new(); | ----^^^^^^ | | | help: remove this mut | = note: #[warn(unused_mut)] (part of #[warn(unused)]) on by default

warning: field engine is never read --> dsl-flow/src/node.rs:102:5 | 100 | pub struct ExprSetNode { | ----------- field in this struct 101 | id: NodeId, 102 | engine: ExprEngineKind, | ^^^^^^ | = note: #[warn(dead_code)] (part of #[warn(unused)]) on by default

warning: field engine is never read --> dsl-flow/src/node.rs:135:5 | 133 | pub struct ExprGetNode { | ----------- field in this struct 134 | id: NodeId, 135 | engine: ExprEngineKind, | ^^^^^^

warning: field engine is never read --> dsl-flow/src/node.rs:270:5 | 268 | pub struct ConditionalNode { | --------------- field in this struct 269 | id: NodeId, 270 | engine: ExprEngineKind, | ^^^^^^

warning: dsl-flow (lib) generated 10 warnings (run cargo fix --lib -p dsl-flow to apply 6 suggestions) Compiling dsl-flow v0.1.0 (/Users/yangshiyou/Develop/code/rust/dsl_flow/dsl-flow) warning: dsl-flow (lib test) generated 10 warnings (10 duplicates) warning: unused import: serde_json::json --> dsl-flow/examples/basic.rs:2:5 | 2 | use serde_json::json; | ^^^^^^^^^^^^^^^^ | = note: #[warn(unused_imports)] (part of #[warn(unused)]) on by default

error[E0277]: the trait bound Arc<ForkJoinNode>: FlowNode is not satisfied --> dsl-flow/examples/basic.rs:9:26 | 9 | let flow = Flow::new(sequence! { | _____________________^ 10 | | expr_set(ExprEngineKind::Rhai, "1 + 2", "calc.sum"), 11 | | fork_join! { 12 | | expr_set(ExprEngineKind::Rhai, "ctx.calc.sum * 2", "calc.double"), ... | 15 | | }); | |^ the trait FlowNode is not implemented for Arc<ForkJoinNode> | = help: the following other types implement trait FlowNode: ConditionalNode DbNode ExprGetNode ExprSetNode ForkJoinNode GroupNode HttpNode LineageNode and 2 others = note: required for the cast from Arc<Arc<ForkJoinNode>> to Arc<dyn FlowNode> = note: this error originates in the macro sequence (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: ? couldn't convert the error: dyn std::error::Error + Send + Sync: Sized is not satisfied --> dsl-flow/examples/basic.rs:17:53 | 17 | let out = engine.run_stateless(&flow, ctx).await?; | --------------------------------------^ doesn't have a size known at compile-time | | | this can't be annotated with ? because it has type Result<_, Box<dyn std::error::Error + Send + Sync>> | = help: the trait Sized is not implemented for dyn std::error::Error + Send + Sync = note: the question mark operation (?) implicitly performs a conversion on the error value using the From trait = note: required for Box<dyn std::error::Error + Send + Sync> to implement std::error::Error = note: required for Box<dyn std::error::Error> to implement From<Box<dyn std::error::Error + Send + Sync>>

For more information about this error, try rustc --explain E0277. warning: dsl-flow (example "basic") generated 1 warning error: could not compile dsl-flow (example "basic") due to 2 previous errors; 1 warning emitted warning: build failed, waiting for other jobs to finish... error[E0277]: ? couldn't convert the error: dyn std::error::Error + Send + Sync: Sized is not satisfied --> dsl-flow/tests/flow_tests.rs:45:53 | 45 | let out = engine.run_stateless(&flow, ctx).await?; | --------------------------------------^ doesn't have a size known at compile-time | | | this can't be annotated with ? because it has type Result<_, Box<dyn std::error::Error + Send + Sync>> | = help: the trait Sized is not implemented for dyn std::error::Error + Send + Sync = note: the question mark operation (?) implicitly performs a conversion on the error value using the From trait = note: required for Box<dyn std::error::Error + Send + Sync> to implement std::error::Error = note: required for anyhow::Error to implement From<Box<dyn std::error::Error + Send + Sync>>

error[E0599]: no method named clone found for struct ConditionalNode in the current scope --> dsl-flow/tests/flow_tests.rs:62:46 | 62 | let flow = Flow::new(sequence! { (*cond).clone() }); | ^^^^^ method not found in ConditionalNode

error[E0277]: ? couldn't convert the error: dyn std::error::Error + Send + Sync: Sized is not satisfied --> dsl-flow/tests/flow_tests.rs:64:53 | 64 | let out = engine.run_stateless(&flow, ctx).await?; | --------------------------------------^ doesn't have a size known at compile-time | | | this can't be annotated with ? because it has type Result<_, Box<dyn std::error::Error + Send + Sync>> | = help: the trait Sized is not implemented for dyn std::error::Error + Send + Sync = note: the question mark operation (?) implicitly performs a conversion on the error value using the From trait = note: required for Box<dyn std::error::Error + Send + Sync> to implement std::error::Error = note: required for anyhow::Error to implement From<Box<dyn std::error::Error + Send + Sync>>

error[E0277]: ? couldn't convert the error: dyn std::error::Error + Send + Sync: Sized is not satisfied --> dsl-flow/tests/flow_tests.rs:112:53 | 112 | let out = engine.run_stateless(&flow, ctx).await?; | --------------------------------------^ doesn't have a size known at compile-time | | | this can't be annotated with ? because it has type Result<_, Box<dyn std::error::Error + Send + Sync>> | = help: the trait Sized is not implemented for dyn std::error::Error + Send + Sync = note: the question mark operation (?) implicitly performs a conversion on the error value using the From trait = note: required for Box<dyn std::error::Error + Send + Sync> to implement std::error::Error = note: required for anyhow::Error to implement From<Box<dyn std::error::Error + Send + Sync>>

error[E0277]: ? couldn't convert the error: dyn std::error::Error + Send + Sync: Sized is not satisfied --> dsl-flow/tests/flow_tests.rs:129:65 | 129 | let _out1 = engine.run_stateful(s, &flow, ctx.clone()).await?; | ------------------------------------------------^ doesn't have a size known at compile-time | | | this can't be annotated with ? because it has type Result<_, Box<dyn std::error::Error + Send + Sync>> | = help: the trait Sized is not implemented for dyn std::error::Error + Send + Sync = note: the question mark operation (?) implicitly performs a conversion on the error value using the From trait = note: required for Box<dyn std::error::Error + Send + Sync> to implement std::error::Error = note: required for anyhow::Error to implement From<Box<dyn std::error::Error + Send + Sync>>

error[E0277]: ? couldn't convert the error: dyn std::error::Error + Send + Sync: Sized is not satisfied --> dsl-flow/tests/flow_tests.rs:130:64 | 130 | let out2 = engine.run_stateful(s, &flow, ctx.clone()).await?; | ------------------------------------------------^ doesn't have a size known at compile-time | | | this can't be annotated with ? because it has type Result<_, Box<dyn std::error::Error + Send + Sync>> | = help: the trait Sized is not implemented for dyn std::error::Error + Send + Sync = note: the question mark operation (?) implicitly performs a conversion on the error value using the From trait = note: required for Box<dyn std::error::Error + Send + Sync> to implement std::error::Error = note: required for anyhow::Error to implement From<Box<dyn std::error::Error + Send + Sync>>

error[E0277]: ? couldn't convert the error: dyn std::error::Error + Send + Sync: Sized is not satisfied --> dsl-flow/tests/flow_tests.rs:146:53 | 146 | let out = engine.run_stateless(&flow, ctx).await?; | --------------------------------------^ doesn't have a size known at compile-time | | | this can't be annotated with ? because it has type Result<_, Box<dyn std::error::Error + Send + Sync>> | = help: the trait Sized is not implemented for dyn std::error::Error + Send + Sync = note: the question mark operation (?) implicitly performs a conversion on the error value using the From trait = note: required for Box<dyn std::error::Error + Send + Sync> to implement std::error::Error = note: required for anyhow::Error to implement From<Box<dyn std::error::Error + Send + Sync>>

error[E0599]: no method named clone found for trait object dyn dsl_flow::FlowNode in the current scope --> dsl-flow/tests/flow_tests.rs:159:71 | 159 | let group = group_merge! { "agg.group", merge_mode_array(), (*n1).clone(), (*n2).clone() }; | ^^^^^ method not found in dyn dsl_flow::FlowNode

error[E0599]: no method named clone found for trait object dyn dsl_flow::FlowNode in the current scope --> dsl-flow/tests/flow_tests.rs:159:86 | 159 | let group = group_merge! { "agg.group", merge_mode_array(), (*n1).clone(), (*n2).clone() }; | ^^^^^ method not found in dyn dsl_flow::FlowNode

error[E0599]: no method named clone found for struct GroupNode in the current scope --> dsl-flow/tests/flow_tests.rs:160:47 | 160 | let flow = Flow::new(sequence! { (*group).clone() }); | ^^^^^ method not found in GroupNode

error[E0277]: ? couldn't convert the error: dyn std::error::Error + Send + Sync: Sized is not satisfied --> dsl-flow/tests/flow_tests.rs:163:51 | 163 | let _ = engine.run_stateless(&flow, ctx).await?; | --------------------------------------^ doesn't have a size known at compile-time | | | this can't be annotated with ? because it has type Result<_, Box<dyn std::error::Error + Send + Sync>> | = help: the trait Sized is not implemented for dyn std::error::Error + Send + Sync = note: the question mark operation (?) implicitly performs a conversion on the error value using the From trait = note: required for Box<dyn std::error::Error + Send + Sync> to implement std::error::Error = note: required for anyhow::Error to implement From<Box<dyn std::error::Error + Send + Sync>>

error[E0277]: the trait bound Arc<ForkJoinNode>: dsl_flow::FlowNode is not satisfied --> dsl-flow/tests/flow_tests.rs:185:26 | 185 | let flow = Flow::new(sequence! { | _____________________^ 186 | | fork_join_merge! { "agg.fork", merge_mode_object_by_id(), 187 | | expr_set(ExprEngineKind::Rhai, "10", "a.x"), 188 | | expr_set(ExprEngineKind::Rhai, "20", "b.y") 189 | | }, 190 | | expr_get(ExprEngineKind::Rhai, "ctx.agg.fork") 191 | | }); | |^ the trait dsl_flow::FlowNode is not implemented for Arc<ForkJoinNode> | = help: the following other types implement trait dsl_flow::FlowNode: ConditionalNode DbNode ExprGetNode ExprSetNode ForkJoinNode GroupNode HttpNode LineageNode and 3 others = note: required for the cast from Arc<Arc<ForkJoinNode>> to Arc<dyn dsl_flow::FlowNode> = note: this error originates in the macro sequence (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: ? couldn't convert the error: dyn std::error::Error + Send + Sync: Sized is not satisfied --> dsl-flow/tests/flow_tests.rs:193:53 | 193 | let out = engine.run_stateless(&flow, ctx).await?; | --------------------------------------^ doesn't have a size known at compile-time | | | this can't be annotated with ? because it has type Result<_, Box<dyn std::error::Error + Send + Sync>> | = help: the trait Sized is not implemented for dyn std::error::Error + Send + Sync = note: the question mark operation (?) implicitly performs a conversion on the error value using the From trait = note: required for Box<dyn std::error::Error + Send + Sync> to implement std::error::Error = note: required for anyhow::Error to implement From<Box<dyn std::error::Error + Send + Sync>>

Some errors have detailed explanations: E0277, E0599. For more information about an error, try rustc --explain E0277. error: could not compile dsl-flow (test "flow_tests") due to 13 previous errors 0.298s

  • test_db_and_mq_nodes: warning: unused import: serde_json::Value --> dsl-flow/src/engine.rs:5:5 | 5 | use serde_json::Value; | ^^^^^^^^^^^^^^^^^ | = note: #[warn(unused_imports)] (part of #[warn(unused)]) on by default

warning: unused import: rhai::EvalAltResult --> dsl-flow/src/expr.rs:43:13 | 43 | use rhai::EvalAltResult; | ^^^^^^^^^^^^^^^^^^^

warning: unused imports: FlowNode and NodeRef --> dsl-flow/src/dsl.rs:1:19 | 1 | use crate::node::{FlowNode, NodeRef}; | ^^^^^^^^ ^^^^^^^

warning: unused imports: ForkJoinNode, GroupNode, and SequenceNode --> dsl-flow/src/dsl.rs:2:19 | 2 | use crate::node::{SequenceNode, ForkJoinNode, GroupNode, ExprSetNode, ExprGetNode, MergeMode}; | ^^^^^^^^^^^^ ^^^^^^^^^^^^ ^^^^^^^^^

warning: unused import: std::sync::Arc --> dsl-flow/src/dsl.rs:4:5 | 4 | use std::sync::Arc; | ^^^^^^^^^^^^^^

warning: unused import: FlowNode --> dsl-flow/src/engine.rs:3:19 | 3 | use crate::node::{FlowNode, NodeOutput, NodeRef, SequenceNode}; | ^^^^^^^^

warning: variable does not need to be mutable --> dsl-flow/src/expr.rs:34:13 | 34 | let mut engine = rhai::Engine::new(); | ----^^^^^^ | | | help: remove this mut | = note: #[warn(unused_mut)] (part of #[warn(unused)]) on by default

warning: field engine is never read --> dsl-flow/src/node.rs:102:5 | 100 | pub struct ExprSetNode { | ----------- field in this struct 101 | id: NodeId, 102 | engine: ExprEngineKind, | ^^^^^^ | = note: #[warn(dead_code)] (part of #[warn(unused)]) on by default

warning: field engine is never read --> dsl-flow/src/node.rs:135:5 | 133 | pub struct ExprGetNode { | ----------- field in this struct 134 | id: NodeId, 135 | engine: ExprEngineKind, | ^^^^^^

warning: field engine is never read --> dsl-flow/src/node.rs:270:5 | 268 | pub struct ConditionalNode { | --------------- field in this struct 269 | id: NodeId, 270 | engine: ExprEngineKind, | ^^^^^^

warning: dsl-flow (lib) generated 10 warnings (run cargo fix --lib -p dsl-flow to apply 6 suggestions) Compiling dsl-flow v0.1.0 (/Users/yangshiyou/Develop/code/rust/dsl_flow/dsl-flow) warning: dsl-flow (lib test) generated 10 warnings (10 duplicates) warning: unused import: serde_json::json --> dsl-flow/examples/basic.rs:2:5 | 2 | use serde_json::json; | ^^^^^^^^^^^^^^^^ | = note: #[warn(unused_imports)] (part of #[warn(unused)]) on by default

error[E0277]: the trait bound Arc<ForkJoinNode>: FlowNode is not satisfied --> dsl-flow/examples/basic.rs:9:26 | 9 | let flow = Flow::new(sequence! { | _____________________^ 10 | | expr_set(ExprEngineKind::Rhai, "1 + 2", "calc.sum"), 11 | | fork_join! { 12 | | expr_set(ExprEngineKind::Rhai, "ctx.calc.sum * 2", "calc.double"), ... | 15 | | }); | |^ the trait FlowNode is not implemented for Arc<ForkJoinNode> | = help: the following other types implement trait FlowNode: ConditionalNode DbNode ExprGetNode ExprSetNode ForkJoinNode GroupNode HttpNode LineageNode and 2 others = note: required for the cast from Arc<Arc<ForkJoinNode>> to Arc<dyn FlowNode> = note: this error originates in the macro sequence (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: ? couldn't convert the error: dyn std::error::Error + Send + Sync: Sized is not satisfied --> dsl-flow/examples/basic.rs:17:53 | 17 | let out = engine.run_stateless(&flow, ctx).await?; | --------------------------------------^ doesn't have a size known at compile-time | | | this can't be annotated with ? because it has type Result<_, Box<dyn std::error::Error + Send + Sync>> | = help: the trait Sized is not implemented for dyn std::error::Error + Send + Sync = note: the question mark operation (?) implicitly performs a conversion on the error value using the From trait = note: required for Box<dyn std::error::Error + Send + Sync> to implement std::error::Error = note: required for Box<dyn std::error::Error> to implement From<Box<dyn std::error::Error + Send + Sync>>

For more information about this error, try rustc --explain E0277. warning: dsl-flow (example "basic") generated 1 warning error: could not compile dsl-flow (example "basic") due to 2 previous errors; 1 warning emitted warning: build failed, waiting for other jobs to finish... error[E0277]: ? couldn't convert the error: dyn std::error::Error + Send + Sync: Sized is not satisfied --> dsl-flow/tests/flow_tests.rs:45:53 | 45 | let out = engine.run_stateless(&flow, ctx).await?; | --------------------------------------^ doesn't have a size known at compile-time | | | this can't be annotated with ? because it has type Result<_, Box<dyn std::error::Error + Send + Sync>> | = help: the trait Sized is not implemented for dyn std::error::Error + Send + Sync = note: the question mark operation (?) implicitly performs a conversion on the error value using the From trait = note: required for Box<dyn std::error::Error + Send + Sync> to implement std::error::Error = note: required for anyhow::Error to implement From<Box<dyn std::error::Error + Send + Sync>>

error[E0599]: no method named clone found for struct ConditionalNode in the current scope --> dsl-flow/tests/flow_tests.rs:62:46 | 62 | let flow = Flow::new(sequence! { (*cond).clone() }); | ^^^^^ method not found in ConditionalNode

error[E0277]: ? couldn't convert the error: dyn std::error::Error + Send + Sync: Sized is not satisfied --> dsl-flow/tests/flow_tests.rs:64:53 | 64 | let out = engine.run_stateless(&flow, ctx).await?; | --------------------------------------^ doesn't have a size known at compile-time | | | this can't be annotated with ? because it has type Result<_, Box<dyn std::error::Error + Send + Sync>> | = help: the trait Sized is not implemented for dyn std::error::Error + Send + Sync = note: the question mark operation (?) implicitly performs a conversion on the error value using the From trait = note: required for Box<dyn std::error::Error + Send + Sync> to implement std::error::Error = note: required for anyhow::Error to implement From<Box<dyn std::error::Error + Send + Sync>>

error[E0277]: ? couldn't convert the error: dyn std::error::Error + Send + Sync: Sized is not satisfied --> dsl-flow/tests/flow_tests.rs:112:53 | 112 | let out = engine.run_stateless(&flow, ctx).await?; | --------------------------------------^ doesn't have a size known at compile-time | | | this can't be annotated with ? because it has type Result<_, Box<dyn std::error::Error + Send + Sync>> | = help: the trait Sized is not implemented for dyn std::error::Error + Send + Sync = note: the question mark operation (?) implicitly performs a conversion on the error value using the From trait = note: required for Box<dyn std::error::Error + Send + Sync> to implement std::error::Error = note: required for anyhow::Error to implement From<Box<dyn std::error::Error + Send + Sync>>

error[E0277]: ? couldn't convert the error: dyn std::error::Error + Send + Sync: Sized is not satisfied --> dsl-flow/tests/flow_tests.rs:129:65 | 129 | let _out1 = engine.run_stateful(s, &flow, ctx.clone()).await?; | ------------------------------------------------^ doesn't have a size known at compile-time | | | this can't be annotated with ? because it has type Result<_, Box<dyn std::error::Error + Send + Sync>> | = help: the trait Sized is not implemented for dyn std::error::Error + Send + Sync = note: the question mark operation (?) implicitly performs a conversion on the error value using the From trait = note: required for Box<dyn std::error::Error + Send + Sync> to implement std::error::Error = note: required for anyhow::Error to implement From<Box<dyn std::error::Error + Send + Sync>>

error[E0277]: ? couldn't convert the error: dyn std::error::Error + Send + Sync: Sized is not satisfied --> dsl-flow/tests/flow_tests.rs:130:64 | 130 | let out2 = engine.run_stateful(s, &flow, ctx.clone()).await?; | ------------------------------------------------^ doesn't have a size known at compile-time | | | this can't be annotated with ? because it has type Result<_, Box<dyn std::error::Error + Send + Sync>> | = help: the trait Sized is not implemented for dyn std::error::Error + Send + Sync = note: the question mark operation (?) implicitly performs a conversion on the error value using the From trait = note: required for Box<dyn std::error::Error + Send + Sync> to implement std::error::Error = note: required for anyhow::Error to implement From<Box<dyn std::error::Error + Send + Sync>>

error[E0277]: ? couldn't convert the error: dyn std::error::Error + Send + Sync: Sized is not satisfied --> dsl-flow/tests/flow_tests.rs:146:53 | 146 | let out = engine.run_stateless(&flow, ctx).await?; | --------------------------------------^ doesn't have a size known at compile-time | | | this can't be annotated with ? because it has type Result<_, Box<dyn std::error::Error + Send + Sync>> | = help: the trait Sized is not implemented for dyn std::error::Error + Send + Sync = note: the question mark operation (?) implicitly performs a conversion on the error value using the From trait = note: required for Box<dyn std::error::Error + Send + Sync> to implement std::error::Error = note: required for anyhow::Error to implement From<Box<dyn std::error::Error + Send + Sync>>

error[E0599]: no method named clone found for trait object dyn dsl_flow::FlowNode in the current scope --> dsl-flow/tests/flow_tests.rs:159:71 | 159 | let group = group_merge! { "agg.group", merge_mode_array(), (*n1).clone(), (*n2).clone() }; | ^^^^^ method not found in dyn dsl_flow::FlowNode

error[E0599]: no method named clone found for trait object dyn dsl_flow::FlowNode in the current scope --> dsl-flow/tests/flow_tests.rs:159:86 | 159 | let group = group_merge! { "agg.group", merge_mode_array(), (*n1).clone(), (*n2).clone() }; | ^^^^^ method not found in dyn dsl_flow::FlowNode

error[E0599]: no method named clone found for struct GroupNode in the current scope --> dsl-flow/tests/flow_tests.rs:160:47 | 160 | let flow = Flow::new(sequence! { (*group).clone() }); | ^^^^^ method not found in GroupNode

error[E0277]: ? couldn't convert the error: dyn std::error::Error + Send + Sync: Sized is not satisfied --> dsl-flow/tests/flow_tests.rs:163:51 | 163 | let _ = engine.run_stateless(&flow, ctx).await?; | --------------------------------------^ doesn't have a size known at compile-time | | | this can't be annotated with ? because it has type Result<_, Box<dyn std::error::Error + Send + Sync>> | = help: the trait Sized is not implemented for dyn std::error::Error + Send + Sync = note: the question mark operation (?) implicitly performs a conversion on the error value using the From trait = note: required for Box<dyn std::error::Error + Send + Sync> to implement std::error::Error = note: required for anyhow::Error to implement From<Box<dyn std::error::Error + Send + Sync>>

error[E0277]: the trait bound Arc<ForkJoinNode>: dsl_flow::FlowNode is not satisfied --> dsl-flow/tests/flow_tests.rs:185:26 | 185 | let flow = Flow::new(sequence! { | _____________________^ 186 | | fork_join_merge! { "agg.fork", merge_mode_object_by_id(), 187 | | expr_set(ExprEngineKind::Rhai, "10", "a.x"), 188 | | expr_set(ExprEngineKind::Rhai, "20", "b.y") 189 | | }, 190 | | expr_get(ExprEngineKind::Rhai, "ctx.agg.fork") 191 | | }); | |^ the trait dsl_flow::FlowNode is not implemented for Arc<ForkJoinNode> | = help: the following other types implement trait dsl_flow::FlowNode: ConditionalNode DbNode ExprGetNode ExprSetNode ForkJoinNode GroupNode HttpNode LineageNode and 3 others = note: required for the cast from Arc<Arc<ForkJoinNode>> to Arc<dyn dsl_flow::FlowNode> = note: this error originates in the macro sequence (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: ? couldn't convert the error: dyn std::error::Error + Send + Sync: Sized is not satisfied --> dsl-flow/tests/flow_tests.rs:193:53 | 193 | let out = engine.run_stateless(&flow, ctx).await?; | --------------------------------------^ doesn't have a size known at compile-time | | | this can't be annotated with ? because it has type Result<_, Box<dyn std::error::Error + Send + Sync>> | = help: the trait Sized is not implemented for dyn std::error::Error + Send + Sync = note: the question mark operation (?) implicitly performs a conversion on the error value using the From trait = note: required for Box<dyn std::error::Error + Send + Sync> to implement std::error::Error = note: required for anyhow::Error to implement From<Box<dyn std::error::Error + Send + Sync>>

Some errors have detailed explanations: E0277, E0599. For more information about an error, try rustc --explain E0277. error: could not compile dsl-flow (test "flow_tests") due to 13 previous errors 0.298s

  • test_group_parallel_sleep: warning: unused import: serde_json::Value --> dsl-flow/src/engine.rs:5:5 | 5 | use serde_json::Value; | ^^^^^^^^^^^^^^^^^ | = note: #[warn(unused_imports)] (part of #[warn(unused)]) on by default

warning: unused import: rhai::EvalAltResult --> dsl-flow/src/expr.rs:43:13 | 43 | use rhai::EvalAltResult; | ^^^^^^^^^^^^^^^^^^^

warning: unused imports: FlowNode and NodeRef --> dsl-flow/src/dsl.rs:1:19 | 1 | use crate::node::{FlowNode, NodeRef}; | ^^^^^^^^ ^^^^^^^

warning: unused imports: ForkJoinNode, GroupNode, and SequenceNode --> dsl-flow/src/dsl.rs:2:19 | 2 | use crate::node::{SequenceNode, ForkJoinNode, GroupNode, ExprSetNode, ExprGetNode, MergeMode}; | ^^^^^^^^^^^^ ^^^^^^^^^^^^ ^^^^^^^^^

warning: unused import: std::sync::Arc --> dsl-flow/src/dsl.rs:4:5 | 4 | use std::sync::Arc; | ^^^^^^^^^^^^^^

warning: unused import: FlowNode --> dsl-flow/src/engine.rs:3:19 | 3 | use crate::node::{FlowNode, NodeOutput, NodeRef, SequenceNode}; | ^^^^^^^^

warning: variable does not need to be mutable --> dsl-flow/src/expr.rs:34:13 | 34 | let mut engine = rhai::Engine::new(); | ----^^^^^^ | | | help: remove this mut | = note: #[warn(unused_mut)] (part of #[warn(unused)]) on by default

warning: field engine is never read --> dsl-flow/src/node.rs:102:5 | 100 | pub struct ExprSetNode { | ----------- field in this struct 101 | id: NodeId, 102 | engine: ExprEngineKind, | ^^^^^^ | = note: #[warn(dead_code)] (part of #[warn(unused)]) on by default

warning: field engine is never read --> dsl-flow/src/node.rs:135:5 | 133 | pub struct ExprGetNode { | ----------- field in this struct 134 | id: NodeId, 135 | engine: ExprEngineKind, | ^^^^^^

warning: field engine is never read --> dsl-flow/src/node.rs:270:5 | 268 | pub struct ConditionalNode { | --------------- field in this struct 269 | id: NodeId, 270 | engine: ExprEngineKind, | ^^^^^^

warning: dsl-flow (lib) generated 10 warnings (run cargo fix --lib -p dsl-flow to apply 6 suggestions) Compiling dsl-flow v0.1.0 (/Users/yangshiyou/Develop/code/rust/dsl_flow/dsl-flow) warning: dsl-flow (lib test) generated 10 warnings (10 duplicates) warning: unused import: serde_json::json --> dsl-flow/examples/basic.rs:2:5 | 2 | use serde_json::json; | ^^^^^^^^^^^^^^^^ | = note: #[warn(unused_imports)] (part of #[warn(unused)]) on by default

error[E0277]: the trait bound Arc<ForkJoinNode>: FlowNode is not satisfied --> dsl-flow/examples/basic.rs:9:26 | 9 | let flow = Flow::new(sequence! { | _____________________^ 10 | | expr_set(ExprEngineKind::Rhai, "1 + 2", "calc.sum"), 11 | | fork_join! { 12 | | expr_set(ExprEngineKind::Rhai, "ctx.calc.sum * 2", "calc.double"), ... | 15 | | }); | |^ the trait FlowNode is not implemented for Arc<ForkJoinNode> | = help: the following other types implement trait FlowNode: ConditionalNode DbNode ExprGetNode ExprSetNode ForkJoinNode GroupNode HttpNode LineageNode and 2 others = note: required for the cast from Arc<Arc<ForkJoinNode>> to Arc<dyn FlowNode> = note: this error originates in the macro sequence (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: ? couldn't convert the error: dyn std::error::Error + Send + Sync: Sized is not satisfied --> dsl-flow/examples/basic.rs:17:53 | 17 | let out = engine.run_stateless(&flow, ctx).await?; | --------------------------------------^ doesn't have a size known at compile-time | | | this can't be annotated with ? because it has type Result<_, Box<dyn std::error::Error + Send + Sync>> | = help: the trait Sized is not implemented for dyn std::error::Error + Send + Sync = note: the question mark operation (?) implicitly performs a conversion on the error value using the From trait = note: required for Box<dyn std::error::Error + Send + Sync> to implement std::error::Error = note: required for Box<dyn std::error::Error> to implement From<Box<dyn std::error::Error + Send + Sync>>

For more information about this error, try rustc --explain E0277. warning: dsl-flow (example "basic") generated 1 warning error: could not compile dsl-flow (example "basic") due to 2 previous errors; 1 warning emitted warning: build failed, waiting for other jobs to finish... error[E0277]: ? couldn't convert the error: dyn std::error::Error + Send + Sync: Sized is not satisfied --> dsl-flow/tests/flow_tests.rs:45:53 | 45 | let out = engine.run_stateless(&flow, ctx).await?; | --------------------------------------^ doesn't have a size known at compile-time | | | this can't be annotated with ? because it has type Result<_, Box<dyn std::error::Error + Send + Sync>> | = help: the trait Sized is not implemented for dyn std::error::Error + Send + Sync = note: the question mark operation (?) implicitly performs a conversion on the error value using the From trait = note: required for Box<dyn std::error::Error + Send + Sync> to implement std::error::Error = note: required for anyhow::Error to implement From<Box<dyn std::error::Error + Send + Sync>>

error[E0599]: no method named clone found for struct ConditionalNode in the current scope --> dsl-flow/tests/flow_tests.rs:62:46 | 62 | let flow = Flow::new(sequence! { (*cond).clone() }); | ^^^^^ method not found in ConditionalNode

error[E0277]: ? couldn't convert the error: dyn std::error::Error + Send + Sync: Sized is not satisfied --> dsl-flow/tests/flow_tests.rs:64:53 | 64 | let out = engine.run_stateless(&flow, ctx).await?; | --------------------------------------^ doesn't have a size known at compile-time | | | this can't be annotated with ? because it has type Result<_, Box<dyn std::error::Error + Send + Sync>> | = help: the trait Sized is not implemented for dyn std::error::Error + Send + Sync = note: the question mark operation (?) implicitly performs a conversion on the error value using the From trait = note: required for Box<dyn std::error::Error + Send + Sync> to implement std::error::Error = note: required for anyhow::Error to implement From<Box<dyn std::error::Error + Send + Sync>>

error[E0277]: ? couldn't convert the error: dyn std::error::Error + Send + Sync: Sized is not satisfied --> dsl-flow/tests/flow_tests.rs:112:53 | 112 | let out = engine.run_stateless(&flow, ctx).await?; | --------------------------------------^ doesn't have a size known at compile-time | | | this can't be annotated with ? because it has type Result<_, Box<dyn std::error::Error + Send + Sync>> | = help: the trait Sized is not implemented for dyn std::error::Error + Send + Sync = note: the question mark operation (?) implicitly performs a conversion on the error value using the From trait = note: required for Box<dyn std::error::Error + Send + Sync> to implement std::error::Error = note: required for anyhow::Error to implement From<Box<dyn std::error::Error + Send + Sync>>

error[E0277]: ? couldn't convert the error: dyn std::error::Error + Send + Sync: Sized is not satisfied --> dsl-flow/tests/flow_tests.rs:129:65 | 129 | let _out1 = engine.run_stateful(s, &flow, ctx.clone()).await?; | ------------------------------------------------^ doesn't have a size known at compile-time | | | this can't be annotated with ? because it has type Result<_, Box<dyn std::error::Error + Send + Sync>> | = help: the trait Sized is not implemented for dyn std::error::Error + Send + Sync = note: the question mark operation (?) implicitly performs a conversion on the error value using the From trait = note: required for Box<dyn std::error::Error + Send + Sync> to implement std::error::Error = note: required for anyhow::Error to implement From<Box<dyn std::error::Error + Send + Sync>>

error[E0277]: ? couldn't convert the error: dyn std::error::Error + Send + Sync: Sized is not satisfied --> dsl-flow/tests/flow_tests.rs:130:64 | 130 | let out2 = engine.run_stateful(s, &flow, ctx.clone()).await?; | ------------------------------------------------^ doesn't have a size known at compile-time | | | this can't be annotated with ? because it has type Result<_, Box<dyn std::error::Error + Send + Sync>> | = help: the trait Sized is not implemented for dyn std::error::Error + Send + Sync = note: the question mark operation (?) implicitly performs a conversion on the error value using the From trait = note: required for Box<dyn std::error::Error + Send + Sync> to implement std::error::Error = note: required for anyhow::Error to implement From<Box<dyn std::error::Error + Send + Sync>>

error[E0277]: ? couldn't convert the error: dyn std::error::Error + Send + Sync: Sized is not satisfied --> dsl-flow/tests/flow_tests.rs:146:53 | 146 | let out = engine.run_stateless(&flow, ctx).await?; | --------------------------------------^ doesn't have a size known at compile-time | | | this can't be annotated with ? because it has type Result<_, Box<dyn std::error::Error + Send + Sync>> | = help: the trait Sized is not implemented for dyn std::error::Error + Send + Sync = note: the question mark operation (?) implicitly performs a conversion on the error value using the From trait = note: required for Box<dyn std::error::Error + Send + Sync> to implement std::error::Error = note: required for anyhow::Error to implement From<Box<dyn std::error::Error + Send + Sync>>

error[E0599]: no method named clone found for trait object dyn dsl_flow::FlowNode in the current scope --> dsl-flow/tests/flow_tests.rs:159:71 | 159 | let group = group_merge! { "agg.group", merge_mode_array(), (*n1).clone(), (*n2).clone() }; | ^^^^^ method not found in dyn dsl_flow::FlowNode

error[E0599]: no method named clone found for trait object dyn dsl_flow::FlowNode in the current scope --> dsl-flow/tests/flow_tests.rs:159:86 | 159 | let group = group_merge! { "agg.group", merge_mode_array(), (*n1).clone(), (*n2).clone() }; | ^^^^^ method not found in dyn dsl_flow::FlowNode

error[E0599]: no method named clone found for struct GroupNode in the current scope --> dsl-flow/tests/flow_tests.rs:160:47 | 160 | let flow = Flow::new(sequence! { (*group).clone() }); | ^^^^^ method not found in GroupNode

error[E0277]: ? couldn't convert the error: dyn std::error::Error + Send + Sync: Sized is not satisfied --> dsl-flow/tests/flow_tests.rs:163:51 | 163 | let _ = engine.run_stateless(&flow, ctx).await?; | --------------------------------------^ doesn't have a size known at compile-time | | | this can't be annotated with ? because it has type Result<_, Box<dyn std::error::Error + Send + Sync>> | = help: the trait Sized is not implemented for dyn std::error::Error + Send + Sync = note: the question mark operation (?) implicitly performs a conversion on the error value using the From trait = note: required for Box<dyn std::error::Error + Send + Sync> to implement std::error::Error = note: required for anyhow::Error to implement From<Box<dyn std::error::Error + Send + Sync>>

error[E0277]: the trait bound Arc<ForkJoinNode>: dsl_flow::FlowNode is not satisfied --> dsl-flow/tests/flow_tests.rs:185:26 | 185 | let flow = Flow::new(sequence! { | _____________________^ 186 | | fork_join_merge! { "agg.fork", merge_mode_object_by_id(), 187 | | expr_set(ExprEngineKind::Rhai, "10", "a.x"), 188 | | expr_set(ExprEngineKind::Rhai, "20", "b.y") 189 | | }, 190 | | expr_get(ExprEngineKind::Rhai, "ctx.agg.fork") 191 | | }); | |^ the trait dsl_flow::FlowNode is not implemented for Arc<ForkJoinNode> | = help: the following other types implement trait dsl_flow::FlowNode: ConditionalNode DbNode ExprGetNode ExprSetNode ForkJoinNode GroupNode HttpNode LineageNode and 3 others = note: required for the cast from Arc<Arc<ForkJoinNode>> to Arc<dyn dsl_flow::FlowNode> = note: this error originates in the macro sequence (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: ? couldn't convert the error: dyn std::error::Error + Send + Sync: Sized is not satisfied --> dsl-flow/tests/flow_tests.rs:193:53 | 193 | let out = engine.run_stateless(&flow, ctx).await?; | --------------------------------------^ doesn't have a size known at compile-time | | | this can't be annotated with ? because it has type Result<_, Box<dyn std::error::Error + Send + Sync>> | = help: the trait Sized is not implemented for dyn std::error::Error + Send + Sync = note: the question mark operation (?) implicitly performs a conversion on the error value using the From trait = note: required for Box<dyn std::error::Error + Send + Sync> to implement std::error::Error = note: required for anyhow::Error to implement From<Box<dyn std::error::Error + Send + Sync>>

Some errors have detailed explanations: E0277, E0599. For more information about an error, try rustc --explain E0277. error: could not compile dsl-flow (test "flow_tests") due to 13 previous errors 0.326s

  • test_expr_set_without_engine_error: warning: unused import: serde_json::Value --> dsl-flow/src/engine.rs:5:5 | 5 | use serde_json::Value; | ^^^^^^^^^^^^^^^^^ | = note: #[warn(unused_imports)] (part of #[warn(unused)]) on by default

warning: unused import: rhai::EvalAltResult --> dsl-flow/src/expr.rs:43:13 | 43 | use rhai::EvalAltResult; | ^^^^^^^^^^^^^^^^^^^

warning: unused imports: FlowNode and NodeRef --> dsl-flow/src/dsl.rs:1:19 | 1 | use crate::node::{FlowNode, NodeRef}; | ^^^^^^^^ ^^^^^^^

warning: unused imports: ForkJoinNode, GroupNode, and SequenceNode --> dsl-flow/src/dsl.rs:2:19 | 2 | use crate::node::{SequenceNode, ForkJoinNode, GroupNode, ExprSetNode, ExprGetNode, MergeMode}; | ^^^^^^^^^^^^ ^^^^^^^^^^^^ ^^^^^^^^^

warning: unused import: std::sync::Arc --> dsl-flow/src/dsl.rs:4:5 | 4 | use std::sync::Arc; | ^^^^^^^^^^^^^^

warning: unused import: FlowNode --> dsl-flow/src/engine.rs:3:19 | 3 | use crate::node::{FlowNode, NodeOutput, NodeRef, SequenceNode}; | ^^^^^^^^

warning: variable does not need to be mutable --> dsl-flow/src/expr.rs:34:13 | 34 | let mut engine = rhai::Engine::new(); | ----^^^^^^ | | | help: remove this mut | = note: #[warn(unused_mut)] (part of #[warn(unused)]) on by default

warning: field engine is never read --> dsl-flow/src/node.rs:102:5 | 100 | pub struct ExprSetNode { | ----------- field in this struct 101 | id: NodeId, 102 | engine: ExprEngineKind, | ^^^^^^ | = note: #[warn(dead_code)] (part of #[warn(unused)]) on by default

warning: field engine is never read --> dsl-flow/src/node.rs:135:5 | 133 | pub struct ExprGetNode { | ----------- field in this struct 134 | id: NodeId, 135 | engine: ExprEngineKind, | ^^^^^^

warning: field engine is never read --> dsl-flow/src/node.rs:270:5 | 268 | pub struct ConditionalNode { | --------------- field in this struct 269 | id: NodeId, 270 | engine: ExprEngineKind, | ^^^^^^

warning: dsl-flow (lib) generated 10 warnings (run cargo fix --lib -p dsl-flow to apply 6 suggestions) Compiling dsl-flow v0.1.0 (/Users/yangshiyou/Develop/code/rust/dsl_flow/dsl-flow) warning: dsl-flow (lib test) generated 10 warnings (10 duplicates) warning: unused import: serde_json::json --> dsl-flow/examples/basic.rs:2:5 | 2 | use serde_json::json; | ^^^^^^^^^^^^^^^^ | = note: #[warn(unused_imports)] (part of #[warn(unused)]) on by default

error[E0277]: the trait bound Arc<ForkJoinNode>: FlowNode is not satisfied --> dsl-flow/examples/basic.rs:9:26 | 9 | let flow = Flow::new(sequence! { | _____________________^ 10 | | expr_set(ExprEngineKind::Rhai, "1 + 2", "calc.sum"), 11 | | fork_join! { 12 | | expr_set(ExprEngineKind::Rhai, "ctx.calc.sum * 2", "calc.double"), ... | 15 | | }); | |^ the trait FlowNode is not implemented for Arc<ForkJoinNode> | = help: the following other types implement trait FlowNode: ConditionalNode DbNode ExprGetNode ExprSetNode ForkJoinNode GroupNode HttpNode LineageNode and 2 others = note: required for the cast from Arc<Arc<ForkJoinNode>> to Arc<dyn FlowNode> = note: this error originates in the macro sequence (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: ? couldn't convert the error: dyn std::error::Error + Send + Sync: Sized is not satisfied --> dsl-flow/examples/basic.rs:17:53 | 17 | let out = engine.run_stateless(&flow, ctx).await?; | --------------------------------------^ doesn't have a size known at compile-time | | | this can't be annotated with ? because it has type Result<_, Box<dyn std::error::Error + Send + Sync>> | = help: the trait Sized is not implemented for dyn std::error::Error + Send + Sync = note: the question mark operation (?) implicitly performs a conversion on the error value using the From trait = note: required for Box<dyn std::error::Error + Send + Sync> to implement std::error::Error = note: required for Box<dyn std::error::Error> to implement From<Box<dyn std::error::Error + Send + Sync>>

error[E0277]: ? couldn't convert the error: dyn std::error::Error + Send + Sync: Sized is not satisfied --> dsl-flow/tests/flow_tests.rs:45:53 | 45 | let out = engine.run_stateless(&flow, ctx).await?; | --------------------------------------^ doesn't have a size known at compile-time | | | this can't be annotated with ? because it has type Result<_, Box<dyn std::error::Error + Send + Sync>> | = help: the trait Sized is not implemented for dyn std::error::Error + Send + Sync = note: the question mark operation (?) implicitly performs a conversion on the error value using the From trait = note: required for Box<dyn std::error::Error + Send + Sync> to implement std::error::Error = note: required for anyhow::Error to implement From<Box<dyn std::error::Error + Send + Sync>>

For more information about this error, try rustc --explain E0277. warning: dsl-flow (example "basic") generated 1 warning error: could not compile dsl-flow (example "basic") due to 2 previous errors; 1 warning emitted warning: build failed, waiting for other jobs to finish... error[E0599]: no method named clone found for struct ConditionalNode in the current scope --> dsl-flow/tests/flow_tests.rs:62:46 | 62 | let flow = Flow::new(sequence! { (*cond).clone() }); | ^^^^^ method not found in ConditionalNode

error[E0277]: ? couldn't convert the error: dyn std::error::Error + Send + Sync: Sized is not satisfied --> dsl-flow/tests/flow_tests.rs:64:53 | 64 | let out = engine.run_stateless(&flow, ctx).await?; | --------------------------------------^ doesn't have a size known at compile-time | | | this can't be annotated with ? because it has type Result<_, Box<dyn std::error::Error + Send + Sync>> | = help: the trait Sized is not implemented for dyn std::error::Error + Send + Sync = note: the question mark operation (?) implicitly performs a conversion on the error value using the From trait = note: required for Box<dyn std::error::Error + Send + Sync> to implement std::error::Error = note: required for anyhow::Error to implement From<Box<dyn std::error::Error + Send + Sync>>

error[E0277]: ? couldn't convert the error: dyn std::error::Error + Send + Sync: Sized is not satisfied --> dsl-flow/tests/flow_tests.rs:112:53 | 112 | let out = engine.run_stateless(&flow, ctx).await?; | --------------------------------------^ doesn't have a size known at compile-time | | | this can't be annotated with ? because it has type Result<_, Box<dyn std::error::Error + Send + Sync>> | = help: the trait Sized is not implemented for dyn std::error::Error + Send + Sync = note: the question mark operation (?) implicitly performs a conversion on the error value using the From trait = note: required for Box<dyn std::error::Error + Send + Sync> to implement std::error::Error = note: required for anyhow::Error to implement From<Box<dyn std::error::Error + Send + Sync>>

error[E0277]: ? couldn't convert the error: dyn std::error::Error + Send + Sync: Sized is not satisfied --> dsl-flow/tests/flow_tests.rs:129:65 | 129 | let _out1 = engine.run_stateful(s, &flow, ctx.clone()).await?; | ------------------------------------------------^ doesn't have a size known at compile-time | | | this can't be annotated with ? because it has type Result<_, Box<dyn std::error::Error + Send + Sync>> | = help: the trait Sized is not implemented for dyn std::error::Error + Send + Sync = note: the question mark operation (?) implicitly performs a conversion on the error value using the From trait = note: required for Box<dyn std::error::Error + Send + Sync> to implement std::error::Error = note: required for anyhow::Error to implement From<Box<dyn std::error::Error + Send + Sync>>

error[E0277]: ? couldn't convert the error: dyn std::error::Error + Send + Sync: Sized is not satisfied --> dsl-flow/tests/flow_tests.rs:130:64 | 130 | let out2 = engine.run_stateful(s, &flow, ctx.clone()).await?; | ------------------------------------------------^ doesn't have a size known at compile-time | | | this can't be annotated with ? because it has type Result<_, Box<dyn std::error::Error + Send + Sync>> | = help: the trait Sized is not implemented for dyn std::error::Error + Send + Sync = note: the question mark operation (?) implicitly performs a conversion on the error value using the From trait = note: required for Box<dyn std::error::Error + Send + Sync> to implement std::error::Error = note: required for anyhow::Error to implement From<Box<dyn std::error::Error + Send + Sync>>

error[E0277]: ? couldn't convert the error: dyn std::error::Error + Send + Sync: Sized is not satisfied --> dsl-flow/tests/flow_tests.rs:146:53 | 146 | let out = engine.run_stateless(&flow, ctx).await?; | --------------------------------------^ doesn't have a size known at compile-time | | | this can't be annotated with ? because it has type Result<_, Box<dyn std::error::Error + Send + Sync>> | = help: the trait Sized is not implemented for dyn std::error::Error + Send + Sync = note: the question mark operation (?) implicitly performs a conversion on the error value using the From trait = note: required for Box<dyn std::error::Error + Send + Sync> to implement std::error::Error = note: required for anyhow::Error to implement From<Box<dyn std::error::Error + Send + Sync>>

error[E0599]: no method named clone found for trait object dyn dsl_flow::FlowNode in the current scope --> dsl-flow/tests/flow_tests.rs:159:71 | 159 | let group = group_merge! { "agg.group", merge_mode_array(), (*n1).clone(), (*n2).clone() }; | ^^^^^ method not found in dyn dsl_flow::FlowNode

error[E0599]: no method named clone found for trait object dyn dsl_flow::FlowNode in the current scope --> dsl-flow/tests/flow_tests.rs:159:86 | 159 | let group = group_merge! { "agg.group", merge_mode_array(), (*n1).clone(), (*n2).clone() }; | ^^^^^ method not found in dyn dsl_flow::FlowNode

error[E0599]: no method named clone found for struct GroupNode in the current scope --> dsl-flow/tests/flow_tests.rs:160:47 | 160 | let flow = Flow::new(sequence! { (*group).clone() }); | ^^^^^ method not found in GroupNode

error[E0277]: ? couldn't convert the error: dyn std::error::Error + Send + Sync: Sized is not satisfied --> dsl-flow/tests/flow_tests.rs:163:51 | 163 | let _ = engine.run_stateless(&flow, ctx).await?; | --------------------------------------^ doesn't have a size known at compile-time | | | this can't be annotated with ? because it has type Result<_, Box<dyn std::error::Error + Send + Sync>> | = help: the trait Sized is not implemented for dyn std::error::Error + Send + Sync = note: the question mark operation (?) implicitly performs a conversion on the error value using the From trait = note: required for Box<dyn std::error::Error + Send + Sync> to implement std::error::Error = note: required for anyhow::Error to implement From<Box<dyn std::error::Error + Send + Sync>>

error[E0277]: the trait bound Arc<ForkJoinNode>: dsl_flow::FlowNode is not satisfied --> dsl-flow/tests/flow_tests.rs:185:26 | 185 | let flow = Flow::new(sequence! { | _____________________^ 186 | | fork_join_merge! { "agg.fork", merge_mode_object_by_id(), 187 | | expr_set(ExprEngineKind::Rhai, "10", "a.x"), 188 | | expr_set(ExprEngineKind::Rhai, "20", "b.y") 189 | | }, 190 | | expr_get(ExprEngineKind::Rhai, "ctx.agg.fork") 191 | | }); | |^ the trait dsl_flow::FlowNode is not implemented for Arc<ForkJoinNode> | = help: the following other types implement trait dsl_flow::FlowNode: ConditionalNode DbNode ExprGetNode ExprSetNode ForkJoinNode GroupNode HttpNode LineageNode and 3 others = note: required for the cast from Arc<Arc<ForkJoinNode>> to Arc<dyn dsl_flow::FlowNode> = note: this error originates in the macro sequence (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: ? couldn't convert the error: dyn std::error::Error + Send + Sync: Sized is not satisfied --> dsl-flow/tests/flow_tests.rs:193:53 | 193 | let out = engine.run_stateless(&flow, ctx).await?; | --------------------------------------^ doesn't have a size known at compile-time | | | this can't be annotated with ? because it has type Result<_, Box<dyn std::error::Error + Send + Sync>> | = help: the trait Sized is not implemented for dyn std::error::Error + Send + Sync = note: the question mark operation (?) implicitly performs a conversion on the error value using the From trait = note: required for Box<dyn std::error::Error + Send + Sync> to implement std::error::Error = note: required for anyhow::Error to implement From<Box<dyn std::error::Error + Send + Sync>>

Some errors have detailed explanations: E0277, E0599. For more information about an error, try rustc --explain E0277. error: could not compile dsl-flow (test "flow_tests") due to 13 previous errors 0.340s