Analyzer安定化完了: NYASH_DISABLE_PLUGINS=1復元 + plugin無効化根治
## 修正内容 1. **hako_check.sh/run_tests.sh**: NYASH_DISABLE_PLUGINS=1 + NYASH_BOX_FACTORY_POLICY=builtin_first追加 2. **src/box_factory/plugin.rs**: NYASH_DISABLE_PLUGINS=1チェック追加 3. **src/box_factory/mod.rs**: plugin shortcut pathでNYASH_DISABLE_PLUGINS尊重 4. **tools/hako_check/render/graphviz.hako**: smart quotes修正(parse error解消) ## 根本原因 - NYASH_USE_PLUGIN_BUILTINS=1が自動設定され、ArrayBox/MapBoxがplugin経由で生成を試行 - bid/registry.rsで"Plugin loading temporarily disabled"の状態でも試行されエラー - mod.rs:272のshortcut pathがNYASH_DISABLE_PLUGINSを無視していた ## テスト結果 - 10/11 PASS(HC011,13-18,21-22,31) - HC012: 既存issue(JSON安定化未完) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@ -11,6 +11,15 @@ pub fn parse() -> CliConfig {
|
||||
if let Ok(json) = serde_json::to_string(&script_args) {
|
||||
std::env::set_var("NYASH_SCRIPT_ARGS_JSON", json);
|
||||
}
|
||||
// Provide HEX-escaped JSON as an alternate robust path for multiline/special bytes
|
||||
// Each arg is encoded as lowercase hex of its UTF-8 bytes
|
||||
let hex_args: Vec<String> = script_args
|
||||
.iter()
|
||||
.map(|s| hex_encode_utf8(s))
|
||||
.collect();
|
||||
if let Ok(hex_json) = serde_json::to_string(&hex_args) {
|
||||
std::env::set_var("NYASH_SCRIPT_ARGS_HEX_JSON", hex_json);
|
||||
}
|
||||
}
|
||||
let matches = build_command()
|
||||
.try_get_matches_from(&argv[..pos])
|
||||
@ -97,6 +106,17 @@ pub fn build_command() -> Command {
|
||||
.arg(Arg::new("build-target").long("target").value_name("TRIPLE").help("Target triple for --build"))
|
||||
}
|
||||
|
||||
fn hex_encode_utf8(s: &str) -> String {
|
||||
let bytes = s.as_bytes();
|
||||
let mut out = String::with_capacity(bytes.len() * 2);
|
||||
const HEX: &[u8; 16] = b"0123456789abcdef";
|
||||
for &b in bytes {
|
||||
out.push(HEX[(b >> 4) as usize] as char);
|
||||
out.push(HEX[(b & 0x0f) as usize] as char);
|
||||
}
|
||||
out
|
||||
}
|
||||
|
||||
pub fn from_matches(matches: &ArgMatches) -> CliConfig {
|
||||
if matches.get_flag("stage3") { std::env::set_var("NYASH_NY_COMPILER_STAGE3", "1"); }
|
||||
if let Some(a) = matches.get_one::<String>("ny-compiler-args") { std::env::set_var("NYASH_NY_COMPILER_CHILD_ARGS", a); }
|
||||
|
||||
Reference in New Issue
Block a user