Semantic Diff

#8992 Read doc comments only from @res.doc in editor analysis

1 commit

9e2f371482f529406d70df0565784aa8df3554e9..pr-8992

2994aff4c · Christoph Knittel with Claude Opus 5.5 · Oct 23, 2026

Read doc comments only from @res.doc in editor analysis

Why

Editor analysis, and through it hover, completion and rescript-tools doc, also took @ocaml.doc and @ns.doc as doc comments, while genType, the printer and format-codeblocks read only @res.doc, the attribute /** */ comments parse to. The two names are leftovers of the OCaml syntax (its doc support was removed in #6859) and of the parser's NapkinScript days; nothing produces them, and the v0 AST bridge does not use them. The test fixtures that spelled them out now use @res.doc or doc comments, except genType's Comments.res: on a function parameter the formatter would print a doc comment that does not parse.

modifiedFormat hover of a binding with a legacy doc attribute

@ns.doc("Not shown on hover") let nsDoc = 1
text
Before
After
intint---Not shown on hover