Update: This was fixed by changing the soure paths to the following:
:source-paths ^:replace ["src-typed/clojure"]
Exception getting thrown on examples that shouldn't be there:
Exception in thread "main" clojure.lang.ExceptionInfo: No such var: ex {:form ex/foop, :file "codox/import.clj", :end-column 17, :column 10, :line 6, :end-line 6}, compiling:(/tmp/form-init5254500589270806261.clj:1:73)
The command being run to generate the docs:
$ lein with-profile +typed codox
I also tried with the following minimal set of profiles, with the same result (exception):
$ lein with-profile base,typed codox
The typed
profile in project.clj
:
:typed {:dependencies [[org.clojure/clojure "1.7.0"]
[org.clojure/core.typed "0.3.22"]]
:source-paths ["src-typed/clojure"]}
This is after the following:
- removed most examples from
src-typed
(kept a cut-down version ofexamples.clj
) - removed
target
dir in the example project directory - removed
target
dir in the codox project directory
The following are the only files in src-typed
:
$ find src-typed -type f
src-typed/clojure/codox/example.clj
src-typed/clojure/codox/typed/defproto.clj
src-typed/clojure/codox/typed/array.clj
Here's the output of the above lein
command, complete with the exception:
Initializing core.typed ...
Building core.typed base environments ...
Finished building base environments
"Elapsed time: 1833.092717 msecs"
core.typed initialized.
Start collecting codox.example
Finished collecting codox.example
Collected 1 namespaces in 187.701881 msecs
Not checking codox.example (does not depend on clojure.core.typed)
Checked 1 namespaces in 192.019392 msecs
Type Error (/tmp/form-init5254500589270806261.clj) Unannotated var codox.example/bar
Hint: Add the annotation for codox.example/bar via check-ns or cf
in: codox.example/bar
Type Error (/tmp/form-init5254500589270806261.clj) Unannotated var codox.example/foo
Hint: Add the annotation for codox.example/foo via check-ns or cf
in: codox.example/foo
Type Error (/tmp/form-init5254500589270806261.clj) Unannotated var codox.example/markfoo
Hint: Add the annotation for codox.example/markfoo via check-ns or cf
in: codox.example/markfoo
Start collecting codox.typed.array
Finished collecting codox.typed.array
Collected 1 namespaces in 258.487553 msecs
Not checking clojure.core.typed (does not depend on clojure.core.typed)
Not checking clojure.repl (does not depend on clojure.core.typed)
Start checking codox.typed.array
Checked codox.typed.array in 651.71823 msecs
Checked 3 namespaces in 923.301156 msecs
Start collecting codox.typed.defproto
Finished collecting codox.typed.defproto
Collected 1 namespaces in 390.644331 msecs
Not checking clojure.core.typed (does not depend on clojure.core.typed)
Start checking codox.typed.defproto
Checked codox.typed.defproto in 46.709977 msecs
Checked 2 namespaces in 452.386858 msecs
Start collecting codox.example
Finished collecting codox.example
Collected 1 namespaces in 159.182381 msecs
Not checking codox.example (does not depend on clojure.core.typed)
Checked 1 namespaces in 159.837874 msecs
Type Error (/tmp/form-init5254500589270806261.clj) Unannotated var codox.example/bar
Hint: Add the annotation for codox.example/bar via check-ns or cf
in: codox.example/bar
Type Error (/tmp/form-init5254500589270806261.clj) Unannotated var codox.example/foo
Hint: Add the annotation for codox.example/foo via check-ns or cf
in: codox.example/foo
Type Error (/tmp/form-init5254500589270806261.clj) Unannotated var codox.example/markfoo
Hint: Add the annotation for codox.example/markfoo via check-ns or cf
in: codox.example/markfoo
Start collecting codox.example2
Finished collecting codox.example2
Collected 1 namespaces in 88.81314 msecs
Not checking codox.example2 (does not depend on clojure.core.typed)
Checked 1 namespaces in 89.576453 msecs
Type Error (/tmp/form-init5254500589270806261.clj) Unannotated var codox.example2/bar
Hint: Add the annotation for codox.example2/bar via check-ns or cf
in: codox.example2/bar
Type Error (/tmp/form-init5254500589270806261.clj) Unannotated var codox.example2/baz
Hint: Add the annotation for codox.example2/baz via check-ns or cf
in: codox.example2/baz
Type Error (/tmp/form-init5254500589270806261.clj) Unannotated var codox.example2/foo
Hint: Add the annotation for codox.example2/foo via check-ns or cf
in: codox.example2/foo
Type Error (/tmp/form-init5254500589270806261.clj) Unannotated var codox.example2/marklinks
Hint: Add the annotation for codox.example2/marklinks via check-ns or cf
in: codox.example2/marklinks
Type Error (/tmp/form-init5254500589270806261.clj) Unannotated var codox.example2/quz
Hint: Add the annotation for codox.example2/quz via check-ns or cf
in: codox.example2/quz
Type Error (/tmp/form-init5254500589270806261.clj) Unannotated var codox.example2/really-long-function-name-with-hyphens
Hint: Add the annotation for codox.example2/really-long-function-name-with-hyphens via check-ns or cf
in: codox.example2/really-long-function-name-with-hyphens
Start collecting codox.example2.core
Finished collecting codox.example2.core
Collected 1 namespaces in 44.493621 msecs
Not checking codox.example2.core (does not depend on clojure.core.typed)
Checked 1 namespaces in 45.301579 msecs
Type Error (/tmp/form-init5254500589270806261.clj) Unannotated var codox.example2.core/inner
Hint: Add the annotation for codox.example2.core/inner via check-ns or cf
in: codox.example2.core/inner
Start collecting codox.hidden
Finished collecting codox.hidden
Collected 1 namespaces in 47.373656 msecs
Not checking codox.hidden (does not depend on clojure.core.typed)
Checked 1 namespaces in 47.931345 msecs
Type Error (/tmp/form-init5254500589270806261.clj) Unannotated var codox.hidden/foo
Hint: Add the annotation for codox.hidden/foo via check-ns or cf
in: codox.hidden/foo
Start collecting codox.import
Exception in thread "main" clojure.lang.ExceptionInfo: No such var: ex {:form ex/foop, :file "codox/import.clj", :end-column 17, :column 10, :line 6, :end-line 6}, compiling:(/tmp/form-init5254500589270806261.clj:1:73)
at clojure.lang.Compiler.load(Compiler.java:7239)
at clojure.lang.Compiler.loadFile(Compiler.java:7165)
at clojure.main$load_script.invoke(main.clj:275)
at clojure.main$init_opt.invoke(main.clj:280)
at clojure.main$initialize.invoke(main.clj:308)
at clojure.main$null_opt.invoke(main.clj:343)
at clojure.main$main.doInvoke(main.clj:421)
at clojure.lang.RestFn.invoke(RestFn.java:421)
at clojure.lang.Var.invoke(Var.java:383)
at clojure.lang.AFn.applyToHelper(AFn.java:156)
at clojure.lang.Var.applyTo(Var.java:700)
at clojure.main.main(main.java:37)
Caused by: clojure.lang.ExceptionInfo: No such var: ex {:form ex/foop, :file "codox/import.clj", :end-column 17, :column 10, :line 6, :end-line 6}
at clojure.core$ex_info.invoke(core.clj:4593)
at clojure.tools.analyzer.passes.jvm.validate$eval18156$fn__18158.invoke(validate.clj:41)
at clojure.lang.MultiFn.invoke(MultiFn.java:229)
at clojure.tools.analyzer.passes.jvm.validate$validate.invoke(validate.clj:265)
at clojure.lang.Var.invoke(Var.java:379)
at clojure.tools.analyzer.passes$compile_passes$fn__17072$fn__17077.invoke(passes.clj:166)
at clojure.tools.analyzer.passes$compile_passes$fn__17072$fn__17079.invoke(passes.clj:168)
at clojure.tools.analyzer.passes$compile_passes$fn__17072$fn__17079.invoke(passes.clj:168)
at clojure.tools.analyzer.passes$compile_passes$fn__17072$fn__17079.invoke(passes.clj:168)
at clojure.core$partial$fn__4529.invoke(core.clj:2500)
at clojure.tools.analyzer.ast$walk$walk__16977.invoke(ast.clj:102)
at clojure.tools.analyzer.ast$walk$walk__16977$walk__16978.invoke(ast.clj:96)
at clojure.tools.analyzer.utils$mapv_SINGLEQUOTE_.invoke(utils.clj:208)
at clojure.tools.analyzer.ast$_update_children$fn__16968.invoke(ast.clj:51)
at clojure.lang.PersistentVector.reduce(PersistentVector.java:333)
at clojure.core$reduce.invoke(core.clj:6518)
at clojure.tools.analyzer.ast$_update_children.invoke(ast.clj:49)
at clojure.tools.analyzer.ast$update_children_reduced.invoke(ast.clj:64)
at clojure.tools.analyzer.ast$walk$walk__16977.invoke(ast.clj:99)
at clojure.tools.analyzer.ast$walk$walk__16977$walk__16978.invoke(ast.clj:96)
at clojure.tools.analyzer.ast$_update_children$fn__16968.invoke(ast.clj:51)
at clojure.lang.PersistentVector.reduce(PersistentVector.java:333)
at clojure.core$reduce.invoke(core.clj:6518)
at clojure.tools.analyzer.ast$_update_children.invoke(ast.clj:49)
at clojure.tools.analyzer.ast$update_children_reduced.invoke(ast.clj:64)
at clojure.tools.analyzer.ast$walk$walk__16977.invoke(ast.clj:99)
at clojure.tools.analyzer.ast$walk$walk__16977$walk__16978.invoke(ast.clj:96)
at clojure.tools.analyzer.ast$_update_children$fn__16968.invoke(ast.clj:51)
at clojure.lang.PersistentVector.reduce(PersistentVector.java:333)
at clojure.core$reduce.invoke(core.clj:6518)
at clojure.tools.analyzer.ast$_update_children.invoke(ast.clj:49)
at clojure.tools.analyzer.ast$update_children_reduced.invoke(ast.clj:64)
at clojure.tools.analyzer.ast$walk$walk__16977.invoke(ast.clj:99)
at clojure.tools.analyzer.ast$walk$walk__16977$walk__16978.invoke(ast.clj:96)
at clojure.tools.analyzer.utils$mapv_SINGLEQUOTE_.invoke(utils.clj:208)
at clojure.tools.analyzer.ast$_update_children$fn__16968.invoke(ast.clj:51)
at clojure.lang.PersistentVector.reduce(PersistentVector.java:333)
at clojure.core$reduce.invoke(core.clj:6518)
at clojure.tools.analyzer.ast$_update_children.invoke(ast.clj:49)
at clojure.tools.analyzer.ast$update_children_reduced.invoke(ast.clj:64)
at clojure.tools.analyzer.ast$walk$walk__16977.invoke(ast.clj:99)
at clojure.tools.analyzer.ast$walk$walk__16977$walk__16978.invoke(ast.clj:96)
at clojure.tools.analyzer.ast$_update_children$fn__16968.invoke(ast.clj:51)
at clojure.lang.PersistentVector.reduce(PersistentVector.java:333)
at clojure.core$reduce.invoke(core.clj:6518)
at clojure.tools.analyzer.ast$_update_children.invoke(ast.clj:49)
at clojure.tools.analyzer.ast$update_children_reduced.invoke(ast.clj:64)
at clojure.tools.analyzer.ast$walk$walk__16977.invoke(ast.clj:99)
at clojure.tools.analyzer.ast$walk.invoke(ast.clj:95)
at clojure.tools.analyzer.ast$postwalk.invoke(ast.clj:115)
at clojure.tools.analyzer.ast$postwalk.invoke(ast.clj:113)
at clojure.tools.analyzer.passes$compile_passes$analyze__17084.invoke(passes.clj:170)
at clojure.core$comp$fn__4495.invoke(core.clj:2438)
at clojure.core$comp$fn__4495.invoke(core.clj:2438)
at clojure.core.typed.analyze_clj$run_passes.invoke(analyze_clj.clj:325)
at clojure.tools.analyzer.jvm$analyze$fn__19686.invoke(jvm.clj:469)
at clojure.lang.AFn.applyToHelper(AFn.java:152)
at clojure.lang.AFn.applyTo(AFn.java:144)
at clojure.core$apply.invoke(core.clj:630)
at clojure.core$with_bindings_STAR_.doInvoke(core.clj:1868)
at clojure.lang.RestFn.invoke(RestFn.java:425)
at clojure.tools.analyzer.jvm$analyze.invoke(jvm.clj:456)
at clojure.core.typed.analyze_clj$analyze_PLUS_eval.invoke(analyze_clj.clj:217)
at clojure.core.typed.analyze_clj$analyze1$fn__19867.invoke(analyze_clj.clj:342)
at clojure.lang.AFn.applyToHelper(AFn.java:152)
at clojure.lang.AFn.applyTo(AFn.java:144)
at clojure.core$apply.invoke(core.clj:630)
at clojure.core$with_bindings_STAR_.doInvoke(core.clj:1868)
at clojure.lang.RestFn.invoke(RestFn.java:425)
at clojure.core.typed.analyze_clj$analyze1.invoke(analyze_clj.clj:340)
at clojure.core.typed.analyze_clj$ast_for_file$fn__19877.invoke(analyze_clj.clj:389)
at clojure.core.typed.analyze_clj$ast_for_file.invoke(analyze_clj.clj:384)
at clojure.core.typed.analyze_clj$ast_for_ns.invoke(analyze_clj.clj:417)
at clojure.core.typed.collect_utils$collect_ns_STAR_.invoke(collect_utils.clj:79)
at clojure.core.typed.collect_phase$collect_ns.invoke(collect_phase.clj:65)
at clojure.core.typed.check_ns_common$check_ns_info$fn__28729$fn__28730.invoke(check_ns_common.clj:72)
at clojure.core.typed.check_ns_common$check_ns_info$fn__28729.invoke(check_ns_common.clj:64)
at clojure.lang.AFn.applyToHelper(AFn.java:152)
at clojure.lang.AFn.applyTo(AFn.java:144)
at clojure.core$apply.invoke(core.clj:630)
at clojure.core$with_bindings_STAR_.doInvoke(core.clj:1868)
at clojure.lang.RestFn.invoke(RestFn.java:425)
at clojure.core.typed.check_ns_common$check_ns_info.doInvoke(check_ns_common.clj:47)
at clojure.lang.RestFn.invoke(RestFn.java:425)
at clojure.lang.AFn.applyToHelper(AFn.java:156)
at clojure.lang.RestFn.applyTo(RestFn.java:132)
at clojure.core$apply.invoke(core.clj:634)
at clojure.core.typed.check_ns_clj$check_ns_info.doInvoke(check_ns_clj.clj:19)
at clojure.lang.RestFn.invoke(RestFn.java:410)
at clojure.lang.AFn.applyToHelper(AFn.java:154)
at clojure.lang.RestFn.applyTo(RestFn.java:132)
at clojure.core$apply.invoke(core.clj:632)
at clojure.core.typed$fn__4754.doInvoke(typed.clj:2275)
at clojure.lang.RestFn.invoke(RestFn.java:410)
at clojure.lang.Var.invoke(Var.java:379)
at codox.reader.clojure$typecheck_namespace.invoke(clojure.clj:25)
at codox.reader.clojure$read_ns.invoke(clojure.clj:96)
at clojure.core$map$fn__4553.invoke(core.clj:2624)
at clojure.lang.LazySeq.sval(LazySeq.java:40)
at clojure.lang.LazySeq.seq(LazySeq.java:49)
at clojure.lang.Cons.next(Cons.java:39)
at clojure.lang.RT.next(RT.java:674)
at clojure.core$next__4112.invoke(core.clj:64)
at clojure.core$concat$cat__4217$fn__4218.invoke(core.clj:707)
at clojure.lang.LazySeq.sval(LazySeq.java:40)
at clojure.lang.LazySeq.seq(LazySeq.java:49)
at clojure.lang.RT.seq(RT.java:507)
at clojure.core$seq__4128.invoke(core.clj:137)
at clojure.core$filter$fn__4580.invoke(core.clj:2679)
at clojure.lang.LazySeq.sval(LazySeq.java:40)
at clojure.lang.LazySeq.seq(LazySeq.java:49)
at clojure.lang.RT.seq(RT.java:507)
at clojure.core$seq__4128.invoke(core.clj:137)
at codox.utils$add_source_paths$iter__53__57$fn__58.invoke(utils.clj:79)
at clojure.lang.LazySeq.sval(LazySeq.java:40)
at clojure.lang.LazySeq.seq(LazySeq.java:49)
at clojure.lang.RT.seq(RT.java:507)
at clojure.core$seq__4128.invoke(core.clj:137)
at codox.main$add_ns_defaults$iter__616__620$fn__621.invoke(main.clj:50)
at clojure.lang.LazySeq.sval(LazySeq.java:40)
at clojure.lang.LazySeq.seq(LazySeq.java:49)
at clojure.lang.Cons.next(Cons.java:39)
at clojure.lang.RT.countFrom(RT.java:614)
at clojure.lang.RT.count(RT.java:604)
at codox.writer.html$namespace_list_type.invoke(html.clj:221)
at codox.writer.html$namespaces_menu.invoke(html.clj:228)
at codox.writer.html$primary_sidebar.doInvoke(html.clj:236)
at clojure.lang.RestFn.invoke(RestFn.java:410)
at codox.writer.html$index_page.invoke(html.clj:283)
at codox.writer.html$write_index.invoke(html.clj:395)
at codox.writer.html$write_docs.invoke(html.clj:410)
at clojure.lang.Var.invoke(Var.java:379)
at codox.main$generate_docs.invoke(main.clj:94)
at user$eval646.invoke(form-init5254500589270806261.clj:1)
at clojure.lang.Compiler.eval(Compiler.java:6782)
at clojure.lang.Compiler.eval(Compiler.java:6772)
at clojure.lang.Compiler.load(Compiler.java:7227)
... 11 more
Error encountered performing task 'codox' with profile(s): 'base,system,user,provided,dev,typed'
Subprocess failed