From cdb9cc431ae2430296c13cccb027231e43a1bcf6 Mon Sep 17 00:00:00 2001 From: Martin Klepsch Date: Thu, 18 Oct 2018 11:18:49 +0200 Subject: [PATCH] Fix duplicate namespaces Author: @martinklepsch When there are multiple files (e.g. .clj and .cljc) for a namespace Codox would analyse those namespaces twice returning the analysis result twice as well. https://github.com/cljdoc/codox/commit/3f2ea84ae5e27e6f527b38bbc8d8fcecc24fe47f https://github.com/cljdoc/cljdoc/issues/155 --- codox/src/codox/reader/clojure.clj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/codox/src/codox/reader/clojure.clj b/codox/src/codox/reader/clojure.clj index f37346c0..119f2e80 100644 --- a/codox/src/codox/reader/clojure.clj +++ b/codox/src/codox/reader/clojure.clj @@ -116,8 +116,8 @@ (defn- find-namespaces [file] (cond - (.isDirectory file) (ns/find-namespaces-in-dir file) - (jar-file? file) (ns/find-namespaces-in-jarfile (JarFile. file)))) + (.isDirectory file) (set (ns/find-namespaces-in-dir file)) + (jar-file? file) (set (ns/find-namespaces-in-jarfile (JarFile. file))))) (defn read-namespaces "Read Clojure namespaces from a set of source directories (defaults