You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[bug] nvm 链路 File name too long ×5(根因未定)+ 诊断族四项(compopt 静默 / command-not-found 前缀 / 顶层 line N 丢失 / source 链归属错位) #162
File name too long 根因缩小(生态车道 ecosys5,nvm-sh/nvm master @ 2026-09-27 克隆)
fixture NVM_DIR(含 versions/node/v18.20.0 + v20.11.0 假版本、空 alias 目录)下跑 nvm ls / nvm alias,niubash 8f89767 侧稳定复现 File name too long ×13(WSL GNU Bash 5.3.0 侧零错误):
p07-nvm.sh: line 1440: File name too long ←×3
p07-nvm.sh: line 1448: File name too long ←×6
p07-nvm.sh: line 1462: File name too long ←×1
(每轮 nvm ls ≈ ×10;归属文件名=顶层探针脚本,行号实为 nvm.sh 的行 —— 归属错位同族。)
行号已对上 nvm.sh(master)
1440: for ALIAS_PATH in "${NVM_ALIAS_DIR}/${ALIAS}"*; do(alias 目录 glob,ALIAS 为空)
Activity
caomengxuan666 commentedon Sep 26, 2026
File name too long 根因缩小(生态车道 ecosys5,nvm-sh/nvm master @ 2026-09-27 克隆)
fixture
NVM_DIR(含 versions/node/v18.20.0 + v20.11.0 假版本、空 alias 目录)下跑nvm ls/nvm alias,niubash 8f89767 侧稳定复现 File name too long ×13(WSL GNU Bash 5.3.0 侧零错误):(每轮
nvm ls≈ ×10;归属文件名=顶层探针脚本,行号实为 nvm.sh 的行 —— 归属错位同族。)行号已对上 nvm.sh(master)
for ALIAS_PATH in "${NVM_ALIAS_DIR}/${ALIAS}"*; do(alias 目录 glob,ALIAS 为空)NVM_NO_COLORS="${NVM_NO_COLORS-}" NVM_HAS_COLORS="${NVM_HAS_COLORS}" NVM_CURRENT="${NVM_CURRENT}" nvm_print_alias_path "${NVM_ALIAS_DIR}" "${ALIAS_PATH}" &(env 前缀 + 后台函数调用)"${NVM_ALIAS_DIR}/lts/${ALIAS}"*glob)即错误集中在
nvm_ls的 alias 枚举子壳:( for ... ; ... & done; wait ) | command sort。已排除
X=1 Y=2 fn arg &/ 管道+wait / glob 空匹配(m13 探针,双侧 MATCH)${@:1:N}切片、here-string 在赋值/裸词位(另一 bug [bug] P0 解析器: $(cmd <<< str) 嵌在双引号词内 = 致命 EOF 语法错误(rc=2 整脚本死)——生态脚本命令拼接形态 #168 的边界)两个残余疑点(下一棒)
D:/形态的 NVM 路径 + 展开中的 pattern/字符串)拼成 >260 字符的名字去做 stat/exec,吃 Windows ENAMETOOLONG。注意本会话另证 niubash 的 PATH 为;分隔 Windows 原生形态(od 实证),nvm 的 PATH 拼接逻辑与它组合可能是放大器。set -x插桩后 niubash 静默零输出 rc=0(stdout/stderr 全空),xtrace 路径无法用于此现场——插桩通道本身也是问题。产物:
D:/repo/rubash/target-ecosys5/results/p07-nvm/(rub.err.raw 含 13 条现场)、work/nvm-inst.sh(插桩副本)。caomengxuan666 commentedon Sep 26, 2026
wt/c-diag 处理结果(commit dc8afbea,基线 8f89767):
N5 已修:触发点不是缺 stderr——裸
compopt本来就有 "not currently executing completion function";缺的是 NAME 形态。complete.def:862-869 只在 list 与 wl 均空时报 not-completing;带 NAME(含 -D/-E/-I 伪词)走 :893-911 progcomp_search,未注册报 "compopt NAME: no completion specification"。已把 parse_compopt_options 改为返回解析态(on/off 位、D/E/I、loptend),executor Compopt arm 按伪词优先(-D>-E>-I,pcomplete.h:109-111 魔法名 DefaultCmD/EmptycmD/InitialWorD 作报告名、'-D' 作注册键)逐名查找:未注册报错 rc1;无选项时 print_compopts(print_compoptions full=1 全 9 项 -o/+o 列出);有选项则位写入(CompletionRegistry::get_mut)。双侧 7 形态逐字一致(target/issue-suites/results/162/n5c.sh + gnu-n5c.out/rub-n5c.out),含compopt -D→compopt: _DefaultCmD_: no completion specification。N6 已修:Executor::diagnostic_prefix / comsub_eof_diagnostic 交互分支改用 base_pathname(shell_name)(error.c get_name_for_error :90-120),
-i -c nosuchcmd前缀从完整 exe 路径变为rubash.exe:(GNU 为 argv[0] 的 basename,双侧同规则)。N7/N8 复测已在基线正确,无需改动:N7 形态(顶层脚本 readonly/shopt/typeset/break 错误)与 N8 形态(source 直驱、source→source、函数内 source)前缀与归属双侧一致(target/issue-suites/results/162/drv3.sh + gnu3.out/rub3.out)。推测由近期 BASH_SOURCE/诊断前缀相关提交修复;原始报告所用二进制较旧。
N4 已最小化复现(未修,根因仍待定):nvm.sh v0.40.1(4619 行,产物目录 target/issue-suites/results/162/nvm/)+
nvm ls在当前基线稳定复现 6 处File name too long(s3.sh/rub 侧;GNU 0 处,gnu-nvm.out):( for ALIAS_PATH in "${NVM_ALIAS_DIR}/${ALIAS}"*; do NVM_NO_COLORS=.. NVM_CURRENT=.. nvm_print_alias_path .. & done; wait ) | command sort里的多重赋值前缀+函数调用+后台 &(子壳管道内)。set -x 定位:错误紧跟 for 循环体首条 & 命令(s4.out)。$THIS_SH script.sh(in-process re-exec suspect): following output written into the redirect file #164 的子进程派发路径相关。四门:build 0 警告 / lib 453 全绿 / executor_tests compopt 2/2 / rustfmt 干净。
caomengxuan666 commentedon Sep 26, 2026
已在 3386013 落地(dc8afbea):N5 compopt 全家——parse_compopt_options 重写为解析态返回(complete.def:826-861),executor arm 按 :862-911(裸形保持文案 / NAME 未注册报 no completion specification / 无选项 print_compopts 全 9 项 / 有选项位写入,伪词报 pcomplete.h:109-111 魔法名);7 形态双侧逐字一致(含 compopt -D → DefaultCmD)。N6 交互前缀——diagnostic_prefix/comsub_eof_diagnostic 改 base_pathname(error.c get_name_for_error)→ 'rubash.exe:' 而非全路径。N7/N8 基线已正确(results/162/drv3.sh 为证)。N4 缩圈——File name too long 稳定复现 6 处锁定 nvm.sh:1211/1222/1234,触发形态=子壳管道内多重赋值前缀+函数+后台 & 的组合(set -x 证实错误紧跟 & 命令),同形最小化不复现——需真实 nvm 上下文,ERROR_FILENAME_EXCED_RANGE(206) 与 #164 派发路径嫌疑同族,归入 #169/#170 后台捕获工单后续。
fix(#162): invented TMPDIR stays shell-only; a genuinely exported TMP…
fix(tests): gate TMPDIR child-boundary tests to Windows (#162) (#696)