fix: bypass ASDF compile for TUI load, use direct compile-file+load

This commit is contained in:
2026-05-13 14:53:27 -04:00
parent 4b60e8c544
commit 79896c5ffd
3 changed files with 626 additions and 561 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -381,13 +381,32 @@ case "$COMMAND" in
echo "Starting daemon first..."
$0 daemon
fi
exec sbcl \
--eval '(load (merge-pathnames "quicklisp/setup.lisp" (user-homedir-pathname)))' \
--eval '(declaim (optimize (debug 3) (speed 0) (safety 3)))' \
--eval "(push (truename \"$PASSEPARTOUT_DATA_DIR/\") asdf:*central-registry*)" \
--eval '(ql:quickload :passepartout/tui)' \
--eval '(in-package :passepartout)' \
--eval '(handler-bind ((error (lambda (c) (ignore-errors (with-open-file (f (merge-pathnames ".cache/passepartout/tui-crash.log" (user-homedir-pathname)) :direction :output :if-exists :supersede :if-does-not-exist :create) (format f "CRASH: ~a~%~%" c) (sb-debug:print-backtrace :count 50 :stream f) (finish-output f))) (format t "~%=== TUI CRASH ===~%CRASH: ~a~%" c) (format t "Full backtrace saved to ~~/.cache/passepartout/tui-crash.log~~%") (sleep 3) (finish-output) (uiop:quit 1)))) (passepartout.channel-tui:tui-main))'
# Build TUI load script with proper paths
cat > /tmp/tui-load.lisp << LISPEOF
(load (merge-pathnames "quicklisp/setup.lisp" (user-homedir-pathname)))
(declaim (optimize (debug 3) (speed 0) (safety 3)))
(push (truename "$PASSEPARTOUT_DATA_DIR/") asdf:*central-registry*)
(ql:quickload :cl-tty :silent t)
(ql:quickload :passepartout :silent t)
(let ((dir (pathname (format nil "~a/lisp/" (truename "$PASSEPARTOUT_DATA_DIR")))))
(dolist (f '("channel-tui-state" "channel-tui-view" "channel-tui-main"))
(let* ((src (merge-pathnames (format nil "~a.lisp" f) dir))
(fasl (merge-pathnames (format nil "~a.fasl" f) dir)))
(when (or (not (probe-file fasl))
(< (file-write-date fasl) (file-write-date src)))
(compile-file src :output-file fasl :verbose nil :print nil))
(load fasl :verbose nil :print nil))))
(in-package :passepartout)
(handler-bind ((error (lambda (c) (ignore-errors
(with-open-file (f (merge-pathnames ".cache/passepartout/tui-crash.log" (user-homedir-pathname))
:direction :output :if-exists :supersede :if-does-not-exist :create)
(format f "CRASH: ~a~%~%" c) (sb-debug:print-backtrace :count 50 :stream f) (finish-output f)))
(format t "~%=== TUI CRASH ===~%CRASH: ~a~%" c)
(format t "Full backtrace saved to ~/.cache/passepartout/tui-crash.log~%")
(sleep 3) (finish-output) (uiop:quit 1))))
(passepartout.channel-tui:tui-main))
LISPEOF
exec sbcl --noinform --load /tmp/tui-load.lisp
;;
gateway)
SUBCMD=$1; PLATFORM=$2; TOKEN=$3