inlined-generic-function icon indicating copy to clipboard operation
inlined-generic-function copied to clipboard

Interacts badly with package loading

Open bon opened this issue 7 years ago • 3 comments

When using inlined-generic-functions and loading packages via quicklisp, inlined generics do not call the desired make-method-lambda method.

See example in https://github.com/bon/igtest.

Clone it to somewhere quicklisp can see it and try:

sbcl --load ptest.lisp

Note how make-method-lambda is traced and how its method for standard-generic-function gets called for foo instead of the method for inlined-generic-function that you would expect.

BTW I think this might have been at the root of issue #3. I'll check that when we get to the bottom of this issue.

bon avatar Apr 29 '17 09:04 bon

@bon @guicho271828 I seem to be having this issue too. Defining things at the REPL seems ok, but as soon as it gets into an ASD and loaded with ASDF/Quicklisp, it errors.

;    The slot INLINED-GENERIC-FUNCTION.IMPL::LAMBDA-EXPRESSION is unbound in the
;    object ...

stylewarning avatar Oct 11 '18 21:10 stylewarning

It looks like there's something awry with when things are getting evaluated/stored in the environment. EVAL-WHEN (:compile-toplevel :load-toplevel :execute) around the defgeneric/defmethod seems to "fix" it. Maybe there is something more specific we can figure out from this?

stylewarning avatar Oct 11 '18 21:10 stylewarning

This lib is experimental and sort of proof-of-concept, but I would love to come up with a fix.

guicho271828 avatar Oct 12 '18 00:10 guicho271828