fix(scripts): stryker-diff.mjs spawns the extensionless .bin shim and cannot run on Windows
維護者通常 3 天內回覆
評估
- 難度
- 2/5
- 預估耗時
- 1-3 小時
- 新手友好度
- 78/100
- Issue 類型
- 缺陷
- 描述清晰度
- 描述清楚
- 活躍度
- 活躍
- 技術堆疊
- node.js, typescript
- 領域
- devtools, testing-qa
研究方向
閱讀第 412 行附近的 scripts/stryker-diff.mjs,檢查它如何啟動 Stryker 二進位檔。檢查套件中的 node_modules/.bin 項目,並比較指令碼處理 Windows 和 POSIX 的方式。完成標準是本機 mutation 預檢能在 Windows 上啟動 Stryker,同時繼續在 Linux 上正常運作。
由索引模型根據 Issue 內容生成。
描述
Symptom
node scripts/stryker-diff.mjs cannot start Stryker on Windows: spawnSync ... ENOENT for node_modules\.bin\stryker, even though the file exists and stryker --version reports 10.0.0. The local preflight described in the mutation-gate protocol therefore only works on Linux, and every Windows contributor has to fall back to CI for the changed-line mutation report.
Cause
scripts/stryker-diff.mjs:421 passes the extensionless POSIX shim straight to spawnSync - no shell, no process.platform branch - and the sibling call at line 373 does the same for vitest. The installed set is stryker, stryker.CMD, stryker.ps1 (measured at main 410e5ad3d5, blob 7dfe0006d2d5, unchanged since a15ba8c8); only the latter two are runnable.
Expected
Do not branch on the suffix: spawning node_modules\.bin\stryker.CMD without a shell was probed and returns EINVAL (-4071), where the extensionless shim returns ENOENT (-4058). Resolve the entry the owning package declares - @stryker-mutator/core ships bin: {"stryker": "./bin/stryker.js"} - and run that file through process.execPath: status 0 with 10.0.0 in 1000 ms; vitest's declared vitest.mjs starts in 64 ms the same way. #2450 implements exactly that for both calls.
Workaround meanwhile
Run the gate's Stryker step through cmd /c node_modules\.bin\stryker.CMD with the six STRYKER_* variables the script already sets, and keep reading the CI mutation-diff run as the authority.
- 主要語言
- TypeScript
- 星號
- 2k
- 分支
- 301
- 平均合併
- 3 天 14 小時
- 30 天內合併 PR
- 103
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
Zoo-Code-Org/Zoo-Code 的其他 Issue
-
難度 2/5 1-3 小時 新手友好度 70/100
Zoo-Code-Org/Zoo-Code#2773 · 1 則留言 ·
維護者通常 3 天內回覆
-
難度 2/5 1-3 小時 新手友好度 68/100
Zoo-Code-Org/Zoo-Code#2717 · 1 則留言 ·
維護者通常 3 天內回覆
-
難度 2/5 1-3 小時 新手友好度 77/100
Zoo-Code-Org/Zoo-Code#2515 ·
維護者通常 3 天內回覆
-
[BUG] search_files hides matching text on long lines可能已有人在做 @DananjayaNadun 於 9 天前認領。 未關閉
難度 2/5 1-3 小時 新手友好度 74/100
Zoo-Code-Org/Zoo-Code#2496 · 1 則留言 · 已指派 1 人 ·
維護者通常 3 天內回覆
-
難度 2/5 1-3 小時 新手友好度 68/100
Zoo-Code-Org/Zoo-Code#2493 ·
維護者通常 3 天內回覆
查看 Zoo-Code-Org/Zoo-Code 的全部 Issue
相似的 Issue
-
enhancement
難度 2/5 1-3 小時 新手友好度 78/100
維護者通常 1 天內回覆
-
ci
難度 2/5 1-3 小時 新手友好度 78/100
ClickHouse/clickhouse-js#1248 ·
維護者通常 1 天內回覆
-
E2E: Darlehen-Test wartet auf die gebuchte Auszahlung, bevor er zur Liquiditätsvorschau wechselt未關閉technik
難度 2/5 1-3 小時 新手友好度 78/100
-
bug
難度 2/5 1-3 小時 新手友好度 67/100
SR5-FoundryVTT/SR5-FoundryVTT#2162 ·
維護者通常 1 天內回覆
-
enhancement good first issue
難度 2/5 1-3 小時 新手友好度 84/100
AhmedNAgy25/analysor#25 ·
維護者通常 1 天內回覆