Repository navigation
Add the ReactiveScript map and dev hot replacement - #100
Draft
devagrawal09 wants to merge 37 commits into
Draft
devagrawal09 wants to merge 37 commits into
devagrawal09 wants to merge 37 commits into
Conversation
… its line. `e as T` is TypeScript's assertion: erased where the program runs, kept in the projection. A statement-bodied arrow that fails to parse is no longer re-read as a record, which blamed the handler's `let` with JS_LOCAL.
`source open := false` is already a boolean. Inside `{if open}` the read is `true`, and `open := false` was checked against that. The projection keeps the slot's type and checks the write against it.
The projection checks the import against the declaration, so a ref parameter or result is that type and not the accessor the implementation is written with. The compiled import is unchanged.
The read happens when the handler runs, and the branch may no longer hold. Snapshot into a local and narrow that. A check inside the handler still narrows its own snapshot.
…s an error. CSS-2 already scopes a stylesheet to its own view, so Row stayed unstyled with no warning. STYLE_SCOPE names the other component and the fix: its own style, or a class map.
…has none. n++ in a handler was reported as a generic parse error once the statement reading won outright. The expression reading's ASSIGNMENT hint is kept, and JS_LOCAL from re-reading the body as a record is not.
NoteList's stylesheet does not reach Row (CSS-2). .when and td were pruned; they belong on Row.
…eeps the value. `out := s as Status` evaluated to undefined: the oracle's expression walk had no case for `as`. The checker walks through it too, so the read is still the operand.
…rt type. The projection aliases the other declare namespace, not the sibling .ts.
The model marks that region shadowed by the inner one, so the map can draw it.
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
yumemi-thomas
added a commit
to yumemi-thomas/reactivescript
that referenced
this pull request
Nov 28, 2026
…s#99 (stable dev declaration keys) and solidjs#100 (the map and keyed dev hot replacement), both by devagrawal09, weighed idea by idea without waiting for them to land (DEV-6: 22 ideas ranked by value to a .rx developer against cost, each taken, adapted, deferred or rejected with its reason), and the ones taken written as rules on this branch's design: a development build is the browser's build under the dev server and differs from the production lowering by one thing, each source's creating call under `__rt.key(key, shape, …)` (DEV-1); a key is `<module>|<scope>|<name>[#n]` and its shape a hash of the declaration's AST, from both emitters, not the model (DEV-2); the entry is a hot boundary that re-runs the program under a transparent memo and carries each live source whose shape is unchanged, resetting (and saying so) an edited declaration, a key of several instances and a question with no answer, with no rename or move heuristics and no module kept alive across the swap (DEV-3); a development client hydrates the production server's output, nothing added taking a hydration id (DEV-4); production output unchanged (DEV-5). What waits on Solid #5089 (`openView`: travel, map-observed replacement) and the map itself are next steps (DEV-7). solidjs#98's rules this branch declined are not taken through either PR. spec-refs knows the DEV- prefix. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
yumemi-thomas
added a commit
to yumemi-thomas/reactivescript
that referenced
this pull request
Nov 28, 2026
…keeps its state — every save reloaded the page, losing what it held and asking every question again. The front end makes a development build's entry a hot boundary (`export default hot(main, import.meta.hot)`, `import.meta.hot.accept()`, the source map's lines kept): one function for every version of the module, mounting the program under a `transparent` memo (no hydration id of its own) that reads which version is current. A replacement re-runs the whole program in every app it is mounted in, the app's module instances made inside it dropped first (a host-rooted library instance is kept); while it runs, each source created under a key with an unchanged shape starts from the value the live source had (a store's as Solid's snapshot), and an atomic question shows its carried answer while it asks again. An edited declaration, a key with several live instances (no instance identity survives a re-run; pairing by order would hand one row's state to another) and a question with no answer start fresh, and the console says so once per replacement; a key that is gone is not reported. A program that fails as it runs (its memo fails, which Solid hands to readers rather than to flush) reloads the page. The runtime's development half is ref/compile/rt-dev.ts (`key`, the carry, `hot`), behind Solid's `DEV`; `hot` is its own export. Keyed hot replacement planned from the compiler is solidjs#100's (devagrawal09), re-implemented without its text planner, rename heuristics, persistent module owners or deferred carry, and without Solid #5089. runtime/test.mjs *hot* (7 checks, no DOM: carry, reset, two instances, a question, a failure, the production build); compiler/test/vite-hot.mjs, a real dev server in Chromium (13 checks: view, handler and dependency edits keep state with no reload; a declaration's edit resets it and is named; a broken edit keeps the page and the next replaces it; a reload starts fresh; the production build has no key and no boundary). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #99; review only the last 3 commits:
e30e928Add the ReactiveScript map and keyed dev replacement7214d9dRebuild the map page from the split compiler and runtimeddc27bdCheck travel denial against stock SolidWhat and why
Builds on dev keys.
@reactivescript/mapshows the static program and a live view of changes. It includes an RX app for the map page, read-only MCP queries, layout and diffing, travel, and a fake host and conformance suite. The compiler plans keyed hot replacement; the map can observe it without owning it.Travel and map-observed HMR state carry-over require
openViewfrom solidjs/solid#5089. See also solidjs/solid#5198 and theopenViewdiscussion. On stock Solid 2.0, travel reportsunsupported; map-observed HMR reports that keyed replacement is unsupported and falls back to a full reload. Live inspection still works where dev attribution is available. Exact list travel requires the additional view fixes listed in the README.Compatibility
No intended changes to production lowering. The live map and HMR are dev-only. The view and some attribution details depend on experimental Solid APIs and are capability-checked.
Verification
RX_DEV=1runs.S-sf-1also passed in isolation in both modes.SOLID_VIEWRXCset; real-host view tests skippedSOLID_VIEWunsupportedand the app still respondsQuestions for Ryan