Skip to content

Commit

Permalink
Also consider cljc files for namespaces-on-classpath
Browse files Browse the repository at this point in the history
  • Loading branch information
eval committed Jun 15, 2023
1 parent 42c4c1d commit 97a32f4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/compliment/utils.clj
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ Note that should always have the same value, regardless of OS."
(let [classpath (classpath)]
(cache-last-result ::namespaces-on-classpath classpath
(set (for [^String file (all-files-on-classpath classpath)
:when (and (.endsWith file ".clj")
:when (and (or (.endsWith file ".clj") (.endsWith file ".cljc"))
(not (.startsWith file "META-INF")))
:let [[_ ^String nsname] (re-matches #"[^\w]?(.+)\.clj" file)]
:when nsname]
Expand All @@ -208,7 +208,8 @@ Note that should always have the same value, regardless of OS."
(cache-last-result ::project-resources classpath
(for [path classpath
^String file (list-files path false)
:when (not (or (empty? file) (.endsWith file ".clj")
:when (not (or (empty? file)
(.endsWith file ".clj") (.endsWith file ".cljc")
(.endsWith file ".jar") (.endsWith file ".class")))]
;; resource pathes always use "/" regardless of platform
(.. (if (.startsWith file File/separator)
Expand Down

0 comments on commit 97a32f4

Please sign in to comment.