加载 ASDF 系统时出现循环依赖错误

时间:2021-02-23 22:57:33

标签: common-lisp sbcl asdf

我正在尝试在 Windows 上的 SBCL 下使用 ASDF 加载第一个程序:(asdf:load-system "dependencies")。 ASDF 能够找到目录和 .asd 文件,但会产生警告和错误:

* (asdf:load-system "dependencies")
WARNING: System definition file #P"C:/Users/davyp/AppData/Local/lxss/root/quicklisp/dists/quicklisp/software/cl-ppcre-20190521-git/cl-ppcre.asd" contains definition for system "cl-ppcre-test". Please only define "cl-ppcre" and secondary systems with a name starting with "cl-ppcre/" (e.g. "cl-ppcre/test") in that file.
WARNING:
   Deprecated recursive use of (ASDF/OPERATE:OPERATE 'ASDF/LISP-ACTION:LOAD-OP
   '("dependencies")) while visiting
   (ASDF/LISP-ACTION:LOAD-OP "dependencies" "dependencies") - please use proper
   dependencies instead

debugger invoked on a ASDF/ACTION:CIRCULAR-DEPENDENCY in thread
#<THREAD "main thread" RUNNING {10010B0523}>:
  Circular dependency:
     ((#<ASDF/LISP-ACTION:LOAD-OP >
       . #<ASDF/LISP-ACTION:CL-SOURCE-FILE "dependencies" "dependencies">)
      (#<ASDF/LISP-ACTION:LOAD-OP > . #<ASDF/SYSTEM:SYSTEM "dependencies">))

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

restarts (invokable by number or by possibly-abbreviated name):
  0: [TRY-RECOMPILING              ] Recompile dependencies and try loading it again
  1: [RETRY                        ] Retry
                                     loading FASL for #<CL-SOURCE-FILE "dependencies" "dependencies">.
  2: [ACCEPT                       ] Continue, treating
                                     loading FASL for #<CL-SOURCE-FILE "dependencies" "dependencies">
                                     as having been successful.
  3:                                 Retry ASDF operation.
  4: [CLEAR-CONFIGURATION-AND-RETRY] Retry ASDF operation after resetting the
                                     configuration.
  5:                                 Retry ASDF operation.
  6:                                 Retry ASDF operation after resetting the
                                     configuration.
  7: [ABORT                        ] Exit debugger, returning to top level.

((LAMBDA NIL :IN ASDF/ACTION:CALL-WHILE-VISITING-ACTION))
   error finding frame source: Bogus form-number: the source file has probably
                               changed too much to cope with.
   source: NIL
0]

我的 .conf 文件包含单个条目:(:directory #P"D:/Users Data/Dave/SW Library/AI/Dependencies/");这是 .asd 文件中的 defsystem:

(defsystem "dependencies"
  :description "dependencies: A Common Lisp system for detecting ~
                inter-dependencies between a project's files."
  :version "1"
  :author "David Brown <davypough@gmail.com>"
  :licence "Public Domain"
  :depends-on ("alexandria" "cl-ppcre")
  :components ((:file "dependencies")))  ;ie, dependencies.lisp

对于警告,看起来 ASDF 正在查找与另一个程序相关联的 cl-ppcre,即使首先使用 (asdf:clear-source-registry) 清除了注册表。该错误似乎与某种循环有关。感谢您帮助解决问题。

0 个答案:

没有答案