Initial investigation: Identified core Box registration issues
Co-authored-by: moe-charm <217100418+moe-charm@users.noreply.github.com>
This commit is contained in:
@ -8,7 +8,7 @@
|
||||
|
||||
use super::*;
|
||||
use crate::ast::UnaryOperator;
|
||||
use crate::boxes::{buffer::BufferBox, JSONBox, HttpClientBox, StreamBox, RegexBox, IntentBox, P2PBox};
|
||||
use crate::boxes::{buffer::BufferBox, JSONBox, HttpClientBox, StreamBox, RegexBox, IntentBox};
|
||||
use crate::boxes::{FloatBox, MathBox, ConsoleBox, TimeBox, DateTimeBox, RandomBox, SoundBox, DebugBox, file::FileBox, MapBox};
|
||||
use crate::box_trait::BoolBox;
|
||||
use crate::operator_traits::OperatorResolver;
|
||||
@ -453,10 +453,10 @@ impl NyashInterpreter {
|
||||
return self.execute_intent_box_method(intent_box, method, arguments);
|
||||
}
|
||||
|
||||
// P2PBox method calls
|
||||
if let Some(p2p_box) = obj_value.as_any().downcast_ref::<P2PBox>() {
|
||||
return self.execute_p2p_box_method(p2p_box, method, arguments);
|
||||
}
|
||||
// P2PBox method calls - Temporarily disabled
|
||||
// if let Some(p2p_box) = obj_value.as_any().downcast_ref::<P2PBox>() {
|
||||
// return self.execute_p2p_box_method(p2p_box, method, arguments);
|
||||
// }
|
||||
|
||||
// EguiBox method calls (非WASM環境のみ)
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
|
||||
@ -7,7 +7,7 @@ use crate::interpreter::core::NyashInterpreter;
|
||||
use crate::interpreter::core::RuntimeError;
|
||||
use crate::ast::ASTNode;
|
||||
use crate::box_trait::{NyashBox, StringBox, BoolBox};
|
||||
use crate::boxes::{IntentBox, P2PBox};
|
||||
use crate::boxes::{IntentBox};
|
||||
use crate::method_box::MethodBox;
|
||||
|
||||
impl NyashInterpreter {
|
||||
@ -45,7 +45,8 @@ impl NyashInterpreter {
|
||||
}
|
||||
}
|
||||
|
||||
/// P2PBoxのメソッド実行 (Arc<Mutex>版)
|
||||
// P2PBoxのメソッド実行 (Arc<Mutex>版) - Temporarily disabled
|
||||
/*
|
||||
pub(in crate::interpreter) fn execute_p2p_box_method(
|
||||
&mut self,
|
||||
p2p_box: &P2PBox,
|
||||
@ -114,4 +115,5 @@ impl NyashInterpreter {
|
||||
})
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
@ -502,13 +502,10 @@ impl NyashInterpreter {
|
||||
});
|
||||
};
|
||||
|
||||
let transport_kind = transport_str.parse::<crate::boxes::p2p_box::TransportKind>()
|
||||
.map_err(|e| RuntimeError::InvalidOperation {
|
||||
message: format!("Invalid transport type '{}': {}", transport_str, e),
|
||||
})?;
|
||||
|
||||
let p2p_box = crate::boxes::p2p_box::P2PBoxData::new(node_id, transport_kind);
|
||||
return Ok(Box::new(p2p_box) as Box<dyn NyashBox>);
|
||||
// TODO: Re-enable P2PBox after fixing transport/messaging imports
|
||||
return Err(RuntimeError::TypeError {
|
||||
message: "P2PBox temporarily disabled due to import issues".to_string(),
|
||||
});
|
||||
}
|
||||
"StreamBox" => {
|
||||
// StreamBoxは引数なしで作成
|
||||
|
||||
Reference in New Issue
Block a user