Closed alexjg closed 11 years ago
ns-tracker works by parsing the namespace declaration at the top of a file; for this reason, it won't work on namespaces split across several files.
It might be possible to search a file for load
s, but this can obviously never be 100% foolproof.
Generally speaking, dividing a namespace up is useful only in exceptional circumstances. May I ask why you need to split up your namespace across multiple files?
I'm building a compojure app and I had a views
namespace which I wanted to split across multiple files because the views are hiccup templates and it seemed irritatingly verbose to type things like myapp.views.viewname/viewname
but equally I didn't want one massive file of hiccup templates.
I solved that by categorising the views at a slightly more granular level (eg by the resource which they represent) and based on your comment about it being rare to split namespaces I guess that's the idiomatic approach, in which case apologies for the noise.
Fixed by #10 (with some caveats)
If you use the technique mentioned here to split a namespace over multiple files, changes in the files using
in-ns
will not be detected by ns-tracker.I've created a simple example project at https://github.com/alexjg/ns-tracker-multiple-files if you start a repl in that project, then change the value of dummy-var in the core/subspace.clj file ns-tracker will not pick up the change.