🎉 feat: Phase 15.5革命完了!StringBox/IntegerBoxプラグイン優先度問題根治
何十日間の激闘ついに完全解決!"Everything is Plugin"哲学実装達成🚀 🏆 核心成果: - FactoryPolicy システム完全実装 (StrictPluginFirst/CompatPluginFirst/BuiltinFirst) - プラグイン優先をデフォルト化: plugins > user > builtin - builtin_impls/ 分離実装でPhase 2削除準備完了 - unified_registry.rs でwith_env_policy()によるポリシー制御 - 環境変数制御: NYASH_BOX_FACTORY_POLICY=strict_plugin_first 🔧 技術実装: - src/box_factory/mod.rs: FactoryPolicy enum + rebuild_cache() + policy-based ordering - src/box_factory/builtin.rs: builtin_impls/への振り分け実装 - src/box_factory/builtin_impls/: 7ファイル分離 (削除順序コメント付き) - src/runtime/unified_registry.rs: with_env_policy() でStrictPluginFirst デフォルト ✅ 動作確認完了: - StringBox プラグイン優先で作成成功 - Factory Policy: StrictPluginFirst メッセージ確認 - プラグイン初期化確認 (Net plugin, FileBox plugin) 📋 Phase 2準備完了: builtin_impls/ 段階削除戦略 1. string_box.rs, integer_box.rs (プラグイン準備済み) 2. bool_box.rs (プラグイン要作成) 3. array_box.rs, map_box.rs (プラグイン確認要) 4. console_box.rs (最後 - ログ用に重要) 🎯 ChatGPT戦略 + ユーザー分離アイデアの完璧な統合実装成果! 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
35
src/box_factory/builtin_impls/console_box.rs
Normal file
35
src/box_factory/builtin_impls/console_box.rs
Normal file
@ -0,0 +1,35 @@
|
||||
/*!
|
||||
* Builtin ConsoleBox Implementation (Phase 15.5: Scheduled for Removal)
|
||||
*
|
||||
* ⚠️ DEPRECATED: This will be replaced by nyash-console-plugin (exists!)
|
||||
* 🎯 Phase 2.6: Delete this file to remove builtin ConsoleBox support (LAST)
|
||||
*/
|
||||
|
||||
use crate::box_trait::NyashBox;
|
||||
use crate::box_factory::RuntimeError;
|
||||
|
||||
/// Create builtin ConsoleBox instance
|
||||
///
|
||||
/// ⚠️ DEPRECATED: ConsoleBox plugin should replace this (check plugins/nyash-console-plugin)
|
||||
pub fn create(_args: &[Box<dyn NyashBox>]) -> Result<Box<dyn NyashBox>, RuntimeError> {
|
||||
eprintln!(
|
||||
"⚠️ [DEPRECATED] Using builtin ConsoleBox - use nyash-console-plugin!\n\
|
||||
📋 Phase 15.5: Everything is Plugin!\n\
|
||||
🔧 Check: plugins/nyash-console-plugin\n\
|
||||
⚠️ WARNING: ConsoleBox is critical for logging - remove LAST!"
|
||||
);
|
||||
|
||||
Ok(Box::new(crate::boxes::console_box::ConsoleBox::new()))
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use crate::boxes::console_box::ConsoleBox;
|
||||
|
||||
#[test]
|
||||
fn test_builtin_console_box_creation() {
|
||||
let result = create(&[]).unwrap();
|
||||
assert!(result.as_any().downcast_ref::<ConsoleBox>().is_some());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user