fukamachi / qlot

A project-local library installer for Common Lisp
https://qlot.tech
MIT License
468 stars 40 forks source link

`qlot bundle` fails when qlfile has Ultralisp systems #240

Closed Junker closed 3 months ago

Junker commented 7 months ago

Describe the bug

Qlot fails to bundle if there are any Ultralisp systems in the qlfile. Probably it caused by this "bug": https://github.com/quicklisp/quicklisp-client/pull/202

Reproducible steps

1)Add any system from Ultralisp to qlfile 2) start qlot bundle

Error messages

$> qlot bundle       
Loaded 10 system files.
Bundling 205 dependencies...
Unexpected error: The slot QL-DIST:CANONICAL-DISTINFO-URL is unbound in the
                  object #<DIST ultralisp 20240412214502>.
This can be a bug of Qlot.
Report it at https://github.com/fukamachi/qlot/issues/new/choose.
Please attach the stack trace dumped to '/tmp/qlot-error-5GEXGEG6.log'.

/tmp/qlot-error-5GEXGEG6.log:

Backtrace for: #<SB-THREAD:THREAD tid=1161025 "main thread" RUNNING {1001B38093}>
0: ((LAMBDA NIL :IN UIOP/IMAGE:PRINT-BACKTRACE))
1: ((FLET "THUNK" :IN UIOP/STREAM:CALL-WITH-SAFE-IO-SYNTAX))
2: (SB-IMPL::%WITH-STANDARD-IO-SYNTAX #<FUNCTION (FLET "THUNK" :IN UIOP/STREAM:CALL-WITH-SAFE-IO-SYNTAX) {73D1433FE57B}>)
3: (UIOP/STREAM:CALL-WITH-SAFE-IO-SYNTAX #<FUNCTION (LAMBDA NIL :IN UIOP/IMAGE:PRINT-BACKTRACE) {100287E6DB}> :PACKAGE :CL)
4: (UIOP/IMAGE:PRINT-CONDITION-BACKTRACE #<UNBOUND-SLOT CANONICAL-DISTINFO-URL {100287DD73}> :STREAM #<SB-SYS:FD-STREAM for "file /tmp/qlot-error-5GEXGEG7.log" {100287E573}> :COUNT NIL)
5: ((FLET "BEFORE29" :IN QLOT/CLI:QLOT-COMMAND) #<SB-SYS:FD-STREAM for "file /tmp/qlot-error-5GEXGEG7.log" {100287E573}> #P"/tmp/qlot-error-5GEXGEG7.log")
6: (UIOP/STREAM:CALL-WITH-TEMPORARY-FILE #<FUNCTION (FLET "BEFORE29" :IN QLOT/CLI:QLOT-COMMAND) {73D1433FE9FB}> :WANT-STREAM-P T :WANT-PATHNAME-P T :DIRECTION :OUTPUT :KEEP T :AFTER NIL :DIRECTORY NIL :TYPE "log" :PREFIX "qlot-error-" :SUFFIX "" :ELEMENT-TYPE NIL :EXTERNAL-FORMAT NIL)
7: ((LAMBDA (QLOT/CLI::C) :IN QLOT/CLI:QLOT-COMMAND) #<UNBOUND-SLOT CANONICAL-DISTINFO-URL {100287DD73}>)
8: (SB-KERNEL::%SIGNAL #<UNBOUND-SLOT CANONICAL-DISTINFO-URL {100287DD73}>)
9: (ERROR #<UNBOUND-SLOT CANONICAL-DISTINFO-URL {100287DD73}>)
10: (SB-KERNEL:WITH-SIMPLE-CONDITION-RESTARTS ERROR NIL UNBOUND-SLOT :NAME QL-DIST:CANONICAL-DISTINFO-URL :INSTANCE #<QL-DIST:DIST ultralisp 20240412214502>)
11: ((:METHOD SLOT-UNBOUND (T T T)) #<unused argument> #<QL-DIST:DIST ultralisp 20240412214502> QL-DIST:CANONICAL-DISTINFO-URL) [fast-method]
12: (SB-PCL::SLOT-UNBOUND-INTERNAL #<QL-DIST:DIST ultralisp 20240412214502> 7)
13: (QL-BUNDLE::BUNDLE-METADATA-PLIST #<QL-BUNDLE:BUNDLE 205 releases, 399 systems>)
14: ((FLET "THUNK" :IN QL-BUNDLE:WRITE-BUNDLE))
15: (SB-IMPL::%WITH-STANDARD-IO-SYNTAX #<FUNCTION (FLET "THUNK" :IN QL-BUNDLE:WRITE-BUNDLE) {73D1433FF07B}>)
16: ((:METHOD QL-BUNDLE:WRITE-BUNDLE (QL-BUNDLE:BUNDLE T)) #<QL-BUNDLE:BUNDLE 205 releases, 399 systems> #P"/projects/work/.bundle-libs/") [fast-method]
17: (QUICKLISP-CLIENT:BUNDLE-SYSTEMS ("parachute" "documentation-utils" "trivial-indent" "trivial-custom-debugger" "form-fiddle" "alexandria" "arrow-macros" "assoc-utils" "aws-sdk" "aws-sign4" "cl-ppcre" "flexi-streams" ...) :INCLUDE-LOCAL-PROJECTS NIL :TO #P"/projects/work/.bundle-libs/" :OVERWRITE T)
18: ((LAMBDA NIL :IN QLOT/BUNDLE::%BUNDLE-PROJECT))
19: (QLOT/UTILS/ASDF::CALL-WITH-SOURCE-REGISTRY (:SOURCE-REGISTRY :IGNORE-INHERITED-CONFIGURATION (:TREE #P"/projects/work/") (:ALSO-EXCLUDE ".qlot")) #<FUNCTION (LAMBDA NIL :IN QLOT/BUNDLE::%BUNDLE-PROJECT) {100222A11B}>)
20: (QLOT/BUNDLE::%BUNDLE-PROJECT #P"/projects/work/" :EXCLUDE NIL)
21: (UIOP/FILESYSTEM:CALL-WITH-CURRENT-DIRECTORY #P"/projects/work/" #<FUNCTION (LAMBDA NIL :IN QLOT/CLI::%QLOT-COMMAND) {1002431A9B}>)
22: (QLOT/CLI:QLOT-COMMAND "bundle")
23: (QLOT/CLI:MAIN)
24: (SB-INT:SIMPLE-EVAL-IN-LEXENV (QLOT/CLI:MAIN) #<NULL-LEXENV>)
25: (EVAL (QLOT/CLI:MAIN))
26: (SB-IMPL::PROCESS-EVAL/LOAD-OPTIONS ((:EVAL . "(let (*load-verbose*) (load \"/usr/lib/qlot/.bundle-libs/bundle.lisp\"))") (:EVAL . "(let (*load-verbose*) (asdf:load-asd #P\"/usr/lib/qlot/qlot.asd\"))") (:EVAL . "(let ((*standard-output* (make-broadcast-stream)) (*trace-output* (make-broadcast-stream))) (asdf:load-system :qlot/cli))") (:EVAL . "(qlot/cli:main)") (:QUIT)))
27: (SB-IMPL::TOPLEVEL-INIT)
28: ((FLET SB-UNIX::BODY :IN SB-IMPL::START-LISP))
29: ((FLET "WITHOUT-INTERRUPTS-BODY-3" :IN SB-IMPL::START-LISP))
30: (SB-IMPL::%START-LISP)
Above backtrace due to this condition:
The slot QL-DIST:CANONICAL-DISTINFO-URL is unbound in the object #<DIST ultralisp 20240412214502>.

Versions:

fukamachi commented 7 months ago

Can you paste an example of qlfile? I can't reproduce with the following file:

ultralisp fukamachi-mito
Junker commented 7 months ago

qlot-test.zip

> cd qlot-test
> qlot install
> qlot bundle
fukamachi commented 3 months ago

Ultralisp finally gets canonical-distinfo-url, and it should work now. https://github.com/ultralisp/ultralisp/issues/81#issuecomment-2254662423