ASDF find-system returns nil for a camel case system name
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ASDF |
Invalid
|
Wishlist
|
Faré |
Bug Description
Hi,
I am using Quicklisp's quickload to load my Lisp project in MKCL and it was failing telling that the system is not defined. I checked all configuration parameters for ASDF and found they are as per the document. So I started further digging the issue and found that quickload uses asdf:find-system which internally down-case the system name within the function locate-system. Therefore it fails to locate the system though asdf/source-
I think this assumption of system name being always in lower case is a bad logic and hence a bug.
Another observation: although asdf:find-system was failing with camel case system name asdf:load-system was successful.
I am also attaching my REPL output with this bug report so please check it to see what I have done.
Thanks and regards
Santanu
ASDF is working as designed. If you want CamelCase, you need to use a string, not a symbol, as in (asdf:load-system "RE-tools"). Note that the defsystem needs to also use a string, as well as all references to the system.
The reasons why this is are many: many "modern" common lisp implementations have a case-preserving reader, but most "traditional" (and standard-compliant) implementations are case-converting. It is therefore not portable to rely on the case of a symbol (unless you |escape it|), and ASDF needs to case-convert itself; it chooses to downcase, which makes for much nicer file names.
CamelCase is not portably compatible with logical-pathnames, for similar reasons. Not that anyone sane should use logical-pathnames.
While CamelCase names are supported in the above way (using "Strings"), they are not idiomatic and are somehow frowned upon for public libraries.