From 2d3227aaf16144407b695626b2517d9220862634 Mon Sep 17 00:00:00 2001 From: Hermes Date: Mon, 11 May 2026 15:27:55 +0000 Subject: [PATCH] review fixes: version bump, keyword check, warning assertion MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes from subagent review: - ASDF version 0.3.0 → 0.4.0 - define-preset now checks (check-type name keyword) at macro-expand time - load-preset-unknown-warns test now uses (signals warning ...) to actually verify the warning fires (was false-positive before) --- cl-tui.asd | 2 +- src/components/theme-tests.lisp | 2 +- src/components/theme.lisp | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/cl-tui.asd b/cl-tui.asd index 86b7784..38b5a9a 100644 --- a/cl-tui.asd +++ b/cl-tui.asd @@ -2,7 +2,7 @@ (asdf:defsystem :cl-tui :description "Reusable Common Lisp Terminal UI Framework" :author "Amr Gharbeia" - :version "0.3.0" + :version "0.4.0" :license "TBD" :depends-on (:fiveam) :components diff --git a/src/components/theme-tests.lisp b/src/components/theme-tests.lisp index b342719..da0f669 100644 --- a/src/components/theme-tests.lisp +++ b/src/components/theme-tests.lisp @@ -48,7 +48,7 @@ (test load-preset-unknown-warns "Unknown preset warns but doesn't error" (let ((th (make-theme))) - (load-preset th :nonexistent) + (signals warning (load-preset th :nonexistent)) (is (null (theme-color th :primary))))) (test preset-switch-mode diff --git a/src/components/theme.lisp b/src/components/theme.lisp index a2c3f45..487933a 100644 --- a/src/components/theme.lisp +++ b/src/components/theme.lisp @@ -22,6 +22,7 @@ (defmacro define-preset (name &key dark light) "Define a theme preset with DARK and LIGHT variants. NAME should be a keyword (e.g., :default, :nord)." + (check-type name keyword) `(setf (gethash ,name *presets*) '(:dark ,dark :light ,light))) (defun load-preset (theme preset-name)