Issue building executables
The instructions on https://lispcookbook.github.io/cl-cookbook/scripting.html use sbcl --load file.asd ... on at least two occasions. When I tried that, I got warnings and errors which implied that ASDF wasn't loaded, e.g. an error saying that ((:file "src/foo")) (the value of :components) is an illegal function call, and an error saying that defsystem is an undefined function.
To make it work, I had to add --eval "(progn (require :asdf) (in-package :asdf-user))" before the --load. Could anyone recommend a better solution? If there isn't one, should I make a PR correcting these commands?
and the recipe doesn't show the .asd content, so that leads to issues.
I reckon I got used to add (require "asdf") at the top of my .asd and I also write (asdf:defsystem (and not defsystem alone). How's your .asd ?
Clarifications and checking best practices will be welcome.
AFAIR when you try to load an ASD file, then the prerequisites are that:
- ASDF must be already loaded,
- the current package is either
asdf-useror any other package that uses bothclandasdf.
In other words, all ASD files are supposed to be loaded from a package that uses asdf - therefore (asdf:defsystem ...) and toplevel (require "asdf") are both superfluous.