From 6b5dd7892d17b0cf4d21518104cc03ce5ee58b17 Mon Sep 17 00:00:00 2001 From: Tim Van den Langenbergh Date: Sun, 5 Jul 2026 10:11:55 +0200 Subject: [PATCH 1/4] Defer *quicklisp-home* existence check. Check whether *quicklisp-home* exists when we need its value. Defer the ASDF setup so *quicklisp-home* can be set to the right value beforehand. --- README.md | 9 +++++---- ql-setup.lisp | 48 +++++++++++++++++++++++++++++------------------- 2 files changed, 34 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index 4965084..da63ecf 100644 --- a/README.md +++ b/README.md @@ -40,11 +40,12 @@ now run the installer script: 4. Disconnect internet. (Prevent that anything leaks over HTTP during the installation) 5. Start a fresh REPL and (require 'asdf) 6. Load `~/common-lisp/ql-https/ql-setup.lisp` -7. Eval `(asdf:load-system "ql-https")` -8. Inspect `ql-http:*fetch-scheme-functions*` and verify everything was registered properly. Both `http` and +7. Run `(ql-setup:setup-asdf)` +8. Eval `(asdf:load-system "ql-https")` +9. Inspect `ql-http:*fetch-scheme-functions*` and verify everything was registered properly. Both `http` and `https` have `ql-https:fetcher` registered. -9. Connect internet. -10. Eval `(quicklisp:setup)` - use the USE-HTTPS restart if you hit the network. +10. Connect internet. +11. Eval `(quicklisp:setup)` - use the USE-HTTPS restart if you hit the network. Removing the *Missing client-info.sexp, using mock info* warning. diff --git a/ql-setup.lisp b/ql-setup.lisp index 66d44de..68af512 100644 --- a/ql-setup.lisp +++ b/ql-setup.lisp @@ -28,7 +28,8 @@ (:use #:cl) (:export #:*quicklisp-home* #:qmerge - #:qenough)) + #:qenough + #:setup-asdf)) (in-package #:ql-setup) @@ -36,14 +37,18 @@ (error "This file must be LOADed to set up quicklisp.")) (defvar *quicklisp-home* - (make-pathname :name nil :type nil - :defaults (let ((qlhome "~/quicklisp/")) - (if (probe-file qlhome) - qlhome - (error "Quicklisp not installed to - default location. Please set - *quicklisp-home* manually and - retry"))))) + "~/quicklisp/") + +(defun verify-quicklisp-home () + (assert (probe-file *quicklisp-home*) + (*quicklisp-home*) + "*quicklisp-home* points to a directory which doesn't exist: ~A + +Please set it to the location where Quicklisp is installed.~%" + *quicklisp-home*) + (make-pathname :name nil + :type nil + :defaults *quicklisp-home*)) (defun qmerge (pathname) "Return PATHNAME merged with the base Quicklisp directory." @@ -151,15 +156,20 @@ compiling asdf.lisp to a FASL and then loading it." ;;; ASDF. Thanks to Nikodemus Siivola for pointing out this issue. ;;; -(let ((asdf-init (probe-file (qmerge "asdf-config/init.lisp")))) - (when asdf-init - (with-simple-restart (skip "Skip loading ~S" asdf-init) - (load asdf-init :verbose nil :print nil)))) +(defun setup-asdf () + (let ((asdf-init (probe-file (qmerge "asdf-config/init.lisp")))) + (when asdf-init + (with-simple-restart (skip "Skip loading ~S" asdf-init) + (load asdf-init :verbose nil :print nil)))) + + (push (qmerge "quicklisp/") asdf:*central-registry*) -(push (qmerge "quicklisp/") asdf:*central-registry*) + (let ((*compile-print* nil) + (*compile-verbose* nil) + (*load-verbose* nil) + (*load-print* nil)) + (asdf:oos 'asdf:load-op "quicklisp" :verbose nil))) -(let ((*compile-print* nil) - (*compile-verbose* nil) - (*load-verbose* nil) - (*load-print* nil)) - (asdf:oos 'asdf:load-op "quicklisp" :verbose nil)) +(format t "Please ensure ql-setup:*quicklisp-home* is set (currently ~S), +and run (ql-setup:setup-asdf) before proceeding with the Quicklisp installation.~%" + *quicklisp-home*) From 2173dc63c2776be903bd03cee2e0ed434d4918d7 Mon Sep 17 00:00:00 2001 From: Tim Van den Langenbergh Date: Sun, 5 Jul 2026 10:18:34 +0200 Subject: [PATCH 2/4] Add ASDF set-up to STARTUP example in README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index da63ecf..a621882 100644 --- a/README.md +++ b/README.md @@ -63,6 +63,7 @@ Watch ASCIInema: (let ((quicklisp-init #p"~/common-lisp/ql-https/ql-setup.lisp")) (when (probe-file quicklisp-init) (load quicklisp-init) + (ql-setup:setup-asdf) (asdf:load-system "ql-https") (uiop:symbol-call :quicklisp :setup))) From 665cf35b349d4b82dc36a7fb65dc9fbfdd6d8a71 Mon Sep 17 00:00:00 2001 From: Tim Van den Langenbergh Date: Mon, 6 Jul 2026 15:03:45 +0200 Subject: [PATCH 3/4] Implement suggested changes. Remove new export to prevent SBCL from complaining about package variance. Move `(ensure-asdf-loaded)` into the `setup` function. Rename `setup-asdf` to `setup`. Remove `*quicklisp-home*` verification. Update documentation. --- README.md | 31 ++++++++++++++----------------- ql-setup.lisp | 24 ++++++++++++++---------- 2 files changed, 28 insertions(+), 27 deletions(-) diff --git a/README.md b/README.md index a621882..41ca56f 100644 --- a/README.md +++ b/README.md @@ -32,20 +32,16 @@ now run the installer script: ## MANUAL INSTALLATION -1. `mkdir ~/quicklisp` and `cd ~/quicklisp` -2. Go to and lookup `:client-tar` URL, download it, verify - hash and untar. -3. Clone ql-https from to - to `~/common-lisp/ql-https` -4. Disconnect internet. (Prevent that anything leaks over HTTP during the installation) -5. Start a fresh REPL and (require 'asdf) -6. Load `~/common-lisp/ql-https/ql-setup.lisp` -7. Run `(ql-setup:setup-asdf)` -8. Eval `(asdf:load-system "ql-https")` -9. Inspect `ql-http:*fetch-scheme-functions*` and verify everything was registered properly. Both `http` and - `https` have `ql-https:fetcher` registered. -10. Connect internet. -11. Eval `(quicklisp:setup)` - use the USE-HTTPS restart if you hit the network. +1. `mkdir ~/quicklisp` and `cd ~/quicklisp` +2. Go to and lookup `:client-tar` URL, download it, verify + hash and untar. +3. Clone ql-https from to + to `~/common-lisp/ql-https` +4. Start a fresh REPL and (require 'asdf) +5. Load `~/common-lisp/ql-https/ql-setup.lisp` +6. Eval `(uiop:symbol-call :ql-setup :setup)` +7. Eval `(asdf:load-system "ql-https")` +8. Eval `(quicklisp:setup)` - use the USE-HTTPS restart if you hit the network. Removing the *Missing client-info.sexp, using mock info* warning. @@ -63,9 +59,10 @@ Watch ASCIInema: (let ((quicklisp-init #p"~/common-lisp/ql-https/ql-setup.lisp")) (when (probe-file quicklisp-init) (load quicklisp-init) - (ql-setup:setup-asdf) - (asdf:load-system "ql-https") - (uiop:symbol-call :quicklisp :setup))) + (uiop:symbol-call :ql-setup :setup) + ;; Alternatively: (uiop:symbol-call :ql-setup :setup "/path/to/quicklisp/") + (asdf:load-system "ql-https") + (quicklisp:setup))) ;; optional #+ql-https diff --git a/ql-setup.lisp b/ql-setup.lisp index 68af512..6e87038 100644 --- a/ql-setup.lisp +++ b/ql-setup.lisp @@ -28,8 +28,7 @@ (:use #:cl) (:export #:*quicklisp-home* #:qmerge - #:qenough - #:setup-asdf)) + #:qenough)) (in-package #:ql-setup) @@ -37,7 +36,8 @@ (error "This file must be LOADed to set up quicklisp.")) (defvar *quicklisp-home* - "~/quicklisp/") + (merge-pathnames "quicklisp/" + (user-homedir-pathname))) (defun verify-quicklisp-home () (assert (probe-file *quicklisp-home*) @@ -146,8 +146,6 @@ compiling asdf.lisp to a FASL and then loading it." (try (load (compile-file source :verbose nil :output-file fasl)))) (error "Could not load ASDF ~S or newer" *required-asdf-version*)))))) -(ensure-asdf-loaded) - ;;; ;;; Quicklisp sometimes must upgrade ASDF. Ugrading ASDF will blow ;;; away existing ASDF methods, so e.g. FASL recompilation :around @@ -156,7 +154,17 @@ compiling asdf.lisp to a FASL and then loading it." ;;; ASDF. Thanks to Nikodemus Siivola for pointing out this issue. ;;; -(defun setup-asdf () +(defun setup (&optional quicklisp-home) + "Perform necessary set-up for the Quicklisp installation. + +If QUICKLISP-HOME is given, binds `*quicklisp-home*' to it." + (declare (type (or Null Pathname) quicklisp-home)) + + (when quicklisp-home + (setf *quicklisp-home* quicklisp-home)) + + (ensure-asdf-loaded) + (let ((asdf-init (probe-file (qmerge "asdf-config/init.lisp")))) (when asdf-init (with-simple-restart (skip "Skip loading ~S" asdf-init) @@ -169,7 +177,3 @@ compiling asdf.lisp to a FASL and then loading it." (*load-verbose* nil) (*load-print* nil)) (asdf:oos 'asdf:load-op "quicklisp" :verbose nil))) - -(format t "Please ensure ql-setup:*quicklisp-home* is set (currently ~S), -and run (ql-setup:setup-asdf) before proceeding with the Quicklisp installation.~%" - *quicklisp-home*) From cfc8dc0d965c085d05391a498646b95b8eea6d4d Mon Sep 17 00:00:00 2001 From: Tim Van den Langenbergh Date: Wed, 8 Jul 2026 23:09:31 +0200 Subject: [PATCH 4/4] Add Quicklisp setup to `setup` function. Load ql-https through ASDF and call the Quicklisp `setup` function. Update documentation for the new change. --- README.md | 6 +----- ql-setup.lisp | 16 ++++------------ 2 files changed, 5 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index 41ca56f..5a4433b 100644 --- a/README.md +++ b/README.md @@ -40,8 +40,6 @@ now run the installer script: 4. Start a fresh REPL and (require 'asdf) 5. Load `~/common-lisp/ql-https/ql-setup.lisp` 6. Eval `(uiop:symbol-call :ql-setup :setup)` -7. Eval `(asdf:load-system "ql-https")` -8. Eval `(quicklisp:setup)` - use the USE-HTTPS restart if you hit the network. Removing the *Missing client-info.sexp, using mock info* warning. @@ -59,10 +57,8 @@ Watch ASCIInema: (let ((quicklisp-init #p"~/common-lisp/ql-https/ql-setup.lisp")) (when (probe-file quicklisp-init) (load quicklisp-init) - (uiop:symbol-call :ql-setup :setup) ;; Alternatively: (uiop:symbol-call :ql-setup :setup "/path/to/quicklisp/") - (asdf:load-system "ql-https") - (quicklisp:setup))) + (uiop:symbol-call :ql-setup :setup))) ;; optional #+ql-https diff --git a/ql-setup.lisp b/ql-setup.lisp index 6e87038..80da194 100644 --- a/ql-setup.lisp +++ b/ql-setup.lisp @@ -39,17 +39,6 @@ (merge-pathnames "quicklisp/" (user-homedir-pathname))) -(defun verify-quicklisp-home () - (assert (probe-file *quicklisp-home*) - (*quicklisp-home*) - "*quicklisp-home* points to a directory which doesn't exist: ~A - -Please set it to the location where Quicklisp is installed.~%" - *quicklisp-home*) - (make-pathname :name nil - :type nil - :defaults *quicklisp-home*)) - (defun qmerge (pathname) "Return PATHNAME merged with the base Quicklisp directory." (merge-pathnames pathname *quicklisp-home*)) @@ -176,4 +165,7 @@ If QUICKLISP-HOME is given, binds `*quicklisp-home*' to it." (*compile-verbose* nil) (*load-verbose* nil) (*load-print* nil)) - (asdf:oos 'asdf:load-op "quicklisp" :verbose nil))) + (asdf:oos 'asdf:load-op "quicklisp" :verbose nil)) + + (asdf:load-system "ql-https") + (uiop:symbol-call :quicklisp :setup))