Revert WIP hydration commit — undefined hydrate-start!/stop! broke all islands

The WIP commit (0044f17e) added calls to hydrate-start!, hydrate-stop!,
hydrate-push!, hydrate-pop!, and hydrate-next-*! — none of which were
ever defined. This crashed hydrate-island silently (cek-try swallowed
the error), preventing event listener attachment on every island.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-10 11:21:57 +00:00
parent 0044f17e4c
commit 89ffb02b20
6 changed files with 2568 additions and 2680 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@@ -55,8 +55,6 @@
(dom-append-to-head el)))))
els))))
(define *hydrating* false)
(define
sx-mount
:effects (mutation io)
@@ -331,14 +329,9 @@
p
(if (dict-has? kwargs p) (dict-get kwargs p) nil)))
(component-params comp))
(do
(hydrate-start! el)
(log-info " hydrate-start done")
(with-island-scope
(fn (disposable) (append! disposers disposable))
(fn () (render-to-dom (component-body comp) local nil)))
(log-info " render-to-dom done")
(hydrate-stop!)
(let
((body-dom (cek-try (fn () (with-island-scope (fn (disposable) (append! disposers disposable)) (fn () (render-to-dom (component-body comp) local nil)))) (fn (err) (log-warn (str "hydrate-island FAILED: " comp-name " — " err)) (let ((error-el (dom-create-element "div" nil))) (dom-set-attr error-el "class" "sx-island-error") (dom-set-attr error-el "style" "padding:8px;margin:4px 0;border:1px solid #ef4444;border-radius:4px;background:#fef2f2;color:#b91c1c;font-family:monospace;font-size:12px;white-space:pre-wrap") (dom-set-text-content error-el (str "Island error: " comp-name "\n" err)) error-el)))))
(host-call el "replaceChildren" body-dom)
(dom-set-data el "sx-disposers" disposers)
(set-timeout (fn () (process-elements el)) 0)
(log-info

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

View File

@@ -55,8 +55,6 @@
(dom-append-to-head el)))))
els))))
(define *hydrating* false)
(define
sx-mount
:effects (mutation io)
@@ -331,14 +329,9 @@
p
(if (dict-has? kwargs p) (dict-get kwargs p) nil)))
(component-params comp))
(do
(hydrate-start! el)
(log-info " hydrate-start done")
(with-island-scope
(fn (disposable) (append! disposers disposable))
(fn () (render-to-dom (component-body comp) local nil)))
(log-info " render-to-dom done")
(hydrate-stop!)
(let
((body-dom (cek-try (fn () (with-island-scope (fn (disposable) (append! disposers disposable)) (fn () (render-to-dom (component-body comp) local nil)))) (fn (err) (log-warn (str "hydrate-island FAILED: " comp-name " — " err)) (let ((error-el (dom-create-element "div" nil))) (dom-set-attr error-el "class" "sx-island-error") (dom-set-attr error-el "style" "padding:8px;margin:4px 0;border:1px solid #ef4444;border-radius:4px;background:#fef2f2;color:#b91c1c;font-family:monospace;font-size:12px;white-space:pre-wrap") (dom-set-text-content error-el (str "Island error: " comp-name "\n" err)) error-el)))))
(host-call el "replaceChildren" body-dom)
(dom-set-data el "sx-disposers" disposers)
(set-timeout (fn () (process-elements el)) 0)
(log-info