From 1b88aa7bf25fc46c7eaea3d257b49f4335b613b0 Mon Sep 17 00:00:00 2001 From: wtudio <95963900+wtudio@users.noreply.github.com> Date: Thu, 21 Nov 2024 10:57:28 +0800 Subject: [PATCH] fix: yaml misc (#109) --- document/sphinx-cn/conf.py | 2 ++ src/plugins/echo_plugin/echo_plugin.cc | 2 ++ src/runtime/core/channel/channel_manager.cc | 2 ++ src/runtime/core/executor/executor_manager.cc | 2 ++ src/runtime/core/logger/logger_manager.cc | 2 ++ src/runtime/core/plugin/plugin_manager.cc | 2 ++ src/runtime/core/rpc/rpc_manager.cc | 2 ++ 7 files changed, 14 insertions(+) diff --git a/document/sphinx-cn/conf.py b/document/sphinx-cn/conf.py index 7a9388c12..b3e0c6939 100644 --- a/document/sphinx-cn/conf.py +++ b/document/sphinx-cn/conf.py @@ -58,3 +58,5 @@ myst_substitutions = { "code_site_url": "https://github.com/AimRT/AimRT", "code_site_root_path_url": "https://github.com/AimRT/AimRT/blob/main", } + +html_show_sourcelink = False diff --git a/src/plugins/echo_plugin/echo_plugin.cc b/src/plugins/echo_plugin/echo_plugin.cc index c5d4e0738..2d8357035 100644 --- a/src/plugins/echo_plugin/echo_plugin.cc +++ b/src/plugins/echo_plugin/echo_plugin.cc @@ -149,8 +149,10 @@ bool EchoPlugin::Initialize(runtime::core::AimRTCore* core_ptr) noexcept { [this] { SetLogger(aimrt::logger::GetSimpleLoggerRef()); }); + plugin_options_node = options_; core_ptr_->GetPluginManager().UpdatePluginOptionsNode(Name(), plugin_options_node); + return true; } catch (const std::exception& e) { AIMRT_ERROR("Initialize failed, {}", e.what()); diff --git a/src/runtime/core/channel/channel_manager.cc b/src/runtime/core/channel/channel_manager.cc index 58f8e9704..95800e14e 100644 --- a/src/runtime/core/channel/channel_manager.cc +++ b/src/runtime/core/channel/channel_manager.cc @@ -52,6 +52,8 @@ struct convert { if (backend_options_node["options"]) backend_options.options = backend_options_node["options"]; + else + backend_options.options = YAML::Node(YAML::NodeType::Null); rhs.backends_options.emplace_back(std::move(backend_options)); } diff --git a/src/runtime/core/executor/executor_manager.cc b/src/runtime/core/executor/executor_manager.cc index ba13b5246..305a86750 100644 --- a/src/runtime/core/executor/executor_manager.cc +++ b/src/runtime/core/executor/executor_manager.cc @@ -41,6 +41,8 @@ struct convert { if (executor_node["options"]) executor_options.options = executor_node["options"]; + else + executor_options.options = YAML::Node(YAML::NodeType::Null); rhs.executors_options.emplace_back(std::move(executor_options)); } diff --git a/src/runtime/core/logger/logger_manager.cc b/src/runtime/core/logger/logger_manager.cc index 0ffb6d0b3..da212637b 100644 --- a/src/runtime/core/logger/logger_manager.cc +++ b/src/runtime/core/logger/logger_manager.cc @@ -47,6 +47,8 @@ struct convert { if (backend_options_node["options"]) backend_options.options = backend_options_node["options"]; + else + backend_options.options = YAML::Node(YAML::NodeType::Null); rhs.backends_options.emplace_back(std::move(backend_options)); } diff --git a/src/runtime/core/plugin/plugin_manager.cc b/src/runtime/core/plugin/plugin_manager.cc index ef2ccd8d0..cab095ba0 100644 --- a/src/runtime/core/plugin/plugin_manager.cc +++ b/src/runtime/core/plugin/plugin_manager.cc @@ -36,6 +36,8 @@ struct convert { if (plugin_options_node["options"]) plugin_options.options = plugin_options_node["options"]; + else + plugin_options.options = YAML::Node(YAML::NodeType::Null); rhs.plugins_options.emplace_back(std::move(plugin_options)); } diff --git a/src/runtime/core/rpc/rpc_manager.cc b/src/runtime/core/rpc/rpc_manager.cc index 4206d1934..cc0c4e964 100644 --- a/src/runtime/core/rpc/rpc_manager.cc +++ b/src/runtime/core/rpc/rpc_manager.cc @@ -52,6 +52,8 @@ struct convert { if (backend_options_node["options"]) backend_options.options = backend_options_node["options"]; + else + backend_options.options = YAML::Node(YAML::NodeType::Null); rhs.backends_options.emplace_back(std::move(backend_options)); }