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.
- 主要语言
- ReScript
- 星标
- 7.5k
- 派生
- 483
- 平均合并
- 1 天 4 小时
- 30 天内合并 PR
- 127
环境准备
在浏览器里用你自己的 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 于 3 天前认领。 未关闭
难度 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
-
area:core-platform effort:S priority:P3 status:in-review type:test
难度 2/5 1 小时以内 新手友好度 80/100
randomparity/kdive#3246 · 1 条评论 ·
维护者通常 1 天内回复
-
cleanup go hacktoberfest NWO priority: low skill: good first issue status: ready for dev
难度 2/5 1-3 小时 新手友好度 70/100
hyperledger-labs/fabric-smart-client#2135 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 70/100
Exa-Networks/exabgp#1436 ·
-
internal
难度 2/5 1-3 小时 新手友好度 70/100
frostney/GocciaScript#1715 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 62/100
维护者通常 1 天内回复