1
votes

I am learning ASDF but encountered strange issue when do loading the defined system. Here are some information. i defined a .asd file named "hello.asd" with a single line content:

(asdf:defsystem :hellosystem)

and i put this file into a directory called "/tmp/pkg". After that, i run SBCL and try to load it. Here is the output:

This is SBCL 1.1.12, an implementation of ANSI Common Lisp.
More information about SBCL is available at <http://www.sbcl.org/>.

SBCL is free software, provided as is, with absolutely no warranty.
It is mostly in the public domain; some portions are provided under
BSD-style licenses.  See the CREDITS and COPYING files in the
distribution for more information.
* (asdf:asdf-version)

"3.0.2"
* (push #P"/tmp/pkg/" asdf:*central-registry*)

(#P"/tmp/pkg/" #P"/Users/wuli2/quicklisp/quicklisp/")
* (asdf:load-system :hellosystem)

debugger invoked on a ASDF/FIND-SYSTEM:MISSING-COMPONENT:
  Component :HELLOSYSTEM not found

Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.

restarts (invokable by number or by possibly-abbreviated name):
  0: [ABORT] Exit debugger, returning to top level.

((:METHOD ASDF/OPERATE:OPERATE (SYMBOL T)) ASDF/LISP-ACTION:LOAD-OP :HELLOSYSTEM) [fast-method]
0] 0

* (asdf:load-system :hello)

debugger invoked on a ASDF/FIND-SYSTEM:MISSING-COMPONENT:
  Component :HELLO not found

Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.

restarts (invokable by number or by possibly-abbreviated name):
  0: [ABORT] Exit debugger, returning to top level.

((:METHOD ASDF/OPERATE:OPERATE (SYMBOL T)) ASDF/LISP-ACTION:LOAD-OP :HELLO) [fast-method]
0] 0

* (asdf:load-system :hellosystem)

T
* 

Please be noted, the first time i tried to load system :hellosystem, it failed. So i load the system :hello, i gussed maybe it need a filename, it failed again. The weired thing happened when i occasionally run load system :hellosystem again, it worked.

So i made another test, change the file name to let it same as system name. Then run asdf:load-system, it worked directly.

It confused me very much, i cannot find any clue in ASDF manual that the two names should be identical?

Could somebody give me some insight on it?

Thanks,

Wu

1

1 Answers

3
votes

I found this clue: "Note the name of a system is specified as a string or a symbol, typically a keyword. If a symbol (including a keyword), its name is taken and lowercased. The name must be a suitable value for the :name initarg to make-pathname in whatever filesystem the system is to be found."

http://common-lisp.net/project/asdf/asdf/Using-ASDF.html

The message is that an (asdf:defsystem <symbol> ...) form should reside in a file called <lowercased-symbol>.asd. If you name the system with a string, the file name should use that string.