ASDF抛出了最新状态
我正在脚本文件中使用asdf
load cl-ppcre
。该问题是(Prom(requient:asdf)(require:cl-ppcre))
在最高级别上完全可以,但是如果用handler-case >,
系统输出
条件将被handler-case
捕获,并且整个评估停止,并且不会加载所需的软件包。我只是确认同一问题也发生在一个重复中。无论我尝试加载哪个库,同一问题都在处理程序
中发生。以下是一个完整的会话:
; SLIME 2.27
CL-USER> (require :asdf)
NIL
CL-USER> (find-package :cl-ppcre)
NIL
CL-USER> (handler-case (require :cl-ppcre) (t (c) (format t "~a: ~a~%" (type-of c) c)))
SYSTEM-OUT-OF-DATE: system cl-ppcre is out of date
NIL
CL-USER> (find-package :cl-ppcre)
NIL
CL-USER> (require :cl-ppcre)
NIL
CL-USER> (find-package :cl-ppcre)
#<PACKAGE "CL-PPCRE">
CL-USER> (handler-case (require :cl-ppcre) (t (c) (format t "~a: ~a~%" (type-of c) c)))
NIL
CL-USER> (list (lisp-implementation-type) (lisp-implementation-version))
("SBCL" "2.2.4")
CL-USER> (asdf:asdf-version)
"3.3.1"
CL-USER> (directory "/home/pxie/common-lisp/*" :resolve-symlinks nil)
(#P"/home/pxie/common-lisp/alexandria/" #P"/home/pxie/common-lisp/cl-ppcre/")
根据ASDF手册,我将库放入〜/common-lisp Directory
中,并且库已经编译并保存在〜/.cache/common-中LISP目录
。
对ASDF中发生的事情有任何了解吗?
I'm using ASDF
load cl-ppcre
in a script file. The issue is (progn (require :asdf) (require :cl-ppcre))
is perfectly fine in a top level, but if the same codes wrapped in a handler-case
, a system-out-of-date
condition will be caught by handler-case
and the whole evaluation stops, and required packages won't be loaded. I just confirm the same issue also happens in a REPL. No matter what library I try to load, the same issue just happen in a handler-case
. The following is a complete session:
; SLIME 2.27
CL-USER> (require :asdf)
NIL
CL-USER> (find-package :cl-ppcre)
NIL
CL-USER> (handler-case (require :cl-ppcre) (t (c) (format t "~a: ~a~%" (type-of c) c)))
SYSTEM-OUT-OF-DATE: system cl-ppcre is out of date
NIL
CL-USER> (find-package :cl-ppcre)
NIL
CL-USER> (require :cl-ppcre)
NIL
CL-USER> (find-package :cl-ppcre)
#<PACKAGE "CL-PPCRE">
CL-USER> (handler-case (require :cl-ppcre) (t (c) (format t "~a: ~a~%" (type-of c) c)))
NIL
CL-USER> (list (lisp-implementation-type) (lisp-implementation-version))
("SBCL" "2.2.4")
CL-USER> (asdf:asdf-version)
"3.3.1"
CL-USER> (directory "/home/pxie/common-lisp/*" :resolve-symlinks nil)
(#P"/home/pxie/common-lisp/alexandria/" #P"/home/pxie/common-lisp/cl-ppcre/")
According to ASDF manual, I put my libraries in ~/common-lisp directory
, and the libraries already compiled and saved in the ~/.cache/common-lisp directory
.
Any insight of what is going on in ASDF?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您要求
处理程序
捕获 的任何条件,如您所做的那样,它将做到这一点,无论情况是否是错误。 永远不想这样做。您几乎 /asdf“ rel =“ noreferrer”> asdf资源您会发现
If you ask
handler-case
to catch any condition that is signalled, as you have done, it will do that, whether or not the condition is an error. You almost never want to do that.In particular if you look at
plan.lisp
in the ASDF sources you will find