Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Stale comments after the dict and JSX representation changes

Chiusa
#8,767 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
Mezza giornata
Idoneità per principianti
55/100
Tipo di issue
Documentazione
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
javascript, ocaml
Ambito
compilers

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
OCaml
Stelle
7.5k
Fork
484
Merge medio
19h 20m
PR unite (30g)
96

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di rescript-lang/rescript

Tutte le issue di rescript-lang/rescript

Issue simili

Altre issue su Compilers

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.