Closed
Description
#63 fixes #51 by merging each answer of a keyed source that takes a guess into its createOptimisticStore draft by key (landDraft in ref/compile/rt.ts, rt-web.ts, rt-server.ts, ref/oracle/lower.ts, marked TODO(Solid rc.22)). The cleaner fix is to return the keyed answer from the derive and let Solid reconcile it against the optimistic view, which is the path Solid designed for this.
That path can't ship yet. On the published 2.0.0-rc.21 (and our pin 2105ffb), it throws inside Solid, in both dev and prod. It broke S-store-7 in the compiled runner. Minimal repro:
const [rows] = createStore(async () => await answer, []);
const titles = createMemo(() => latest(() => rows.map(r => r.title).join(",")));
createRenderEffect(titles, v => console.log(v));
// answer resolves to [{ id: 1, title: "A" }]
// → TypeError: Cannot read properties of undefined (reading '_x') in holdStagingSolid next already fixes this (it prints A at dba2aad: holdStaging handles a store key's node-less staging), so no Solid issue is needed.
When rc.22 is published:
-
sh ref/scripts/solid-next.sh --latest(or pin the rc.22 commit) and rebuild - runtime:
@solidjs/signals,@solidjs/web,solid-jsto^2.0.0-rc.22(dependencies + devDependencies) - replace
landDraft's keyed merge with returning the answer, keepingassignDraftfor unkeyed answers (an unkeyed{}seed has not been tried with the return path) - all runners green (interpreter, compiled, oracle, ssr, types),
S-store-7andS-affects-keyedin particular
Metadata
Metadata
Assignees
Labels
No labels
Activity
Repin Solid to 2.0.0-rc.22: keyed answers returned for Solid to recon…