@pez Orchard is a regular library. Hacking on it is pretty natural IMO. Just take a look at <http://orchard.cljs.info|orchard.cljs.info>
.
@bozhidar, I’ve gotten that far. 😄 I should have been clearer… What I’d like to setup is so that I can run my orchard.info.clj
end-to-end, from the editor and explore what happens down there in info.clj
. If that’s possible.
@pez I just develop it like any other library and test the changes in the REPL, while hacking on something. Alternatively you can rebuild cider-nrepl with the snapshot of orchard and test your changes end-to-end in this manner.
Yeah, I’ll just have to figure out why my lein install
of cider-nrepl
isn’t used. I’m doing it the “just another library way” now. Added this test: https://github.com/PEZ/orchard/commit/754ae065cac18e97db80164a261e8e44f76792b9
If you have feedback to an orchard noob, please don’t hesitate. 😃
I have isolated the problem down to that meta/ns-meta
relies on (ns-publics)
to give it something to get a var out of, and then run (var-meta)
on that to get the file path. So then if the namespace doesn’t have any publics we get get a nil
file entry. A brute fix is this
(defn ns-meta
[ns]
(when ns
(merge
(meta ns)
{:ns (ns-name ns)
:name (ns-name ns)
:file (or (-> (ns-publics ns)
first
second
var-meta
:file)
(->
(ns/canonical-source ns)
.getPath))
:line 1})))
But it feels like there should be something more elegant/safe… What do you guys think?