quicklisp / quicklisp-client

Quicklisp client.
http://www.quicklisp.org/
MIT License
298 stars 75 forks source link

Error starting the QL client when SBCL safety and debug are set to level 3 #212

Open ghost opened 2 years ago

ghost commented 2 years ago

During the last few months, I have encountered a bug that prevents QL from loading a system after a fresh SBCL upgrade, see the attached backtrace.

I can not really understand what is causing it, my guess is that the cached files from the last SBCL somehow interfere with the new SBCL, but commenting out the following line in my .sbclrc allows the first compilation to proceed:

(declaim (optimize (safety 3) (debug 3) (speed 0) (space 0)))

After a successful first compilation without these settings, every subsequent compilation can be performed with safety and debug levels set back to 3.

ql-bug-220101.txt

zacque0 commented 2 years ago

Glad to have found this issue. Your workaround does work for me, it's SBCL 2.2.2, on Linux x86_64 machine.

my guess is that the cached files from the last SBCL somehow interfere with the new SBCL

Nope, you can delete ~/.cache/common-lisp to remove the cached files, but the error will still occur.

The root cause seems to be the (sort systems #'> :key #'preference) line 117 of write-asdf-manifest-file function in client.lisp causing this:

; caught WARNING:
;   Derived type of SEQUENCE is
;     (VALUES VECTOR &OPTIONAL),
;   conflicting with its asserted type
;     LIST.
;   See also:
;     The SBCL Manual, Node "Handling of Types"

After a successful first compilation without these settings, every subsequent compilation can be performed with safety and debug levels set back to 3.

The reason is that every subsequent loading of quicklisp will load the already compiled cached file, instead of performing compilation once again.