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

Nondeterministic codegen: Next.js app-page-turbo.runtime.prod.js and server.js objects differ between identical compiles

Aperta
#12,693 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
45/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
javascript, rust, typescript

Direzione di ricerca

Start with the cpar lane’s full.sh setup and reproduce by compiling the Next.js standalone server twice with PERRY_NO_AUTO_OPTIMIZE=1, then compare per-module objects. Trace id or symbol-suffix assignment during lowering or codegen for app-page-turbo.runtime.prod.js and server.js; the issue does not name the responsible source file or test location. Done means identical inputs produce byte-identical objects across runs and a fixture test verifies this.

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

Descrizione

bug

Found by the cpar lane (compile parallelism) while checking byte-identity.

Compiling the same Next.js standalone input three times on the same base (b3fed79c8a lineage, before the scheduler change) gives different module objects for app-page-turbo.runtime.prod.js and server.js. Every other module (762 of 764) is byte-identical across runs. The diff shows wrapper and object-method numbering that changes between runs. That points to iteration over an unordered container (e.g. a HashMap/HashSet) when ids or symbol suffixes are assigned during lowering or codegen for those modules.

Why it matters: object caching and A/B measurement both assume that the same input gives the same bytes.

Repro: compile the Next standalone server (env as in the nextrun lane's full.sh) twice with PERRY_NO_AUTO_OPTIMIZE=1, then md5 the per-module objects. Fix: give the id/suffix assignment a deterministic order (source order, or a sort by a stable key), then add a test that compiles a fixture twice and compares the objects.

Lingua principale
Rust
Stelle
4.9k
Fork
166
Merge medio
2h 19m
PR unite (30g)
914

Preparare l'ambiente

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 PerryTS/perry

Tutte le issue di PerryTS/perry

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.