Outcome printer formats the bigint sign by hand instead of `Bigint_utils.to_string`
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 78/100
- Issue 类型
- 重构
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- ocaml
- 领域
- compilers
调研方向
从 compiler/syntax/src/res_outcome_printer.ml 中第 486-487 行附近的 bigint 常量分支开始,那里的符号和数字是手动拼接的。将其与 compiler/ml/bigint_utils.ml 中的 Bigint_utils.to_string 进行比较,并查看 res_core.ml 如何已经从 syntax 库中调用 Bigint_utils。完成的标准是:printer 调用共享的辅助函数,手写的符号逻辑被移除,并且正数和负数 bigint 的打印输出保持不变。
由索引模型根据 Issue 内容生成。
描述
Found by differential semantic drift analysis from ece8b148 to a7721303.
What is broken
res_outcome_printer.ml L486-L487 formats a bigint constant by hand: (if positive then "" else "-") ^ digits ^ "n". The same logic exists as Bigint_utils.to_string, used by printlambda.ml and printtyped.ml. #8732 fixed a sign bug in exactly this hand-written copy. The syntax library already depends on ml and uses Bigint_utils (res_core.ml), so the printer can call the shared helper and keep one definition of the sign convention.
Possible cause (speculation only)
A guess: the fix in #8732 corrected the copy in place, the smallest change, rather than replacing it with the shared helper.
- 主要语言
- OCaml
- 星标
- 7.5k
- 派生
- 484
- 平均合并
- 19 小时 46 分钟
- 30 天内合并 PR
- 81
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
rescript-lang/rescript 的其他 Issue
-
难度 3/5 半天 新手友好度 58/100
rescript-lang/rescript#8757 ·
维护者通常 1 天内回复
-
难度 3/5 1-2 天 新手友好度 40/100
rescript-lang/rescript#8753 ·
维护者通常 1 天内回复
-
难度 5/5 一周以上 新手友好度 22/100
rescript-lang/rescript#8733 ·
维护者通常 1 天内回复
-
难度 5/5 一周以上 新手友好度 35/100
rescript-lang/rescript#8727 ·
维护者通常 1 天内回复
-
难度 5/5 一周以上 新手友好度 35/100
rescript-lang/rescript#8726 ·
维护者通常 1 天内回复
查看 rescript-lang/rescript 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
bytecodealliance/wasm-tools#2768 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 78/100
objectionary/jeo-maven-plugin#1898 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复