Source comments still say STRICT_REQUIRE raises "under strict" only; since #2502 it raises in every EIGS_STRICT state

未关闭 适合新手
#2,601 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
1/5
预计耗时
1 小时以内
新手友好度
88/100
Issue 类型
文档
描述清晰度
描述清楚
活跃度
活跃
技术栈
c
领域
documentation

调研方向

阅读 src/builtins.c:1652、src/builtins.c:1729、src/builtins.c:1798 和 src/ext_gfx.c:1289 中的四条注释,以及 src/eigenscript.h:1562-1568 中的 STRICT_REQUIRE 定义和 #2502 中的行为。更新注释,说明在所有 EIGS_STRICT 状态下都会引发 type_mismatch,然后运行 grep -nE 'raises? under strict' src/*.c src/*.h,并确认没有关于 STRICT_REQUIRE 或 ARG_GUARD 的注释描述仅在 strict 模式下发生的行为。

由索引模型根据 Issue 内容生成。

描述

area:stdlib kind:docs-drift

Found while verifying #2409 during a stale-issue sweep against main at 98d15c5.

Since #2502 (fixed by #2510, 92b000fc), wrong-typed arguments raise type_mismatch in every EIGS_STRICT state. STRICT_REQUIRE (src/eigenscript.h:1562-1568) now calls rt_error(EK_TYPE, ...) unconditionally. Four comments above its uses still describe the old split behaviour:

  • src/builtins.c:1652: "so STRICT_REQUIRE: raise under strict, byte-identical otherwise."
  • src/builtins.c:1729: "Coercion shape: raise under strict, unchanged otherwise."
  • src/builtins.c:1798: "Coercion shape: raise under strict, unchanged otherwise."
  • src/ext_gfx.c:1289: "so this raises under strict and does nothing otherwise."

(Line numbers at 98d15c5.) src/builtins.c:1139 also says "raise under strict decode", but it describes json_decode's own strict-decode flag, not this guard. It is out of scope here.

The macro's name says "strict" too, although it no longer depends on strictness. Renaming it is optional and can be decided in the PR.

Done when

  • The four comments above describe the guard as raising type_mismatch in every EIGS_STRICT state (#2502), or the guard's behaviour is changed to match them, with a decision recorded.
  • grep -nE 'raises? under strict' src/*.c src/*.h lists no comment that describes STRICT_REQUIRE or ARG_GUARD as strict-only. The json_decode strict-decode comment at src/builtins.c:1139 may remain.
主要语言
C
星标
3
派生
7
平均合并
4 小时 33 分钟
30 天内合并 PR
156

环境准备

在 Codespaces 中打开

在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

InauguralSystems/EigenScript 的其他 Issue

查看 InauguralSystems/EigenScript 的全部 Issue

相似的 Issue

更多 C Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。