On Thu, Jul 21, 2005 at 02:33:02PM -0400, Zach Beane wrote:
> The following message is a courtesy copy of an article
> that has been posted to gmane.lisp.slime.devel as well.
> Zach Beane <xach@...> 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?
And one more data point: the source annotation is actually correct for
whole-file compilation with C-c C-k; it's only with compiling
individual forms with C-c C-c that the annotation is screwed up.