Skip to content
This repository has been archived by the owner on Oct 2, 2020. It is now read-only.

slamhound doesn't recognize #'foo.bar/baz as a need to require foo.bar #34

Closed
kenrestivo opened this issue Mar 20, 2013 · 2 comments
Closed

Comments

@kenrestivo
Copy link

A pattern often used in ring apps is to have in a server namespace, a call to start-server that passes as an arg, #'foo.handlers/app , so that one can dynamically mess around with the ring/compojure handler stack without restarting the server, and keep the handlers in a different ns than the call to start the ring server.

slamhound doesn't see that var. If I manually add (:require foo.handlers) to the ns declaration, slamhound will remove it out from under me.

I have hacked around this by creating a dummy function in foo.handlers called slamhound-hack and then calling it uselessly inside the other ns. This seems to prevent slamhound from removing the :require.

@kenrestivo
Copy link
Author

This is basically a duplicate of #19

@technomancy
Copy link
Owner

This is actually different from #19 assuming there's no syntax-quote going on. Fully-qualified references will sneak around slamhound; there's no way for it to catch references unless they depend upon :as aliases or :refer. This is just an inherent part of the approach it uses; there's really no way to fix it. But it should be documented.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants