Build-test fixtures that no longer test what they claim
維護者通常 1 天內回覆
已經有一個關聯 PR 被合併了。
- #8838 來自 @cknitt —— 已合併
評估
- 難度
- 2/5
- 預估耗時
- 1-3 小時
- 新手友好度
- 78/100
- Issue 類型
- 缺陷
- 描述清晰度
- 描述清楚
- 活躍度
- 活躍
- 技術堆疊
- javascript, node.js, ocaml
- 領域
- testing
研究方向
閱讀 tests/build_tests/rescript_tools_binary_path/input.js 及其 fixture 設定,接著檢查 weird_deps 和 weird_devdeps 的 rescript.json 檔案。為 rescript_tools_binary_path 新增一個 fixture package.json,並將其他 fixture 的 sources 設為空清單。完成標準是這些 fixture 能驗證預期的套件匯入行為,且不再列出已刪除的原始碼資料夾。
由索引模型根據 Issue 內容生成。
描述
Found by adversarial experiments on semantic analysts.
Each item below is a build-test fixture whose setup no longer matches its purpose.
-
rescript_tools_binary_pathpasses with the import it guards against.input.jsruns the compiledsrc/Main.mjsandsrc/Main.cjsinside the repository.- The fixture has no
package.json, so Node resolves#specifiers in those files against the repository rootpackage.json, which defines#cli/*. - The bug fixed by #8694 (
@module("#cli/bins")emitted into user code) therefore does not reproduce here. The commit message of 45446347c says the test uses its own package.json, but none is checked in. - Reproduction at 8d51b9ce7 in
tests/build_tests/rescript_tools_binary_path, withnode_modules/rescriptlinked to the repo root asinput.jsdoes. The two files contain the JS that bsc emits for the pre-#8694 external:printf 'import * as Bins from "#cli/bins";\nconsole.log(Bins.rescript_tools_exe);\n' > src/Old.mjs printf 'let Bins = require("#cli/bins");\nconsole.log(Bins.rescript_tools_exe);\n' > src/Old.cjs node src/Old.mjs; node src/Old.cjs # both print …/bin/rescript-tools.exe echo '{"name":"user-project","private":true}' > package.json node src/Old.mjs # ERR_PACKAGE_IMPORT_NOT_DEFINED node src/Old.cjs # Error: Cannot find module '#cli/bins' - With that
package.jsonin place, the currentMain.mjsandMain.cjs(importingrescript/tools) still print the binary path. - Fix: check in a fixture
package.json.
-
weird_depsandweird_devdepslist deleted source folders.weird_deps/rescript.jsonandweird_devdeps/rescript.jsonlistsrcandtest, which 4a94e486d (#8709) deleted.- The tests pass because the unresolved-dependency error is reported first.
"sources": []would state the intended setup.
- 主要語言
- OCaml
- 星號
- 7.5k
- 分支
- 484
- 平均合併
- 20 小時 27 分鐘
- 30 天內合併 PR
- 120
環境準備
在瀏覽器裡用你自己的 GitHub 帳號啟動這個專案的開發容器。
- 沒有 Dockerfile 或 Docker Compose 檔案
- 沒有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
rescript-lang/rescript 的其他 Issue
-
難度 5/5 一週以上 新手友好度 25/100
rescript-lang/rescript#8833 · 1 個 reaction ·
維護者通常 1 天內回覆
-
rewatch watch on Linux stops watching a source folder when an overlapping recursive source folder is removed from rescript.json可能已有人在做 @cknitt 於 1 天前認領。 未關閉
難度 4/5 1-2 天 新手友好度 35/100
rescript-lang/rescript#8825 ·
維護者通常 1 天內回覆
-
難度 5/5 一週以上 新手友好度 35/100
rescript-lang/rescript#8806 ·
維護者通常 1 天內回覆
-
難度 5/5 一週以上 新手友好度 35/100
rescript-lang/rescript#8798 ·
維護者通常 1 天內回覆
-
難度 3/5 半天 新手友好度 58/100
rescript-lang/rescript#8757 ·
維護者通常 1 天內回覆
查看 rescript-lang/rescript 的全部 Issue
相似的 Issue
-
beginner bug
難度 1/5 1 小時以內 新手友好度 88/100
hiero-ledger/hiero-sdk-js#4517 ·
維護者通常 1 天內回覆
-
bug misleading tooling trivial
難度 2/5 1-3 小時 新手友好度 76/100
維護者通常 1 天內回覆
-
documentation
難度 2/5 1-3 小時 新手友好度 62/100
vitest-dev/vitest#11577 ·
維護者通常 1 天內回覆
-
e2e-failure ready-to-code
難度 2/5 1-3 小時 新手友好度 72/100
redhat-developer/rhdh-plugin-export-overlays#4391 · 1 則留言 ·
維護者通常 1 天內回覆
-
bug
難度 2/5 1-3 小時 新手友好度 62/100