[slime-devel] Re: sbcl and compiler note annotation

Zach Beane xach at xach.com
Thu Jul 21 18:33:02 UTC 2005


Zach Beane <xach at xach.com> writes:

> Recently, slime and SBCL have stopped collaborating to correctly place
> compiler notes in source buffers. For example, I compile this function
> with C-c C-c:
> 
>    (defun funk (x)
>      (+ 1 'x))
> 
> The generated notes are stuck on the arglist of the form. If I use
> cmucl, for example, all the notes are correctly placed.
> 
> What should I do?

I dug into this, and it looks like 

   (reverse (sb-c::compiler-error-context-original-source-path context))

has a spurious second element. That is, for the bogus code above, the
note about 'X not being an integer has a path of (0 2 3 2), when the
correct path is (0 3 2). The note about the variable X being defined
but never used gives a path of (0 2), but the correct path is (0). I
updated swank-sbcl.lisp to simply remove the second element of the
source path, and the annotations now show up in the right place.

However, this seems like it could be a problem in SBCL's source path
generation, and not something to patch over in slime. I'm not sure how
the compiler-error-context-original-source-path gets populated. Any
SBCL hacker have an idea? Why does it get the extra path part?

Zach





More information about the slime-devel mailing list