Robust demo loading: check quickload failure, fall through to ASDF

The demo now guards the quickload with a (find-package :cl-tty.backend)
check first, tries ql:quickload inside ignore-errors, and falls through
to direct (load cl-tty.asd) + (asdf:load-system :cl-tty) if the
package still isn't loaded.  Works in --disable-debugger mode where
Quicklisp's SYSTEM-NOT-FOUND continuable error kills the process.
This commit is contained in:
Hermes
2026-05-12 01:20:28 +00:00
parent 149316cb58
commit bdd558407e

View File

@@ -7,16 +7,18 @@
(load "~/quicklisp/setup.lisp")
;; Register local project in case it's not symlinked into quicklisp/local-projects/
;; Register local project and load via ASDF directly
;; (avoids Quicklisp SYSTEM-NOT-FOUND in --disable-debugger mode)
(let ((cl-tty-path (truename ".")))
(pushnew cl-tty-path ql:*local-project-directories* :test #'equal))
(ql:register-local-projects)
(pushnew cl-tty-path ql:*local-project-directories* :test #'equal)
(ql:register-local-projects))
(ignore-errors (ql:quickload :cl-tty :silent t))
;; Fallback: load via asdf directly if quicklisp didn't find it
(unless (find-package :cl-tty.backend)
(load "cl-tty.asd")
(asdf:load-system :cl-tty))
(ignore-errors
(ql:quickload :cl-tty :silent t))
(unless (find-package :cl-tty.backend)
(load "cl-tty.asd")
(asdf:load-system :cl-tty)))
(use-package :cl-tty.backend)
(use-package :cl-tty.input)