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

Stale comments after the dict and JSX representation changes

Geschlossen
#8,767 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
3/5
Geschätzter Aufwand
Ein halber Tag
Anfängerfreundlichkeit
55/100
Issue-Typ
Dokumentation
Klarheit
Größtenteils klar
Aktivitätsstatus
Aktiv
Tech-Stack
javascript, ocaml
Bereich
compilers

Rechercherichtung

Start with the three comments named in the issue: compiler/ml/translcore.ml around line 1453, analysis/reanalyze/src/side_effects.ml around line 63, and compiler/ml/lambda.ml lines 292-294. Check them against compiler/core/lam_compile_primitive.ml, which now compiles Pdict_spread to an object literal. Done when the dict and side-effect comments describe the current output, and the lambda.ml comment is either corrected or backed by the constructor-ordering practice. That last part needs a maintainer decision, so ask before changing it.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

Found by differential semantic drift analysis from ece8b148 to a7721303.

What is broken

Comments still describe representations that the dict and JSX changes replaced:

  • translcore.ml L1453 says dict spreads compile to Object.assign via Primitive_dict.spread. Since #8747 Pdict_spread compiles to an object literal with spreads (lam_compile_primitive.ml).
  • analysis/reanalyze/src/side_effects.ml L63 says "Object.assign reads the spread dicts". The logic (a spread may have side effects) still holds; the wording does not.
  • compiler/ml/lambda.ml L292-L294 says .cmj files marshal Lambda.t without a version check, so constructors must not be inserted where they shift existing tags. #8754 then inserted Pjsx among the non-constant constructors and changed Pjs_call. Rebuilds after a compiler change probably make this harmless, but the comment and the practice disagree: either the comment overstates the constraint, or the constraint was broken.

Possible cause (speculation only)

A guess: each PR updated the code paths it changed and their tests, while comments elsewhere that describe the same mechanism were not searched for.

Vorherrschende Sprache
OCaml
Sterne
7.5k
Forks
484
Ø Merge
19 Std. 46 Min.
Gemergte PRs (30 T.)
81

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 Compilers

Neue Issues direkt in Ihr Postfach

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