Skip to content

Slime-compile-defun errors "The value NIL is not of type POLICY." in SBCL. #19

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
smithzvk opened this issue Jun 6, 2015 · 1 comment

Comments

@smithzvk
Copy link

smithzvk commented Jun 6, 2015

This might be better addressed to the main Slime project or to the SBCL devs, but I thought I would let you know that I think the current Slime+SBCL pairing in Quicklisp is not working correctly.

I just updated to the newest release of SBCL (1.2.12) and updated Quicklisp (client and dist) and found that the current Slime installed by quicklisp-slime-helper doesn't work completely with it. Slime-compile-defun reliably produces this error for me when using SBCL, but not with other Lisp implementations (tested with recent ABCL and some old version of CCL).

To reproduce, open a source buffer and use M-x slime-compile-defun on a top level form.

The value NIL is not of type SB-C:POLICY.
   [Condition of type TYPE-ERROR]

Restarts:
 0: [ABORT] Abort compilation.
 1: [*ABORT] Return to SLIME's top level.
 2: [ABORT] abort thread (#<THREAD "worker" RUNNING {1008AA6823}>)

Backtrace:
  0: (SB-C::POLICY-TO-DECL-SPEC NIL T NIL)
  1: (RESTRICT-COMPILER-POLICY NIL 0)
  2: (SWANK/SBCL::COMPILER-POLICY NIL)
  3: ((LABELS SWANK/SBCL::CF :IN SWANK/BACKEND:SWANK-COMPILE-STRING))
  4: ((FLET SWANK/BACKEND:CALL-WITH-COMPILATION-HOOKS :IN "/home/smithzv/quicklisp/dists/quicklisp/software/slime-2.13/swank/sbcl.lisp") #<CLOSURE (LAMBDA NIL :IN SWANK/BACKEND:SWANK-COMPILE-STRING) {1008A..
  5: ((FLET SWANK/BACKEND:SWANK-COMPILE-STRING :IN "/home/smithzv/quicklisp/dists/quicklisp/software/slime-2.13/swank/sbcl.lisp") "(print 1) ..)
  6: ((LAMBDA NIL :IN SWANK:COMPILE-STRING-FOR-EMACS))
  7: ((LAMBDA NIL :IN SWANK::COLLECT-NOTES))
  8: (SWANK::MEASURE-TIME-INTERVAL #<CLOSURE (LAMBDA NIL :IN SWANK::COLLECT-NOTES) {1008AC89FB}>)
  9: (SWANK::COLLECT-NOTES #<CLOSURE (LAMBDA NIL :IN SWANK:COMPILE-STRING-FOR-EMACS) {1008AC89BB}>)
 10: (SWANK::CALL-WITH-BUFFER-SYNTAX NIL #<CLOSURE (LAMBDA NIL :IN SWANK:COMPILE-STRING-FOR-EMACS) {1008AC897B}>)
 11: (SB-INT:SIMPLE-EVAL-IN-LEXENV (SWANK:COMPILE-STRING-FOR-EMACS "(print 1) ..)
 12: (EVAL (SWANK:COMPILE-STRING-FOR-EMACS "(print 1) ..)
 13: (SWANK:EVAL-FOR-EMACS (SWANK:COMPILE-STRING-FOR-EMACS "(print 1) ..)
 14: ((LAMBDA NIL :IN SWANK::SPAWN-WORKER-THREAD))
 15: (SWANK/SBCL::CALL-WITH-BREAK-HOOK #<FUNCTION SWANK:SWANK-DEBUGGER-HOOK> #<FUNCTION (LAMBDA NIL :IN SWANK::SPAWN-WORKER-THREAD) {1002FAE52B}>)
 16: ((FLET SWANK/BACKEND:CALL-WITH-DEBUGGER-HOOK :IN "/home/smithzv/quicklisp/dists/quicklisp/software/slime-2.13/swank/sbcl.lisp") #<FUNCTION SWANK:SWANK-DEBUGGER-HOOK> #<FUNCTION (LAMBDA NIL :IN SWANK::..
 17: (SWANK::CALL-WITH-BINDINGS ((*STANDARD-OUTPUT* . #1=#<SWANK/GRAY::SLIME-OUTPUT-STREAM {100715C043}>) (*STANDARD-INPUT* . #2=#<SWANK/GRAY::SLIME-INPUT-STREAM {1002E8FFC3}>) (*TRACE-OUTPUT* . #1#) (*ERR..
 18: ((LAMBDA NIL :IN SWANK::SPAWN-WORKER-THREAD))
 19: ((FLET #:WITHOUT-INTERRUPTS-BODY-1156 :IN SB-THREAD::INITIAL-THREAD-FUNCTION-TRAMPOLINE))
 20: ((FLET SB-THREAD::WITH-MUTEX-THUNK :IN SB-THREAD::INITIAL-THREAD-FUNCTION-TRAMPOLINE))
 21: ((FLET #:WITHOUT-INTERRUPTS-BODY-608 :IN SB-THREAD::CALL-WITH-MUTEX))
 22: (SB-THREAD::CALL-WITH-MUTEX #<CLOSURE (FLET SB-THREAD::WITH-MUTEX-THUNK :IN SB-THREAD::INITIAL-THREAD-FUNCTION-TRAMPOLINE) {7FFFF2536C8B}> #<SB-THREAD:MUTEX "thread result lock" owner: #<SB-THREAD:THR..
 23: (SB-THREAD::INITIAL-THREAD-FUNCTION-TRAMPOLINE #<SB-THREAD:THREAD "worker" RUNNING {1008AA6823}> NIL #<CLOSURE (LAMBDA NIL :IN SWANK::SPAWN-WORKER-THREAD) {1008AA67AB}> (#<SB-THREAD:THREAD "worker" RU..
 24: ("foreign function: call_into_lisp")
 25: ("foreign function: new_thread_trampoline")
@quicklisp
Copy link
Owner

This is a problem with SBCL that is fixed in git, and worked around in the latest slime release. The next Quicklisp dist update, due out very soon, will have the newest slime.

In the meantime, you can downgrade sbcl, or use this (courtesy of stassats):

echo "(sb-ext:restrict-compiler-policy 'safety)" >> ~/.sbclrc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants