fix: 修复3个P0遗留 — AutoRollback回退/ConfigReloaded序列化/FfiString跨allocator
This commit is contained in:
14
src/main.rs
14
src/main.rs
@@ -2,6 +2,8 @@ use anyhow::Result;
|
||||
use showen_v2::core::config::AppConfig;
|
||||
use showen_v2::core::plugin_loader::PluginLoader;
|
||||
use showen_v2::core::service_manager::ServiceManager;
|
||||
#[cfg(not(test))]
|
||||
use showen_v2::core::version_manager::VersionManager;
|
||||
use showen_v2::plugins::{
|
||||
ble::BlePlugin, http::HttpPlugin, screen::ScreenPlugin, video::VideoPlugin, wifi::WifiPlugin,
|
||||
};
|
||||
@@ -69,6 +71,8 @@ fn main() -> Result<()> {
|
||||
let plugin_store = std::path::Path::new("plugin_store");
|
||||
if plugin_store.exists() {
|
||||
println!("扫描动态插件...");
|
||||
#[cfg(not(test))]
|
||||
manager.set_version_manager(VersionManager::new(PluginLoader::new(plugin_store)));
|
||||
let loader = PluginLoader::new(plugin_store);
|
||||
match loader.load_registry() {
|
||||
Ok(registry) => {
|
||||
@@ -88,16 +92,10 @@ fn main() -> Result<()> {
|
||||
manifest.capabilities,
|
||||
manifest.auto_test,
|
||||
);
|
||||
println!(
|
||||
" ✓ {} v{} (动态)",
|
||||
plugin_id, entry.active_version
|
||||
);
|
||||
println!(" ✓ {} v{} (动态)", plugin_id, entry.active_version);
|
||||
}
|
||||
Err(e) => {
|
||||
eprintln!(
|
||||
" ✗ {} v{} 加载失败: {e}",
|
||||
plugin_id, entry.active_version
|
||||
);
|
||||
eprintln!(" ✗ {} v{} 加载失败: {e}", plugin_id, entry.active_version);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user