App builds call the harness's `__rt.reg` for every binding; the registry is never pruned and grows with each mount (CP-4c)
Les mainteneurs répondent en général sous 1 jour
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 54/100
- Type d'issue
- Bug
- Clarté
- Clairement spécifiée
- Activité
- Active
- Stack technique
- typescript
- Domaine
- build-system
Piste de recherche
Start with spec/11-compiler.md CP-4c and trace compile_linked and the reg emission sites in compiler/src/emit.rs; compare how app builds and conformance builds are selected. Then inspect ref/compile/rt-web.ts and the Vite plugin’s app path. Done means app builds no longer emit harness registry calls, with conformance builds retaining them as specified.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
Every module app() compiles (the Vite front end, rxc app) calls the conformance harness's __rt.reg(name, …) for every binding. The runtime's reg appends to a registry that nothing ever removes from, so an app that keeps mounting components grows that registry without bound.
Versions: @reactivescript/compiler, @reactivescript/runtime 0.3.1; solid-js / @solidjs/web 2.0.0-rc.21; @solidjs/vite-plugin 3.0.0-next.57.
Repro
main.rx:
component Row({ label }: { label: string }) {
upper = label + "!"
<li>{upper}</li>
}
export default component App() {
source items := ["a", "b", "c"]
<ul>{for item in items { <Row label={item} /> }}</ul>
}
Compiled with app("main.rx", "dom"), Row contains:
__rt.reg("label", { get: v$label });
__rt.reg("upper", { get: v$upper });
Mounting it with createApp from @reactivescript/runtime/web, counting calls to app.reg, and replacing items with three new strings 1000 times (app.dset("items", [], [...]) then flush()):
after mount: rows 3 reg calls 7
after 1000 replacements: rows 3 reg calls 6007
The DOM holds three rows at the end, but the registry holds 6007 entries. Each entry keeps the disposed rows' accessors (and through them their nodes) reachable for the life of the app.
Expected
spec/11-compiler.md CP-4c: reg, lookup, dget, dset, api, jsError, B.fetch/B.fail, … are the harness's, and "Compiled code calls them only in a conformance build — the compiler's option for running scenarios/". The app build (app(), the product path the Vite plugin uses) should not emit __rt.reg, or the module-level reg for imports. If a registry stays in the runtime for some other reason, an entry should be removed when its owner is disposed.
Cause
- The crate has no conformance switch.
compile_linked(compiler/src/emit.rs:194) takes onlyby_source, and theregstatements are emitted unconditionally:compiler/src/emit.rs:696,:739,:761, andfn regat:893-899, which every source, equation and prop goes through. ref/compile/rt-web.ts:154(publisheddist/web.jsreg) only ever doesl.push(e). There is noonCleanupand no removal.
Related: #74 is another case of harness-only code (the scenario prelude __B.*) reaching app builds.
- Langage dominant
- TypeScript
- Étoiles
- 127
- Forks
- 7
- Merge moyen
- 15 h 42 min
- PR mergées (30 j)
- 63
Préparer son environnement
- Aucun Dockerfile ni fichier Docker Compose
- Aucun modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de solidjs/reactivescript
-
Difficulté 2/5 1-3 heures Accessibilité débutants 84/100
solidjs/reactivescript#96 ·
Les mainteneurs répondent en général sous 1 jour
-
Vite front end keeps serving a failed build after the missing/broken imported module is fixedPeut-être pris @cgaaf l’a pris il y a 1 jour. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 77/100
solidjs/reactivescript#84 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
solidjs/reactivescript#77 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
solidjs/reactivescript#74 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 3/5 1-2 jours Accessibilité débutants 62/100
solidjs/reactivescript#97 ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de solidjs/reactivescript
Issues similaires
-
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
GetStream/stream-chat-react#3467 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
vercel-labs/ui#1139 ·
Les mainteneurs répondent en général sous 1 jour
-
generate_image reference URL guard lets through IPv4-mapped IPv6 hosts and 100.64.0.0/10Peut-être pris @goranai l’a pris aujourd’hui. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
Les mainteneurs répondent en général sous 1 jour
-
[Bug] IntegerRange.contains counts a non-integer just above max as inside an inclusive rangeOuvertebot:ai-assisted component:platform-js status:untriaged
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
midnightntwrk/platform-js#93 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 66/100