I built a binary, I run it on the server and I get:
;; Error while trying to load definition for system asdf from pathname
;; /home/vince/common-lisp/asdf/asdf.asd:
;; couldn't load #P"/home/vince/common-lisp/asdf/asdf.asd": file does not exist.
So yes, the common-lisp/ directory doesn’t exist.
How do I tell ASDF to shut up and do nothing?
A (uncomplete) solution with Deploy
I had found a workaround previously thanks to Shinmera, his Deploy project or was it when speaking about his Kandria game. This did it at the time:
;; project.asd
(deploy:define-hook (:deploy asdf) (directory)
(declare (ignorable directory))
#+asdf (asdf:clear-source-registry)
#+asdf (defun asdf:upgrade-asdf () NIL))
However using those two lines in the .asd
#+asdf (asdf:clear-source-registry)
#+asdf (defun asdf:upgrade-asdf () nil)
isn’t enough and brings other errors:
There is no applicable method for the generic function
#<STANDARD-GENERIC-FUNCTION QL-DIST:INSTALLEDP (3)>
when called with arguments (NIL)
The Deploy hook has the same result in this case.
Investigation…
I still think ASDF shouldn’t fail and exit, but something (my code or a dependency) is asking it something unusual.
Create common-lisp/
$ mkdir common-lisp
$ ( 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 )
but now:
ASDF/PARSE-DEFSYSTEM:COMPUTE-COMPONENT-CHILDREN
already names an ordinary function or a macro.
I’m sure running from sources will work, but that wasn’t the goal either.
0
What the ASDF error was hiding is that cl-dbi
, one of my dependencies, tries to install dependencies on the fly, by calling ql-dist:ensure-installed
, if :quicklisp
is in *features*
, which I removed (or rather, delete
d), to see a more meaningful error:
Component :DBD-SQLITE3 not found
Solution (but not an answer): pin the missing dependency
In the .asd I was missing:
:depends-on (:dbd-sqlite3 […])
It’s that simple :/
We don’t mess with #'asdf
config here.
but… ASDF’s error?
I wasn’t able to prevent ASDF from failing, in order to see the more important error message.
1