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:
@ -1,4 +1,4 @@
|
||||
// tools/hako_check/render/graphviz.hako — GraphvizRenderBox (MVP)
|
||||
// tools/hako_check/render/graphviz.hako - GraphvizRenderBox (MVP)
|
||||
// Render minimal DOT graph from one or more Analysis IRs.
|
||||
|
||||
using selfhost.shared.common.string_helpers as Str
|
||||
@ -20,13 +20,41 @@ static box GraphvizRenderBox {
|
||||
gi = gi + 1
|
||||
}
|
||||
}
|
||||
// Emit nodes
|
||||
local itn = nodes
|
||||
// Map iteration: keys() not available → store labels as keys in map
|
||||
// Use a synthetic loop by scanning a known list captured during _render_ir
|
||||
// For MVP, nodes map has key=name, value=1
|
||||
// We cannot iterate map keys deterministically; accept arbitrary order.
|
||||
// Re-emitting by re-collecting from edges as well (ensures endpoints appear).
|
||||
// Build clusters by box: group nodes whose name looks like Box.method/arity
|
||||
local groups = new MapBox()
|
||||
local group_keys = new ArrayBox()
|
||||
local nk = nodes.get("__keys__")
|
||||
if nk != null {
|
||||
local i = 0
|
||||
while i < nk.size() {
|
||||
local name = nk.get(i)
|
||||
local dot = name.indexOf(".")
|
||||
if dot > 0 {
|
||||
local box_name = name.substring(0, dot)
|
||||
local gkey = "cluster_" + box_name
|
||||
local arr = groups.get(gkey)
|
||||
if arr == null { arr = new ArrayBox(); groups.set(gkey, arr); group_keys.push(gkey) }
|
||||
// dedup in group
|
||||
local seen = 0; local j=0; while j < arr.size() { if arr.get(j) == name { seen = 1; break } j = j + 1 }
|
||||
if seen == 0 { arr.push(name) }
|
||||
}
|
||||
i = i + 1
|
||||
}
|
||||
}
|
||||
// Emit clusters
|
||||
local gi = 0
|
||||
while gi < group_keys.size() {
|
||||
local gk = group_keys.get(gi)
|
||||
print(" subgraph \"" + gk + "\" {")
|
||||
// label = box name (strip "cluster_")
|
||||
local label = gk.substring("cluster_".length())
|
||||
print(" label=\"" + label + "\";")
|
||||
local arr = groups.get(gk)
|
||||
local j = 0; while j < arr.size() { print(" \"" + arr.get(j) + "\";"); j = j + 1 }
|
||||
print(" }")
|
||||
gi = gi + 1
|
||||
}
|
||||
// Emit edges
|
||||
// Emit edges
|
||||
if edges != null {
|
||||
// edges map key = from + "\t" + to
|
||||
@ -42,7 +70,7 @@ static box GraphvizRenderBox {
|
||||
local src = key.substring(0, tab)
|
||||
local dst = key.substring(tab+1)
|
||||
print(" \"" + src + "\" -> \"" + dst + "\";")
|
||||
// also register nodes (in case they weren’t explicitly collected)
|
||||
// also register nodes (in case they weren't explicitly collected)
|
||||
nodes.set(src, 1)
|
||||
nodes.set(dst, 1)
|
||||
}
|
||||
@ -50,14 +78,13 @@ static box GraphvizRenderBox {
|
||||
}
|
||||
}
|
||||
}
|
||||
// Now emit nodes at the end for any isolated methods
|
||||
// Rebuild a list of node keys from a synthetic array stored under nodes.get("__keys__")
|
||||
local nk = nodes.get("__keys__")
|
||||
// Emit standalone nodes not covered by clusters
|
||||
if nk != null {
|
||||
local ni = 0
|
||||
while ni < nk.size() {
|
||||
local name = nk.get(ni)
|
||||
print(" \"" + name + "\";")
|
||||
local dot = name.indexOf(".")
|
||||
if dot < 0 { print(" \"" + name + "\";") }
|
||||
ni = ni + 1
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user