当我的应用尝试使用mito:connect-toplevel
连接到sqlite DB时,它需要很长时间,实际上ASDF正在递归扫描目录并扫描多个node_modules
!
但是这只会在可执行文件上发生,而不会在Slime上发生。
这可能是我的环境的错,但我的.sbclrc(再也没有)了。
问题是,我已经在asdf:system-relative-pathname
中观察到了这种行为,我在另一个应用程序中避免了这种情况,但是现在这是在第三方库中发生的。
我的模型。连接:
(defun connect ()
(format t "connecting to ~a...~&" *db-name*)
(force-output)
(setf *db* (connect-toplevel :sqlite3 :database-name *db-name*))
(format t "...done~&")
(force-output))
然后我生成一个可执行文件,然后从~/projects/bookshops
目录(而不是下面看到的~/bacasable
)中的命令行运行它,并在繁忙时将其杀死:
connecting to db.db...
^CUnhandled SB-SYS:INTERACTIVE-INTERRUPT in thread #<SB-THREAD:THREAD
"main thread" RUNNING
{1008E269A3}>:
Interactive interrupt at #x10002A6808.
Backtrace for: #<SB-THREAD:THREAD "main thread" RUNNING {1008E269A3}>
0: (SB-KERNEL:HAIRY-DATA-VECTOR-SET #<unavailable argument> #<unavailable argument> #<unavailable argument>) [tl,external]
1: (CONCATENATE SIMPLE-STRING "/" "home" "/" "vince" "/" "bacasable" "/" "testabelujo" "/" "abelujo" "/" "node_modules" "/" "testcafe-browser-tools" "/" "bin" "/" "linux" "/")
2: (SB-IMPL::UNPARSE-UNIX-NAMESTRING #P"/home/vince/bacasable/testabelujo/abelujo/node_modules/testcafe-browser-tools/bin/linux/")
3: (NAMESTRING #P"/home/vince/bacasable/testabelujo/abelujo/node_modules/testcafe-browser-tools/bin/linux/")
4: ((FLET ASDF/SOURCE-REGISTRY::PATHNAME-KEY :IN ASDF/SOURCE-REGISTRY:COLLECT-SUB*DIRECTORIES-ASD-FILES) #P"/home/vince/bacasable/testabelujo/abelujo/node_modules/testcafe-browser-tools/bin/linux/")
5: ((FLET ASDF/SOURCE-REGISTRY::RECURSEP :IN ASDF/SOURCE-REGISTRY:COLLECT-SUB*DIRECTORIES-ASD-FILES) #P"/home/vince/bacasable/testabelujo/abelujo/node_modules/testcafe-browser-tools/bin/linux/")
6: (UIOP/FILESYSTEM:COLLECT-SUB*DIRECTORIES #P"/home/vince/bacasable/testabelujo/abelujo/node_modules/testcafe-browser-tools/bin/" #<CLOSURE (FLET ASDF/SOURCE-REGISTRY::COLLECTP :IN ASDF/SOURCE-REGISTRY:COLLECT-SUB*DIRECTORIES-ASD-FILES) {100923C1CB}> #<CLOSURE (FLET ASDF/SOURCE-REGISTRY::RECURSEP :IN ASDF/SOURCE-REGISTRY:COLLECT-SUB*DIRECTORIES-ASD-FILES) {100923C1FB}> #<CLOSURE (LAMBDA (&REST SB-IMPL::ARGUMENTS) :IN CONSTANTLY) {100923C21B}>)
7: (UIOP/FILESYSTEM:COLLECT-SUB*DIRECTORIES #P"/home/vince/bacasable/testabelujo/abelujo/node_modules/testcafe-browser-tools/" #<CLOSURE (FLET ASDF/SOURCE-REGISTRY::COLLECTP :IN ASDF/SOURCE-REGISTRY:COLLECT-SUB*DIRECTORIES-ASD-FILES) {100923C1CB}> #<CLOSURE (FLET ASDF/SOURCE-REGISTRY::RECURSEP :IN ASDF/SOURCE-REGISTRY:COLLECT-SUB*DIRECTORIES-ASD-FILES) {100923C1FB}> #<CLOSURE (LAMBDA (&REST SB-IMPL::ARGUMENTS) :IN CONSTANTLY) {100923C21B}>)
8: (UIOP/FILESYSTEM:COLLECT-SUB*DIRECTORIES #P"/home/vince/bacasable/testabelujo/abelujo/node_modules/" #<CLOSURE (FLET ASDF/SOURCE-REGISTRY::COLLECTP :IN ASDF/SOURCE-REGISTRY:COLLECT-SUB*DIRECTORIES-ASD-FILES) {100923C1CB}> #<CLOSURE (FLET ASDF/SOURCE-REGISTRY::RECURSEP :IN ASDF/SOURCE-REGISTRY:COLLECT-SUB*DIRECTORIES-ASD-FILES) {100923C1FB}> #<CLOSURE (LAMBDA (&REST SB-IMPL::ARGUMENTS) :IN CONSTANTLY) {100923C21B}>)
9: (UIOP/FILESYSTEM:COLLECT-SUB*DIRECTORIES #P"/home/vince/bacasable/testabelujo/abelujo/" #<CLOSURE (FLET ASDF/SOURCE-REGISTRY::COLLECTP :IN ASDF/SOURCE-REGISTRY:COLLECT-SUB*DIRECTORIES-ASD-FILES) {100923C1CB}> #<CLOSURE (FLET ASDF/SOURCE-REGISTRY::RECURSEP :IN ASDF/SOURCE-REGISTRY:COLLECT-SUB*DIRECTORIES-ASD-FILES) {100923C1FB}> #<CLOSURE (LAMBDA (&REST SB-IMPL::ARGUMENTS) :IN CONSTANTLY) {100923C21B}>)
10: (UIOP/FILESYSTEM:COLLECT-SUB*DIRECTORIES #P"/home/vince/bacasable/testabelujo/" #<CLOSURE (FLET ASDF/SOURCE-REGISTRY::COLLECTP :IN ASDF/SOURCE-REGISTRY:COLLECT-SUB*DIRECTORIES-ASD-FILES) {100923C1CB}> #<CLOSURE (FLET ASDF/SOURCE-REGISTRY::RECURSEP :IN ASDF/SOURCE-REGISTRY:COLLECT-SUB*DIRECTORIES-ASD-FILES) {100923C1FB}> #<CLOSURE (LAMBDA (&REST SB-IMPL::ARGUMENTS) :IN CONSTANTLY) {100923C21B}>)
11: (UIOP/FILESYSTEM:COLLECT-SUB*DIRECTORIES #P"/home/vince/bacasable/" #<CLOSURE (FLET ASDF/SOURCE-REGISTRY::COLLECTP :IN ASDF/SOURCE-REGISTRY:COLLECT-SUB*DIRECTORIES-ASD-FILES) {100923C1CB}> #<CLOSURE (FLET ASDF/SOURCE-REGISTRY::RECURSEP :IN ASDF/SOURCE-REGISTRY:COLLECT-SUB*DIRECTORIES-ASD-FILES) {100923C1FB}> #<CLOSURE (LAMBDA (&REST SB-IMPL::ARGUMENTS) :IN CONSTANTLY) {100923C21B}>)
12: (ASDF/SOURCE-REGISTRY:COMPUTE-SOURCE-REGISTRY NIL #<HASH-TABLE :TEST EQUAL :COUNT 17 {10091B5463}>)
13: (ASDF/SOURCE-REGISTRY:ENSURE-SOURCE-REGISTRY NIL)
14: (ASDF/SYSTEM-REGISTRY:SYSDEF-SOURCE-REGISTRY-SEARCH "dbd-sqlite3")
15: ((FLET ASDF/SYSTEM-REGISTRY::TRY :IN ASDF/SYSTEM-REGISTRY:SEARCH-FOR-SYSTEM-DEFINITION) ASDF/SYSTEM-REGISTRY:SYSDEF-SOURCE-REGISTRY-SEARCH)
16: ((FLET ASDF/SYSTEM-REGISTRY::TRY :IN ASDF/SYSTEM-REGISTRY:SEARCH-FOR-SYSTEM-DEFINITION) ASDF/SYSTEM-REGISTRY:SYSDEF-SOURCE-REGISTRY-SEARCH) [external]
17: (SB-KERNEL:%MAP-FOR-EFFECT-ARITY-1 #<CLOSURE (FLET ASDF/SYSTEM-REGISTRY::TRY :IN ASDF/SYSTEM-REGISTRY:SEARCH-FOR-SYSTEM-DEFINITION) {10091B480B}> (ASDF/PACKAGE-INFERRED-SYSTEM:SYSDEF-PACKAGE-INFERRED-SYSTEM-SEARCH ASDF/SYSTEM-REGISTRY:SYSDEF-CENTRAL-REGISTRY-SEARCH ASDF/SYSTEM-REGISTRY:SYSDEF-SOURCE-REGISTRY-SEARCH QUICKLISP-CLIENT:LOCAL-PROJECTS-SEARCHER QL-DIST:SYSTEM-DEFINITION-SEARCHER))
18: (ASDF/SYSTEM-REGISTRY:SEARCH-FOR-SYSTEM-DEFINITION "dbd-sqlite3")
19: ((LAMBDA NIL :IN ASDF/FIND-SYSTEM:LOCATE-SYSTEM))
20: ((LAMBDA NIL :IN ASDF/SYSTEM:FIND-SYSTEM))
21: (ASDF/SESSION:CONSULT-ASDF-CACHE (ASDF/SYSTEM:FIND-SYSTEM "dbd-sqlite3") #<CLOSURE (LAMBDA NIL :IN ASDF/SYSTEM:FIND-SYSTEM) {10091B387B}>)
22: (ASDF/SESSION:CALL-WITH-ASDF-SESSION #<CLOSURE (LAMBDA NIL :IN ASDF/SYSTEM:FIND-SYSTEM) {10091B387B}> :OVERRIDE NIL :KEY (ASDF/SYSTEM:FIND-SYSTEM "dbd-sqlite3") :OVERRIDE-CACHE NIL :OVERRIDE-FORCING NIL)
23: ((LABELS QUICKLISP-CLIENT::RECURSE :IN QUICKLISP-CLIENT::COMPUTE-LOAD-STRATEGY) "dbd-sqlite3")
24: ((LAMBDA NIL :IN QUICKLISP-CLIENT::COMPUTE-LOAD-STRATEGY)) [external]
25: (QL-DIST::CALL-WITH-CONSISTENT-DISTS #<CLOSURE (LAMBDA NIL :IN QUICKLISP-CLIENT::COMPUTE-LOAD-STRATEGY) {10091B37DB}>)
26: (QUICKLISP-CLIENT::COMPUTE-LOAD-STRATEGY #<unavailable argument>)
27: (QUICKLISP-CLIENT::AUTOLOAD-SYSTEM-AND-DEPENDENCIES "dbd-sqlite3" :PROMPT NIL)
28: ((:METHOD QL-IMPL-UTIL::%CALL-WITH-QUIET-COMPILATION (T T)) #<unavailable argument> #<CLOSURE (FLET QUICKLISP-CLIENT::QL :IN QUICKLISP-CLIENT:QUICKLOAD) {10091B301B}>) [fast-method]
29: ((:METHOD QL-IMPL-UTIL::%CALL-WITH-QUIET-COMPILATION :AROUND (QL-IMPL:SBCL T)) #<QL-IMPL:SBCL {10011057E3}> #<CLOSURE (FLET QUICKLISP-CLIENT::QL :IN QUICKLISP-CLIENT:QUICKLOAD) {10091B301B}>) [fast-method]
30: ((:METHOD QUICKLISP-CLIENT:QUICKLOAD (T)) #<unavailable argument> :PROMPT NIL :SILENT T :VERBOSE NIL) [fast-method]
31: (QL-DIST::CALL-WITH-CONSISTENT-DISTS #<CLOSURE (LAMBDA NIL :IN QUICKLISP-CLIENT:QUICKLOAD) {100919ECDB}>)
32: (DBI::LOAD-DRIVER :SQLITE3)
33: (DBI:CONNECT :SQLITE3 :DATABASE-NAME "db.db")
34: (MITO.CONNECTION:CONNECT-TOPLEVEL :SQLITE3 :DATABASE-NAME "db.db")
35: (BOOKSHOPS.MODELS:CONNECT)
36: (BOOKSHOPS::INIT)
37: (BOOKSHOPS:MAIN)
38: ((LAMBDA NIL :IN UIOP/IMAGE:RESTORE-IMAGE))
39: (UIOP/IMAGE:CALL-WITH-FATAL-CONDITION-HANDLER #<CLOSURE (LAMBDA NIL :IN UIOP/IMAGE:RESTORE-IMAGE) {1008E3CD2B}>)
40: ((FLET #:WITHOUT-INTERRUPTS-BODY-89 :IN SAVE-LISP-AND-DIE))
41: ((LABELS SB-IMPL::RESTART-LISP :IN SAVE-LISP-AND-DIE))
在我的环境中是什么原因引起的?
这是正常的ASDF吗,为什么只使用可执行文件?
ASDF“ 3.3.1.2”
答案 0 :(得分:2)
ASDF正在文件系统中的多个可能位置构建其源注册表:
~/common-lisp/
~/.local/share/common-lisp/source/
~/.config/common-lisp/source-registry.conf
和~/.config/common-lisp/source-registry.conf.d/
中的定义请参阅:
我认为,Quicklisp添加了其local-projects
目录。
您需要浏览这些列表以查找正在发生的情况。我猜您是在某个地方将指向该~/bacasable/
目录的符号链接放到了由ASDF搜索的目录中。
顺便说一句,我发现库在运行时以编程方式下载所需驱动程序的过程有些可疑。应该有一些解决方法。
也许您可以在保存可执行文件之前尝试强制加载驱动程序。