advent-of-code-2023

My solutions to AoC 2023
git clone git://git.entf.net/advent-of-code-2023
Log | Files | Refs

commit 751ebe7c2c2e21ce1e7fed21ff71bab45f22ba9b
parent b8f65320ed3b18ed6ac4209a0bbd1a86948db907
Author: Lukas Henkel <lh@entf.net>
Date:   Sat,  2 Dec 2023 07:21:34 +0100

Quickload day systems

Diffstat:
Mbuild.lisp | 8++++----
Mt/all.lisp | 14++++++--------
2 files changed, 10 insertions(+), 12 deletions(-)

diff --git a/build.lisp b/build.lisp @@ -13,10 +13,10 @@ exec sbcl --script "build.lisp" (ql:quickload :aoc) (loop for day from 1 to 25 - do (handler-case - (asdf:load-system (format nil "aoc/day-~A" day)) - (asdf:missing-component (c) - (declare (ignore c))))) + for system-name = (format nil "aoc/day-~A" day) + for system = (asdf:find-system system-name nil) + when system + do (ql:quickload system-name)) (sb-ext:save-lisp-and-die "aoc" :toplevel #'aoc:main :executable t) diff --git a/t/all.lisp b/t/all.lisp @@ -11,16 +11,14 @@ (run-tests :package (format nil "AOC-TEST/DAY-~A" day) :run-contexts 'with-summary-context)) -;; TODO: the asdf:load-system might not be so great here +;; TODO: the recursive asdf/ql stuff might not be so great here (defun test-all () (run-tests :tests (nconc (get-tests :package '#:aoc-test/utils) (loop for day from 1 to 25 - for system = (format nil "aoc-test/day-~A" day) - nconc (handler-case - (progn - (asdf:load-system system) - (get-tests :package (string-upcase system))) - (asdf:missing-component (c) - (declare (ignore c)))))) + for system-name = (format nil "aoc-test/day-~A" day) + for system = (asdf:find-system system-name nil) + when system + do (ql:quickload system-name) + and nconc (get-tests :package (string-upcase system-name)))) :run-contexts 'with-summary-context))