我开始研究 Edi Weitz 的 CL-FAD 以获取一些好的编码实践。在查看 cl-fad.asd
时,有一件事引起了我的注意。在 defsystem
中,Weitz 使用 :serial t
,如果我根据 docs 理解正确的话, 指示 ASDF 按出现顺序包含 :components
。在我看来,这应该使 :depends-on
在这种情况下变得多余。 Weitz 无论如何都包含 :depends-on
是有原因的,还是只是疏忽?
这是 defsystem
部分(最新的 Github 克隆):
(asdf:defsystem #:cl-fad
:version "0.7.2"
:description "Portable pathname library"
:serial t
:components ((:file "packages")
#+:cormanlisp (:file "corman")
#+:openmcl (:file "openmcl")
(:file "fad")
(:file "path" :depends-on ("fad"))
(:file "temporary-files" :depends-on ("fad")))
:depends-on (#+sbcl :sb-posix :bordeaux-threads :alexandria))
(asdf:defsystem #:cl-fad-test
:version "0.7.2"
:serial t
:components ((:file "packages.test")
(:file "fad.test" :depends-on ("packages.test"))
(:file "temporary-files.test" :depends-on ("packages.test")))
:depends-on (:cl-fad :unit-test :cl-ppcre))
最佳答案
friend 不要让 friend 使用 cl-fad。
cl-fad 是任何类型的“最佳实践”的错误地方。这是一个快速而肮脏的不太便携的可移植层。
改用 UIOP。
关于lisp - CL-FAD - defsystem 中的冗余?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22863066/