Hacktoberfest 2026: as issues que os mantenedores marcaram para outubro, abertas e boas para iniciantes. Ver issues do Hacktoberfest

Doc-comment attributes: editor analysis accepts `@ocaml.doc`/`@ns.doc`, genType and the printer do not

Aberta
#8,978 0 comentários 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 1 dia

@cknitt já está trabalhando nisso.

Desde 23/10/2026.

  • #8992 de @cknitt — aberto

Avaliação

Dificuldade
3/5
Tempo estimado
1-2 dias
Facilidade para iniciantes
25/100
Tipo de issue
Bug
Clareza
Claramente especificada
Status de atividade
Estagnada
Stack de tecnologia
ocaml
Domínio
backend, compilers

Direção de pesquisa

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.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

Found by differential semantic drift analysis from a7721303 to b123b7c3.

What is broken

The doc-comment attribute names are accepted inconsistently.

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.

Linguagem predominante
OCaml
Estrelas
7.5k
Forks
483
Merge médio
21h 8min
PRs com merge (30d)
183

Preparar o ambiente

Abrir no Codespaces

Inicia o contêiner de desenvolvimento do projeto no navegador, com a sua própria conta do GitHub.

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de rescript-lang/rescript

Todas as issues de rescript-lang/rescript

Issues semelhantes

Mais issues de Backend & API Design

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.