You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The API of (defhook :before/:after *hook-body*) is not usable for running lisp images / interactive development. Every time the defhook form is met, which happens when reloading the file / test system or running the file again, etc., will result in adding another hook.
Adding a function named (rove:clean-hooks) would work:
but wouldn't be elegant to have to call it explicitly in the file.
The problem is the hook calls will keep adding up. I.e., if my hook is a (format t "hook!") every time I run (asdf:test-system :my-system) or reload the file I'll have more and more "hook!" messages showing up before each test.
I see no other solution than naming the hook, so that when the defhook form is met it can replace the old definition. E.g.:
(defhook my-db-hook :before
...hook-body)
The text was updated successfully, but these errors were encountered:
The API of
(defhook :before/:after *hook-body*)
is not usable for running lisp images / interactive development. Every time the defhook form is met, which happens when reloading the file / test system or running the file again, etc., will result in adding another hook.Adding a function named
(rove:clean-hooks)
would work:(setf (ROVE/CORE/SUITE/PACKAGE::suite-before-hooks (ROVE/CORE/SUITE/PACKAGE:package-suite *package*)) nil)
but wouldn't be elegant to have to call it explicitly in the file.
The problem is the hook calls will keep adding up. I.e., if my hook is a
(format t "hook!")
every time I run(asdf:test-system :my-system)
or reload the file I'll have more and more "hook!" messages showing up before each test.I see no other solution than naming the hook, so that when the defhook form is met it can replace the old definition. E.g.:
(defhook my-db-hook :before ...hook-body)
The text was updated successfully, but these errors were encountered: