Doc-comment attributes: editor analysis accepts `@ocaml.doc`/`@ns.doc`, genType and the printer do not
維護者通常 1 天內回覆
評估
研究方向
Read analysis/src/process_attributes.ml, compiler/gentype/annotation.ml, compiler/syntax/src/res_printer.ml, compiler/syntax/src/res_parsetree_viewer.ml, and tools/src/tools.ml, where the issue identifies inconsistent accepted attribute names. Align the readers with the parser’s @res.doc behavior and the stated decision to retain @ocaml.doc and @ns.doc. Check hover, doc output, genType comments, printing, and format-codeblocks; an open linked pull request #8992 already addresses this issue.
由索引模型根據 Issue 內容生成。
描述
Found by differential semantic drift analysis from a7721303 to b123b7c3.
What is broken
The doc-comment attribute names are accepted inconsistently.
- Editor analysis, and through it hover and
rescript-tools doc, accepts@ocaml.doc,@ns.docand@res.doc(process_attributes.mlL7). - genType (
annotation.mlL36), the printer (res_printer.mlL6136,res_parsetree_viewer.mlL427) andrescript-tools format-codeblocks(tools.mlL867) accept only@res.doc. - The parser produces only
@res.doc.
So @ns.doc("Adds one") let inc = x => x + 1 shows "Adds one" on hover and in rescript-tools doc, while genType emits no doc comment for inc. #8928 edited this list (dropping ocaml.text) and kept the other two names on purpose; the other readers were not aligned with that decision.
Possible cause (speculation only)
A guess: #8805 and #8928 scoped their attribute cleanups to the compiler's own handling, and the readers in editor analysis and genType were decided separately.
- 主要語言
- OCaml
- 星號
- 7.5k
- 分支
- 483
- 平均合併
- 20 小時 28 分鐘
- 30 天內合併 PR
- 201
環境準備
在瀏覽器裡用你自己的 GitHub 帳號啟動這個專案的開發容器。
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
rescript-lang/rescript 的其他 Issue
-
難度 5/5 一週以上 新手友好度 35/100
rescript-lang/rescript#9006 ·
維護者通常 1 天內回覆
-
難度 3/5 1-2 天 新手友好度 70/100
rescript-lang/rescript#8997 ·
維護者通常 1 天內回覆
-
難度 3/5 1-2 天 新手友好度 68/100
rescript-lang/rescript#8994 ·
維護者通常 1 天內回覆
-
@notUndefined in an interface is not checked against the implementation可能已有人在做 關聯的 PR 仍在進行中或已合併。 未關閉
難度 4/5 3-5 天 新手友好度 35/100
rescript-lang/rescript#8964 · 1 則留言 ·
維護者通常 1 天內回覆
-
Have formatter insert newlines around multi-line expressions可能已有人在做 @rolandpeelen 於 1 天前認領。 未關閉
難度 4/5 3-5 天 新手友好度 25/100
rescript-lang/rescript#8960 ·
維護者通常 1 天內回覆
查看 rescript-lang/rescript 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 78/100
維護者通常 5 天內回覆
-
area-multitenancy area-security p1-recommended priority-high technical-debt
難度 2/5 1 小時以內 新手友好度 75/100
維護者通常 1 天內回覆
-
[Bug]: REST API URL starting with "http" but no scheme (e.g. httpbin.org/get) is not given an http:// prefix可能已有人在做 @ItsDeadlyProgrammer 今天認領。 未關閉
難度 2/5 1-3 小時 新手友好度 68/100
appsmithorg/appsmith#42471 · 1 則留言 ·
維護者通常 2 天內回覆
-
enhancement
難度 2/5 1-3 小時 新手友好度 72/100
fossasia/visdom-dev#77 ·
維護者通常 4 天內回覆
-
bug
難度 2/5 1-3 小時 新手友好度 63/100
FriendsofECCE/ECCE#519 ·