A thing I should know myself....

Stas Boukarev stassats at gmail.com
Fri Jun 22 21:55:00 UTC 2018


On Fri, Jun 22, 2018 at 5:13 PM Robert Goldman <rpgoldman at sift.info> wrote:

> I have a library that provides DEF-UNIMPLEMENTED as a macro for defining
> stub functions. When you compile a file with unimplemented functions, you
> get a warning of the type FOO:UNIMPLEMENTED-STUB in my library FOO.
>
> I'd like to put in an asdf system definition a file spec something like
> this:
>
> (:file "file-with-stubs"
>   :method (:around (o c) 
            (handler-bind ((foo:unimplemented-stub
>                               #'(lambda (c)
>                                   (print c)
>                                   (muffle-warning c))
>                 (call-next-method)))
>
> but, of course, the package foo doesn't exist when this is read (although
> I could put (asdf:load-system "foo") upstream of the enclosing defsystem).
>
> This isn't a case that's nicely consistent with Faré's hack for
> translating strings or keyword symbols, nor does it seem easy to use
> find-symbol for this purpose.
>
You could still use FIND-SYMBOL:
(handler-bind ((error (lambda (c) (when (typep c (find-symbol x :foo))))))
(a))
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/asdf-devel/attachments/20180623/8e4ceba7/attachment-0001.html>


More information about the asdf-devel mailing list