2025-09-07 20:23:39 +09:00
|
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
set -euo pipefail
|
|
|
|
|
|
ROOT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd)
|
2025-11-01 18:53:15 +09:00
|
|
|
|
ENTRY=${1:-lang/src/compiler/entry/compiler_stageb.hako}
|
2025-09-07 20:23:39 +09:00
|
|
|
|
|
2025-11-01 19:01:55 +09:00
|
|
|
|
# Phase‑20.33: legacy apps/selfhost/tools/dep_tree_main.nyash has been retired.
|
|
|
|
|
|
# Intentionally fail fast to surface stale references. TTL: replace with lang tool.
|
|
|
|
|
|
LEGACY_TOOL="$ROOT_DIR/apps/selfhost/tools/dep_tree_main.nyash"
|
|
|
|
|
|
if [ -f "$LEGACY_TOOL" ]; then
|
|
|
|
|
|
echo "[warn] Using legacy dep_tree tool (apps/selfhost). Migrate to lang tool soon (TTL)." >&2
|
|
|
|
|
|
NYASH_DISABLE_PLUGINS=0 NYASH_CLI_VERBOSE=0 NYASH_USE_PLUGIN_BUILTINS=1 \
|
|
|
|
|
|
"$ROOT_DIR/target/release/nyash" --backend interpreter \
|
|
|
|
|
|
"$LEGACY_TOOL" <<<"$ENTRY"
|
|
|
|
|
|
else
|
|
|
|
|
|
echo "[error] Legacy dep_tree tool not found: $LEGACY_TOOL" >&2
|
|
|
|
|
|
echo "[hint] Replace this script to call a lang/ tool when available. See CURRENT_TASK.md (Phase‑20.33)." >&2
|
|
|
|
|
|
exit 2
|
|
|
|
|
|
fi
|