3 Jan 2012 13:17
Strange package locking behaviour
Rupert Swarbrick <rswarbrick <at> gmail.com>
2012-01-03 12:17:48 GMT
2012-01-03 12:17:48 GMT
Hi,
Can anyone explain the following to me?
CL-USER> (sb-ext:with-unlocked-packages (:sb-kernel)
(sb-impl::package-lock-violation-p (find-package :sb-kernel) 'sb-kernel:type-expand))
0: (SB-IMPL::PACKAGE-LOCK-VIOLATION-P #<PACKAGE "SB-KERNEL">
SB-KERNEL:TYPE-EXPAND)
0: SB-IMPL::PACKAGE-LOCK-VIOLATION-P returned NIL
NIL
CL-USER> (sb-ext:with-unlocked-packages (:sb-kernel)
(defun sb-kernel::foo (form) (typexpand form)))
0: (SB-IMPL::PACKAGE-LOCK-VIOLATION-P #<PACKAGE "SB-KERNEL"> SB-KERNEL::FOO)
0: SB-IMPL::PACKAGE-LOCK-VIOLATION-P returned T
0: (PACKAGE-LOCK-VIOLATION #<PACKAGE "SB-KERNEL"> :SYMBOL SB-KERNEL::FOO
:FORMAT-CONTROL "proclaiming ~S as a function"
:FORMAT-ARGUMENTS (SB-KERNEL::FOO))
;
; compilation unit aborted
; caught 1 fatal ERROR condition
; Evaluation aborted on #<SYMBOL-PACKAGE-LOCKED-ERROR "proclaiming ~S as a function" {C6E8429}>.
I've traced SB-IMPL::PACKAGE-LOCK-VIOLATION-P and
SB-IMPL::PACKAGE-LOCK-VIOLATION. I don't understand why I only get a
violation on the second example, since it seems to me I should have
turned them off in both.
I hope I'm not missing something obvious...
Rupert
(Continue reading)
RSS Feed