#199: CL:DEFMETHOD cannot parse &AUX arguments ------------------------------+--------------------------------------------- Reporter: mevenson | Owner: mevenson Type: defect | Status: assigned Priority: critical | Milestone: 1.1.0 Component: (A)MOP | Version: 1.1.0-dev Keywords: quicklisp restas | ------------------------------+--------------------------------------------- Changes (by mevenson):
* milestone: 1.0.2 => 1.1.0
Old description:
For the [https://github.com/archimag/restas RESTAS framework] loaded by the Feb 2012 Quicklisp the following MOP call fails when trying to run the 'examples/example-1.lisp' code:
{{{ (MOP::INITIAL-DISCRIMINATING-FUNCTION #<STANDARD-GENERIC-FUNCTION SUBMODULE-ROUTES {59FAC3A2}> (#<RESTAS::PKG-SUBMODULE{23452A3E})) }}}
I would like to either fix this for abcl-1.0.2 or get [http://trac .common-lisp.net/armedbear/ticket/198 abcl-1.1.0-dev working with Hunchentoot again], as I'm pretty sure this should be fixed easily in Rudi's code.
{{{ Wrong number of arguments for #<FUNCTION (LAMBDA (ARGS NEXT-EMFUN)) {4B658B53}>. [Condition of type PROGRAM-ERROR]
Restarts: 0: [RETRY] Retry SLIME interactive evaluation request. 1: [*ABORT] Return to SLIME's top level. 2: [ABORT] Abort thread.
Backtrace: 0: (#<FUNCTION {17144A84}> #<PROGRAM-ERROR {35282BF2}> #<FUNCTION {17144A84}>) 1: (APPLY #<FUNCTION {17144A84}> (#<PROGRAM-ERROR {35282BF2}> #<FUNCTION {17144A84}>)) 2: (SYSTEM::RUN-HOOK SYSTEM::*INVOKE-DEBUGGER-HOOK* #<PROGRAM-ERROR {35282BF2}> #<FUNCTION {17144A84}>) 3: (INVOKE-DEBUGGER #<PROGRAM-ERROR {35282BF2}>) 4: org.armedbear.lisp.Lisp.error(Lisp.java:381) 5: org.armedbear.lisp.Function.execute(Function.java:312) 6: org.armedbear.lisp.Primitive.execute(Primitive.java:113) 7: (#<STANDARD-GENERIC-FUNCTION SUBMODULE-ROUTES {59FAC3A2}> #<RESTAS ::PKG-SUBMODULE {605D3821}>) 8: (APPLY #<STANDARD-GENERIC-FUNCTION SUBMODULE-ROUTES {59FAC3A2}> (#<RESTAS::PKG-SUBMODULE {605D3821}>)) 9: (MOP::INITIAL-DISCRIMINATING-FUNCTION #<STANDARD-GENERIC-FUNCTION SUBMODULE-ROUTES {59FAC3A2}> (#<RESTAS::PKG-SUBMODULE {605D3821}>)) 10: (RESTAS:SUBMODULE-ROUTES #<RESTAS::PKG-SUBMODULE {605D3821}>) 11: (RESTAS:CONNECT-SUBMODULE #<RESTAS::PKG-SUBMODULE {605D3821}> #<ROUTES:MAPPER {8102FF4}>) 12: (RESTAS::ADD-TOPLEVEL-SUBMODULE #<RESTAS::PKG-SUBMODULE {605D3821}> NIL 8080) 13: (RESTAS:START #:RESTAS.EXAMPLE-1 :PORT 8080) }}}
New description:
The code [source:/trunk/abcl/src/org/armedbear/lisp/ArgumentProcessor.java] does not handle &AUX arguments for CL:DEFMETHOD correctly.
After defining the APPLY-RULE generic function as such:
{{{ (defgeneric apply-rule (rule)) (defmethod apply-rule ((rule t) &aux (context (format nil "~A" rule))) (format nil "Applying rule '~A' in context '~A'" rule context)) }}}
then {{{ CL-USER> (apply-rule "1") }}}
will fail with errors in
{{{
(defgeneric apply-rule (rule)) (defmethod apply-rule ((rule t) &aux (context (format nil "~A" rule))) (format nil "Applying rule '~A' in context '~A'" rule context)) }}}
then
--
Comment:
For the [https://github.com/archimag/restas RESTAS framework] loaded by the Feb 2012 Quicklisp the following MOP call fails when trying to run the 'examples/example-1.lisp' code:
{{{ (MOP::INITIAL-DISCRIMINATING-FUNCTION #<STANDARD-GENERIC-FUNCTION SUBMODULE-ROUTES {59FAC3A2}> (#<RESTAS::PKG-SUBMODULE{23452A3E})) }}}
I would like to either fix this for abcl-1.0.2 or get [http://trac.common- lisp.net/armedbear/ticket/198 abcl-1.1.0-dev working with Hunchentoot again], as I'm pretty sure this should be fixed easily in Rudi's code.
{{{ Wrong number of arguments for #<FUNCTION (LAMBDA (ARGS NEXT-EMFUN)) {4B658B53}>. [Condition of type PROGRAM-ERROR]
Restarts: 0: [RETRY] Retry SLIME interactive evaluation request. 1: [*ABORT] Return to SLIME's top level. 2: [ABORT] Abort thread.
Backtrace: 0: (#<FUNCTION {17144A84}> #<PROGRAM-ERROR {35282BF2}> #<FUNCTION {17144A84}>) 1: (APPLY #<FUNCTION {17144A84}> (#<PROGRAM-ERROR {35282BF2}> #<FUNCTION {17144A84}>)) 2: (SYSTEM::RUN-HOOK SYSTEM::*INVOKE-DEBUGGER-HOOK* #<PROGRAM-ERROR {35282BF2}> #<FUNCTION {17144A84}>) 3: (INVOKE-DEBUGGER #<PROGRAM-ERROR {35282BF2}>) 4: org.armedbear.lisp.Lisp.error(Lisp.java:381) 5: org.armedbear.lisp.Function.execute(Function.java:312) 6: org.armedbear.lisp.Primitive.execute(Primitive.java:113) 7: (#<STANDARD-GENERIC-FUNCTION SUBMODULE-ROUTES {59FAC3A2}> #<RESTAS ::PKG-SUBMODULE {605D3821}>) 8: (APPLY #<STANDARD-GENERIC-FUNCTION SUBMODULE-ROUTES {59FAC3A2}> (#<RESTAS::PKG-SUBMODULE {605D3821}>)) 9: (MOP::INITIAL-DISCRIMINATING-FUNCTION #<STANDARD-GENERIC-FUNCTION SUBMODULE-ROUTES {59FAC3A2}> (#<RESTAS::PKG-SUBMODULE {605D3821}>)) 10: (RESTAS:SUBMODULE-ROUTES #<RESTAS::PKG-SUBMODULE {605D3821}>) 11: (RESTAS:CONNECT-SUBMODULE #<RESTAS::PKG-SUBMODULE {605D3821}> #<ROUTES:MAPPER {8102FF4}>) 12: (RESTAS::ADD-TOPLEVEL-SUBMODULE #<RESTAS::PKG-SUBMODULE {605D3821}> NIL 8080) 13: (RESTAS:START #:RESTAS.EXAMPLE-1 :PORT 8080) }}}