slamhound explodes on autodoc source
Closed this issue · 3 comments
tomfaulhaber commented
On the current autodoc source (09ea736cb) with lein 1.6.2 and slamhound 1.2.0, slamhound generates the following:
tom@renoir:~/src/clj/autodoc-release$ lein slamhound src/autodoc/build_html.clj
Warning: *debug* not declared dynamic and thus is not dynamically rebindable, but its name suggests otherwise. Please either indicate ^:dynamic *debug* or change the name.
Warning: *swank-source-path* not declared dynamic and thus is not dynamically rebindable, but its name suggests otherwise. Please either indicate ^:dynamic *swank-source-path* or change the name.
Warning: *swank-source-path* not declared dynamic and thus is not dynamically rebindable, but its name suggests otherwise. Please either indicate ^:dynamic *swank-source-path* or change the name.
Warning: *swank-compile-path* not declared dynamic and thus is not dynamically rebindable, but its name suggests otherwise. Please either indicate ^:dynamic *swank-compile-path* or change the name.
Warning: *swank-compile-path* not declared dynamic and thus is not dynamically rebindable, but its name suggests otherwise. Please either indicate ^:dynamic *swank-compile-path* or change the name.
Exception in thread "main" java.lang.RuntimeException: No such var: slamhound.sandbox__327__auto__/emit*, compiling: (NO_SOURCE_PATH:1)
at clojure.lang.Compiler.analyze(Compiler.java:6235)
at clojure.lang.Compiler.analyze(Compiler.java:6177)
at clojure.lang.Compiler$InvokeExpr.parse(Compiler.java:3503)
at clojure.lang.Compiler.analyzeSeq(Compiler.java:6411)
at clojure.lang.Compiler.analyze(Compiler.java:6216)
at clojure.lang.Compiler.access$100(Compiler.java:37)
at clojure.lang.Compiler$DefExpr$Parser.parse(Compiler.java:492)
at clojure.lang.Compiler.analyzeSeq(Compiler.java:6409)
at clojure.lang.Compiler.analyze(Compiler.java:6216)
at clojure.lang.Compiler.analyze(Compiler.java:6177)
at clojure.lang.Compiler.eval(Compiler.java:6469)
at clojure.lang.Compiler.eval(Compiler.java:6454)
at clojure.lang.Compiler.eval(Compiler.java:6431)
at clojure.core$eval.invoke(core.clj:2795)
at slam.hound.regrow$check_for_failure.invoke(regrow.clj:38)
at slam.hound.regrow$regrow.invoke(regrow.clj:107)
at slam.hound$reconstruct.invoke(hound.clj:10)
at user$eval463.invoke(NO_SOURCE_FILE:1)
at clojure.lang.Compiler.eval(Compiler.java:6465)
at clojure.lang.Compiler.eval(Compiler.java:6455)
at clojure.lang.Compiler.eval(Compiler.java:6431)
at clojure.core$eval.invoke(core.clj:2795)
at clojure.main$eval_opt.invoke(main.clj:296)
at clojure.main$initialize.invoke(main.clj:315)
at clojure.main$null_opt.invoke(main.clj:348)
at clojure.main$main.doInvoke(main.clj:426)
at clojure.lang.RestFn.invoke(RestFn.java:421)
at clojure.lang.Var.invoke(Var.java:405)
at clojure.lang.AFn.applyToHelper(AFn.java:163)
at clojure.lang.Var.applyTo(Var.java:518)
at clojure.main.main(main.java:37)
Caused by: java.lang.RuntimeException: No such var: slamhound.sandbox__327__auto__/emit*
at clojure.lang.Util.runtimeException(Util.java:156)
at clojure.lang.Compiler.resolveIn(Compiler.java:6694)
at clojure.lang.Compiler.resolve(Compiler.java:6664)
at clojure.lang.Compiler.analyzeSymbol(Compiler.java:6625)
at clojure.lang.Compiler.analyze(Compiler.java:6198)
... 30 more
tom@renoir:~/src/clj/autodoc-release$
guns commented
This issue has been addressed by commit 54cba5c on the experimental branch. Running slamhound on src/autodoc/build_html.clj
at the current autodoc HEAD produces the following ns form:
(ns autodoc.build-html
(:require [autodoc.params :refer [expand-classpath params]]
[clojure.data.json :refer [pprint-json]]
[clojure.java.io :refer [as-file file writer]]
[clojure.java.shell :refer [sh]]
[clojure.pprint :refer [cl-format pprint]]
[clojure.set :refer [select]]
[clojure.string :as str :refer [split-lines]]
[clojure.walk :as walk]
[clojure.xml :refer [content]]
[net.cgrand.enlive-html :refer [annotate
any-node
at
clone-for
do->
html-resource
set-attr
substitute]])
(:import (java.io File StringReader)
(java.util.regex Pattern))
(:refer-clojure :exclude [complement empty]))
When we are ready to merge experimental into master, we will hopefully be able to close this issue.
guns commented
Hi @tomfaulhaber,
I believe 54cba5c fixes this issue, so I am going to close.
If you believe this is in error, please re-open!
Thank you
tomfaulhaber commented
Looks good to me. Thanks!