Success with ASDF 3.3.5 \o/
- ( cd ~/common-lisp/ && wget https://asdf.common-lisp.dev/archives/asdf-3.3.5.tar.gz && tar -xvf asdf-3.3.5.tar.gz && mv asdf-3.3.5 asdf )
Looks like I managed the upgrade with a tarball:
- ( cd ~/common-lisp/ && wget https://asdf.common-lisp.dev/archives/asdf-3.3.4.tar.gz && tar -xvf asdf-3.3.4.tar.gz && mv asdf-3.3.4 asdf )
- echo "Content of ~/common-lisp/asdf/:" && ls ~/common-lisp/asdf/
I see:
------- ASDF version: 3.3.4
------- UIOP version: 3.3.4
but still
; unrecognized define-package keyword :LOCAL-NICKNAMES
:/
Trying to upgrade ASDF in a before_script
:
before_script:
- mkdir -p ~/common-lisp/asdf/
- ( cd ~/common-lisp/asdf/ && wget https://asdf.common-lisp.dev/archives/asdf-3.3.5.lisp && mv asdf-3.3.5.lisp asdf.lisp )
plus I have (require "asdf")
on top of my .asd,
but it isn't enough I'm still getting the older version.
Hi,
I defined a package with uiop:define-package
that contains :local-nicknames
. The build (Gitlab CI) fails:
caught ERROR: ; (during macroexpansion of (UIOP/PACKAGE:DEFINE-PACKAGE BOOKSHOPS.MODELS ...)) ; unrecognized define-package keyword :LOCAL-NICKNAMES
It turns out the ASDF version shipped in this image (SBCL 2.2.4, image: clfoundation/sbcl
) is 3.3.1, which dates from 2017. My local version at "3.3.4.15" works as expected.
What can we do about this, update ASDF in the image?
Best,
package definition:
(uiop:define-package bookshops/web
(:use :cl)
(:import-from :easy-routes
:defroute)
(:local-nicknames (#:utils #:bookshops.utils)
(#:a #:alexandria)))
Thank you for the explanations and hints.
I think it is documented on the Docker Hub info page.
indeed. Well, take my input as a customer feedback: I wanted to use this image and use Quicklisp, I didn't find how at first sight and I contacted support. If you make it more explicit in the doc you might be less distracted by questions :D
But the two documents are different: on the Docker Hub you explain what the images are (and mention QL in the end), on the Cookbook you explain how to use them, with a Gitlab CI example. Maybe just add a subsection "Using Quicklisp" so it appears in the TOC or mention the available variables earlier?
What's the best practice to use Quicklisp with this Docker image anyways?
Thanks for the hints. I might come back later… (yes I was talking about building another image from this one, but any pro tip is appreciated).
(feel free to close)
Thanks! (incf *dev-comfort*)
.
You explained much of this in the Cookbook: https://lispcookbook.github.io/cl-cookbook/testing.html#gitlab-ci
Hi,
I followed your usage instructions (https://hub.docker.com/r/clfoundation/sbcl).
But my lisp file that runs the application (./your-daemon-or-script.lisp) expects quicklisp (ql
) to be available.
On my machine, my .sbclrc loads it if it finds it:
;;; The following lines added by ql:add-to-init-file:
#-quicklisp
(let ((quicklisp-init (merge-pathnames "quicklisp/setup.lisp"
(user-homedir-pathname))))
(when (probe-file quicklisp-init)
(load quicklisp-init)))
However
there is no home directory in the docker image
I found the /usr/local/bin/install-quicklisp
shell script to install Quicklisp
the script uses /usr/local/share/common-lisp/source/quicklisp/quicklisp.lisp
and I see no setup.lisp
the script uses an environment variable ($QUICKLISP_ADD_TO_INIT_FILE) that must be set to "true" to "add-to-init-file". So the command that does it is:
QUICKLISP_ADD_TO_INIT_FILE=true /usr/local/bin/install-quicklisp
SO, it seems that the one Dockerfile command required to enable Quicklisp is:
RUN QUICKLISP_ADD_TO_INIT_FILE=true /usr/local/bin/install-quicklisp
What's the best practice to use Quicklisp with this Docker image anyways?
Would it be possible to declare Quicklisp dependencies inside the Dockerfile, to speed up the start up process (hopefully)?
TLDR; more doc about this is welcome :]
Thanks!
Hi,
When testing things out in SBCL in the Docker image, it can be handy to have rlwrap available, otherwise the lack of it can be frustrating.
Best,