Repository navigation
[Demo, not for merge] Solid TSX frontend checked by ReactiveScript - #21
Draft
devagrawal09 wants to merge 1 commit into
Draft
devagrawal09 wants to merge 1 commit into
devagrawal09 wants to merge 1 commit into
Conversation
An Oxc TSX frontend that lowers authored Solid 2 TSX onto ref/'s existing Program and checker, with no shared AST changes. It is added as tsx-frontend/ on top of aa85cbd; nothing outside that directory changes. npm run verify:subset (21 tests) checks the typecheck, pin/adapter boundary contracts, a paired counter, component composition, and an issue-tracker demo (tsx/fixtures/demo/tracker.{tsx,rx}): equal canonical checker facts with handwritten RX, and identical frames from native Solid, the RX compiler and the RX interpreter, including an explicit generator action with optimistic claim, commit and rollback. Ordinary async callbacks are refused for now pending ryansolid#20. This is a subset demo, not a parity claim: the full suite still has failures, classified in tsx-frontend/docs/RESULTS.md (measured out of tree). See tsx-frontend/README.md, Running it.
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.
Authors write ordinary Solid 2 TSX. A frontend lowers it into the existing RX AST, and the RX checker, interpreter and compiler run on it unchanged. Accepted TSX must behave exactly as native Solid; anything RX would interpret differently is refused, never silently rewritten.
Example: an issue tracker
A store, a filter, derived memos,
Show/For, a child component with a callback prop, and an optimistic action with rollback:The same component, handwritten in RX
tsx/demo.test.tschecks that:modein the RX shows up as a difference;Known rough edges: rows are written by position (
list[id - 1]) because the frontend doesn't passForindexes yet; the optimistic value is the claimed id rather than a per-row assignee; and the script never retries an issue, because a repeated request with the same arguments reuses the earlier rejected answer.Refusing instead of changing the meaning
An
asynccallback is refused atasync(#20). In Solid, a write before theawaittakes effect immediately; RX would infer an action that holds it. The diagnostic suggestsaction(function* () { … yield … })and says plainly that this opts into held writes. PlaincreateEffect, object-valuedcreateSignal, and a signal namedfilter(which shadows a built-in) are refused the same way.What it unlocks
.tsxand.rxmodules already import each other..rxvs React. Is it the checks or the syntax that drives correctness?STALE_WRITE_BACKwould catch the same bug in plain TSX.Status
npm run verify:subset: 21/21 (tracker, counter, composition, boundary contracts)patches/0001, not applied here); failures classified indocs/RESULTS.mdtsx/rx/imports RX internals; no AST, syntax or inference changes; pinned toaa85cbdSetup and commands:
tsx-frontend/README.md→ Running it.Questions