joaotavora / sly

Sylvester the Cat's Common Lisp IDE
1.27k stars 144 forks source link

Inspector is unable to show the source of some objects. #50

Open PuercoPop opened 9 years ago

PuercoPop commented 9 years ago

How to reproduce

Inspect the result of (list (find-class 'sb-pcl::specializer-with-object)). And click v on specializer-with-object (the only item of the list).

Expected:

To be shown the source of specializer-with-object

Get:

[sly] Error: Lock on package SB-KERNEL violated when interning *BUILT-IN-CLASSES*
       while in package SB-PCL.
See also:
  The SBCL Manual, Node "Package Locks"

Just in case, (sb-introspect:find-definition-source (find-class 'sb-pcl::specializer-with-object)) returns the location definition-source structure just fine. It appears that slynk is trying to intern a symbol.

joaotavora commented 9 years ago

Thanks, seen it. It would seem this would affect SLIME as well. Will take a look a better look at all of these issues in a week's time.

PuercoPop commented 9 years ago

No rush. Btw I've pin-pointed the offending function to skip-one-top-level-form in sly-source-path-parser, from the follwing code:

(let ((obj (find-class 'sb-pcl::specializer-with-object)))
  (let ((defsrc (sb-introspect:find-definition-source obj)))
    (slynk-sbcl::definition-source-for-emacs defsrc
                                 :class
                                 (princ-to-string obj))))
joaotavora commented 9 years ago

Ah great, so this is probably what they mean in https://github.com/slime/slime/issues/242 as well, but they didn't include any more info.