(ns my.namespace
"some doc string")
(defn -main [& args]
(pprint args)
(io/copy (ByteArrayInputStream. (.getBytes "hello"))
(first args)))
Look at that; all bare, missing all kinds of necessary stuff.
Disgraceful. Release the hound!
$ lein slamhound src/my/namespace.clj
(ns my.namespace
"I have a doc string."
(:use [clojure.pprint :only [pprint]])
(:require [clojure.java.io :as io])
(:import (java.io ByteArrayInputStream)))
Tada! (also featuring Emacs integration: M-x slamhound)
Enjoy: https://github.com/technomancy/slamhound
-Phil
Exception in thread "main" java.lang.Exception: prefix cannot be nil
(NO_SOURCE_FILE:1)
at clojure.lang.Compiler.eval(Compiler.java:5440)
at clojure.lang.Compiler.eval(Compiler.java:5415)
at clojure.lang.Compiler.eval(Compiler.java:5391)
at clojure.core$eval.invoke(core.clj:2382)
at slam.hound.regrow$check_for_failure.invoke(regrow.clj:31)
at slam.hound.regrow$regrow.invoke(regrow.clj:72)
at slam.hound.regrow$regrow.invoke(regrow.clj:70)
at slam.hound$reconstruct.invoke(hound.clj:10)
at user$eval368.invoke(NO_SOURCE_FILE:1)
at clojure.lang.Compiler.eval(Compiler.java:5424)
at clojure.lang.Compiler.eval(Compiler.java:5415)
at clojure.lang.Compiler.eval(Compiler.java:5415)
at clojure.lang.Compiler.eval(Compiler.java:5391)
at clojure.core$eval.invoke(core.clj:2382)
at clojure.main$eval_opt.invoke(main.clj:235)
at clojure.main$initialize.invoke(main.clj:254)
at clojure.main$null_opt.invoke(main.clj:279)
at clojure.main$main.doInvoke(main.clj:354)
at clojure.lang.RestFn.invoke(RestFn.java:422)
at clojure.lang.Var.invoke(Var.java:369)
at clojure.lang.AFn.applyToHelper(AFn.java:165)
at clojure.lang.Var.applyTo(Var.java:482)
at clojure.main.main(main.java:37)
Caused by: java.lang.Exception: prefix cannot be nil
at clojure.core$load_libs.doInvoke(core.clj:4802)
at clojure.lang.RestFn.applyTo(RestFn.java:138)
at clojure.core$apply.invoke(core.clj:544)
at clojure.core$use.doInvoke(core.clj:4880)
at clojure.lang.RestFn.invoke(RestFn.java:409)
at clj_lbm.core$eval386$loading__4410__auto____387.invoke(NO_SOURCE_FILE:1)
at clj_lbm.core$eval386.invoke(NO_SOURCE_FILE:1)
at clojure.lang.Compiler.eval(Compiler.java:5424)
... 22 more
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clo...@googlegroups.com
> Note that posts from new members are moderated - please be patient with your first post.
> To unsubscribe from this group, send email to
> clojure+u...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
-Phil
Ah, well even if I use "string/trim" it throws the same error:
user=> (require 'slam.hound)
nil
user=> (slam.hound/reconstruct "src/foobar/core.clj")
java.lang.Exception: No such namespace: string (core.clj:2)
> However, there was an unrelated bug causing issues when uncompilable
> namespaces were on the classpath. I'll have a 1.1.1 fix pushed in a
> few minutes.
Is clojure.string an uncompilable namespace, then?
- James
Ohh! I see what you were saying now.
Thanks for the fix!
- James