Comment 1 for bug 1879535

Revision history for this message
Jan Moringen (scymtym) wrote :

This looks comes form an interaction between the custom reader macro and SLIME/SLY. The interesting part of the complete backtrace is:

Error while parsing arguments to DESTRUCTURING-BIND:
  too few elements in
    ()
  to satisfy lambda list
    (PLACE I0 &REST INDICES):
  at least 2 expected, but got 0
   [Condition of type SB-KERNEL::ARG-COUNT-ERROR]

Restarts:
 0: [MUFFLE-WARNING] Skip warning.
 1: [ABORT] Abort compilation.
 2: [*ABORT] Return to SLIME's top level.
 3: [ABORT] abort thread (#<THREAD "worker" RUNNING {100DD63093}>)

Backtrace:
  0: (SB-C::CHECK-DS-LIST/&REST #<unavailable argument> #<unavailable argument> #<unavailable argument> #<unavailable argument>)
  1: (BRACKETED-ACCESS #<SB-SYS:FD-STREAM for "file /tmp/let1.lisp" {100DDB40F3}> #<unused argument>)
  2: (SB-IMPL::READ-MAYBE-NOTHING #<SB-SYS:FD-STREAM for "file /tmp/let1.lisp" {100DDB40F3}> #\[)
  3: (SB-IMPL::READ-LIST #<SB-SYS:FD-STREAM for "file /tmp/let1.lisp" {100DDB40F3}> #<unused argument>)
  4: (SB-IMPL::READ-MAYBE-NOTHING #<SB-SYS:FD-STREAM for "file /tmp/let1.lisp" {100DDB40F3}> #\()
  5: (SB-IMPL::%READ-PRESERVING-WHITESPACE #<SB-SYS:FD-STREAM for "file /tmp/let1.lisp" {100DDB40F3}> T (NIL) T)
  6: (SB-IMPL::%READ-PRESERVING-WHITESPACE #<SB-SYS:FD-STREAM for "file /tmp/let1.lisp" {100DDB40F3}> T (NIL) NIL)
  7: (READ #<SB-SYS:FD-STREAM for "file /tmp/let1.lisp" {100DDB40F3}> T NIL NIL)
  8: (SWANK/SOURCE-PATH-PARSER::SKIP-TOPLEVEL-FORMS 1 #<SB-SYS:FD-STREAM for "file /tmp/let1.lisp" {100DDB40F3}>)
  9: (SWANK/SOURCE-PATH-PARSER:SOURCE-PATH-FILE-POSITION (0) #P"/tmp/let1.lisp")
 10: (SWANK/SBCL::LOCATE-COMPILER-NOTE #P"/tmp/let1.lisp" (0) " (LET (A) ..)
 11: (SWANK/SBCL::COMPILER-NOTE-LOCATION #<SB-INT:SIMPLE-STYLE-WARNING "The variable ~S is defined but never used." {100DDB2443}> #<SB-C::COMPILER-ERROR-CONTEXT >)
 12: (SWANK/SBCL::SIGNAL-COMPILER-CONDITION #<SB-INT:SIMPLE-STYLE-WARNING "The variable ~S is defined but never used." {100DDB2443}> #<SB-C::COMPILER-ERROR-CONTEXT >)
 13: (SB-KERNEL::%SIGNAL #<SB-INT:SIMPLE-STYLE-WARNING "The variable ~S is defined but never used." {100DDB2443}>)
 14: (SB-C::COMPILER-STYLE-WARNING-HANDLER #<SB-INT:SIMPLE-STYLE-WARNING "The variable ~S is defined but never used." {100DDB2443}>)
 15: (SB-KERNEL::%SIGNAL #<SB-INT:SIMPLE-STYLE-WARNING "The variable ~S is defined but never used." {100DDB2443}>)
 16: ((FLET SB-KERNEL::%WARN :IN "SYS:SRC;CODE;WARM-ERROR.LISP") "The variable ~S is defined but never used." #<SB-KERNEL::CONDITION-CLASSOID STYLE-WARNING> SB-INT:SIMPLE-STYLE-WARNING A)
 17: (SB-C:COMPILER-STYLE-WARN "The variable ~S is defined but never used." A)
 18: (SB-C::NOTE-UNREFERENCED-VARS (#<SB-C::LAMBDA-VAR :%SOURCE-NAME A {100DDAECA3}>) #<SB-KERNEL:BIND :LAMBDA #<SB-C::CLAMBDA :%SOURCE-NAME SB-C::.ANONYMOUS. :%DEBUG-NAME (LET #) :KIND :LET :TYPE #<SB-KER..
...

So the compiler signals a style-warning which SLIME handles by invoking its source parser which intern calls the reader macro. The reader macro then signals an error presumably it was invoked at a position in the input that does not have the expected form.