Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

`rescript-tools doc` not extracting docstrings from type definitions

Offen
#8,040 5 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

@shulhi arbeitet bereits daran.

Seit 27.12.2025.

  • #8119 von @shulhi — offen

Bewertung

Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Anfängerfreundlichkeit
52/100
Issue-Typ
Bug
Klarheit
Größtenteils klar
Aktivitätsstatus
Veraltet
Tech-Stack
node.js
Bereich
cli, tooling

Rechercherichtung

Beginne mit dem Befehl rescript-tools doc und reproduziere das Verhalten mit src/Demo.res aus dem Issue. Verfolge, wie der Befehl Typdefinitionen und /** */-Kommentare behandelt, und führe anschließend npx rescript-tools doc src/Demo.res erneut aus. Erledigt ist die Aufgabe, wenn die Ausgabe den Docstring des Typs und ein befülltes items-Array enthält.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

Environment

  • ReScript version: 12.0.0
  • OS: macOS
  • Node version: v22.20.0

Problem

The rescript-tools doc command is not extracting docstrings from type definitions and returns an empty items array, even when using proper /** */ documentation comment syntax.

Minimal Reproducible Example

File: src/Demo.res

/**
 * Test
 */
type t = {
  name: string,
  servings: int,
}

Command

npx rescript-tools doc src/Demo.res

Output

{
  "name": "Demo",
  "docstrings": [],
  "source": {
    "filepath": "src/Demo.res",
    "line": 1,
    "col": 1
  },
  "items": []
}

Steps to Reproduce

  • Create a new ReScript project
  • Create Demo.res with the content above
  • Run npx rescript-tools doc src/Demo.res
  • Observe empty items array and missing docstrings

Additional Context

This affects tooling that depends on rescript-tools for documentation extraction (such as codegen)

Vorherrschende Sprache
OCaml
Sterne
7.5k
Forks
484
Ø Merge
20 Std. 27 Min.
Gemergte PRs (30 T.)
120

Entwicklungsumgebung

In Codespaces öffnen

Startet den Dev-Container des Projekts im Browser, mit Ihrem eigenen GitHub-Konto.

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus rescript-lang/rescript

Alle Issues in rescript-lang/rescript

Ähnliche Issues

Weitere Issues zu CLI

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.