feat: Complete v2 plugin system migration with compilation fixes
🎉 Phase 9.75g-1: v2プラグインシステム移行完成 ### ✅ 修正完了項目 - bid/mod.rs: 古いregistryモジュールの無効化 - generic_plugin_box.rs: registry依存の削除、簡易clone実装 - objects.rs: 古いBIDレジストリ呼び出しを無効化、v2システム用コメント追加 - main.rs, runner.rs: import修正(nyash_rust::cli::CliConfigへ) - lib.rs: CLI モジュール export追加 ### 🚀 達成事項 - ✅ 全コンパイルエラー修正完了 - ✅ v2プラグインシステム正常起動確認 - ✅ nyash.toml読み込み・設定統合成功 - ✅ BoxFactoryRegistry + PluginLoaderV2連携実装 - ✅ test_filebox_v2.nyash テストファイル追加 ### 📊 実行結果 ``` 🔌 v2 plugin system initialized from nyash.toml ✅ v2 plugin system fully configured 📦 Registering plugin provider for FileBox ``` ### 🔧 次のステップ (Phase 9.75g-2) - BoxFactoryRegistry統合: new FileBox() → v2プラグインBox生成 - TLV通信実装: 実際のプラグインメソッド呼び出し 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@ -5,8 +5,8 @@
|
||||
* separated from CLI parsing and the main entry point.
|
||||
*/
|
||||
|
||||
use crate::cli::CliConfig;
|
||||
use crate::{
|
||||
use nyash_rust::cli::CliConfig;
|
||||
use nyash_rust::{
|
||||
box_trait::{NyashBox, StringBox, IntegerBox, BoolBox, VoidBox, AddBox, BoxCore},
|
||||
tokenizer::{NyashTokenizer},
|
||||
ast::ASTNode,
|
||||
@ -17,11 +17,11 @@ use crate::{
|
||||
};
|
||||
|
||||
#[cfg(feature = "llvm")]
|
||||
use crate::backend::{llvm_compile_and_execute};
|
||||
use nyash_rust::backend::{llvm_compile_and_execute};
|
||||
use std::{fs, process};
|
||||
|
||||
// v2 plugin system imports
|
||||
use crate::runtime::init_global_loader_v2;
|
||||
use nyash_rust::runtime::{init_global_loader_v2, get_global_registry, get_global_loader_v2, PluginConfig};
|
||||
|
||||
/// Main execution coordinator
|
||||
pub struct NyashRunner {
|
||||
@ -57,7 +57,7 @@ impl NyashRunner {
|
||||
}
|
||||
|
||||
fn init_bid_plugins(&self) {
|
||||
// Best-effort init; do not fail the program if missing
|
||||
// v2プラグインシステムを初期化
|
||||
eprintln!("🔍 DEBUG: Initializing v2 plugin system");
|
||||
|
||||
// Try to load nyash.toml configuration
|
||||
@ -65,8 +65,6 @@ impl NyashRunner {
|
||||
println!("🔌 v2 plugin system initialized from nyash.toml");
|
||||
|
||||
// Apply plugin configuration to the box registry
|
||||
use crate::runtime::{get_global_registry, get_global_loader_v2};
|
||||
|
||||
let loader = get_global_loader_v2();
|
||||
let loader = loader.read().unwrap();
|
||||
|
||||
@ -78,11 +76,13 @@ impl NyashRunner {
|
||||
for box_name in &lib_def.boxes {
|
||||
eprintln!(" 📦 Registering plugin provider for {}", box_name);
|
||||
// Note: plugin_name is lib_name in v2 system
|
||||
registry.apply_plugin_config(&crate::runtime::PluginConfig {
|
||||
registry.apply_plugin_config(&PluginConfig {
|
||||
plugins: [(box_name.clone(), lib_name.clone())].into(),
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
println!("✅ v2 plugin system fully configured");
|
||||
}
|
||||
} else {
|
||||
eprintln!("⚠️ Failed to load nyash.toml - plugins disabled");
|
||||
|
||||
Reference in New Issue
Block a user