Revert do→let/it chaining (caused 80-test regression)

The let/it wrapping changed semantics of ALL multi-command sequences,
breaking independent side-effect chains like (do (add-class) (add-class)).
Need a targeted approach — chain it only for then-separated commands.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-17 23:01:23 +00:00
parent 0410812420
commit db8e680caf
2 changed files with 2 additions and 34 deletions

View File

@@ -999,23 +999,7 @@
(hs-to-sx (nth ast 1))
(hs-to-sx (nth ast 2)))))
((= head (quote do))
(let
((compiled (map hs-to-sx (rest ast))))
(if
(= (len compiled) 1)
(first compiled)
(let
((last-cmd (nth compiled (- (len compiled) 1)))
(init-cmds (reverse (rest (reverse compiled)))))
(reduce
(fn
(body cmd)
(list
(quote let)
(list (list (quote it) cmd))
body))
last-cmd
(reverse init-cmds))))))
(cons (quote do) (map hs-to-sx (rest ast))))
((= head (quote wait)) (list (quote hs-wait) (nth ast 1)))
((= head (quote wait-for)) (emit-wait-for ast))
((= head (quote log))

View File

@@ -999,23 +999,7 @@
(hs-to-sx (nth ast 1))
(hs-to-sx (nth ast 2)))))
((= head (quote do))
(let
((compiled (map hs-to-sx (rest ast))))
(if
(= (len compiled) 1)
(first compiled)
(let
((last-cmd (nth compiled (- (len compiled) 1)))
(init-cmds (reverse (rest (reverse compiled)))))
(reduce
(fn
(body cmd)
(list
(quote let)
(list (list (quote it) cmd))
body))
last-cmd
(reverse init-cmds))))))
(cons (quote do) (map hs-to-sx (rest ast))))
((= head (quote wait)) (list (quote hs-wait) (nth ast 1)))
((= head (quote wait-for)) (emit-wait-for ast))
((= head (quote log))