From 45cee7d8def7738d3347b201d3c54c0055817a4c Mon Sep 17 00:00:00 2001 From: 魏曹先生 <1992414357@qq.com> Date: Mon, 27 Oct 2025 17:20:01 +0800 Subject: fix: Make the ActionContext passed to on_proc_begin mutable --- crates/system_action/action_macros/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crates/system_action/action_macros') diff --git a/crates/system_action/action_macros/src/lib.rs b/crates/system_action/action_macros/src/lib.rs index ce50073..7362cdf 100644 --- a/crates/system_action/action_macros/src/lib.rs +++ b/crates/system_action/action_macros/src/lib.rs @@ -64,7 +64,7 @@ fn generate_action_struct(input_fn: ItemFn, _is_local: bool) -> proc_macro2::Tok #fn_vis async fn #proc_this_action( pool: &action_system::action_pool::ActionPool, - ctx: action_system::action::ActionContext, + mut ctx: action_system::action::ActionContext, #arg_param_name: #arg_type ) -> Result<#return_type, tcp_connection::error::TcpTargetError> { let args_json = serde_json::to_string(&#arg_param_name) -- cgit From 9766cdc3f0a741a7548c413297425efd298af8f2 Mon Sep 17 00:00:00 2001 From: 魏曹先生 <1992414357@qq.com> Date: Mon, 27 Oct 2025 17:20:31 +0800 Subject: "fix: Fix indentation issues --- crates/system_action/action_macros/src/lib.rs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'crates/system_action/action_macros') diff --git a/crates/system_action/action_macros/src/lib.rs b/crates/system_action/action_macros/src/lib.rs index 7362cdf..f65d424 100644 --- a/crates/system_action/action_macros/src/lib.rs +++ b/crates/system_action/action_macros/src/lib.rs @@ -121,11 +121,12 @@ fn validate_function_signature(fn_sig: &syn::Signature) { if let syn::Type::Path(type_path) = return_type.as_ref() { if let Some(segment) = type_path.path.segments.last() - && segment.ident != "Result" { - panic!( - "Expected Action function to return Result, but found different return type" - ); - } + && segment.ident != "Result" + { + panic!( + "Expected Action function to return Result, but found different return type" + ); + } } else { panic!( "Expected Action function to return Result, but found no return type" -- cgit From 3aafc7f2769284c3afab4157863e93e44c571040 Mon Sep 17 00:00:00 2001 From: 魏曹先生 <1992414357@qq.com> Date: Mon, 27 Oct 2025 17:45:01 +0800 Subject: fixed: Incorrect condition setting for determining whether to send parameters during `on_proc_begin` --- crates/system_action/action_macros/src/lib.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'crates/system_action/action_macros') diff --git a/crates/system_action/action_macros/src/lib.rs b/crates/system_action/action_macros/src/lib.rs index f65d424..4c03b63 100644 --- a/crates/system_action/action_macros/src/lib.rs +++ b/crates/system_action/action_macros/src/lib.rs @@ -67,6 +67,7 @@ fn generate_action_struct(input_fn: ItemFn, _is_local: bool) -> proc_macro2::Tok mut ctx: action_system::action::ActionContext, #arg_param_name: #arg_type ) -> Result<#return_type, tcp_connection::error::TcpTargetError> { + ctx.set_is_remote_action(!#_is_local); let args_json = serde_json::to_string(&#arg_param_name) .map_err(|e| { tcp_connection::error::TcpTargetError::Serialization(e.to_string()) -- cgit