I need to split the namespace between my Clojure (garden) and my ClojureScript (reagent).
Currently, the project folder is as follows:
src/ clj/ name/ css.clj cljs/ name/ core.cljs cljc/ name/ config.cljc
The config.cljc file has the following namespace: (ns name.config) .
I tried to reference this namespace from within clj/name/css.clj with the requirement.
(ns name.css (:require [name.config :as config]))
However, this leads to a compilation error from Garden.
Called: java.io.FileNotFoundException: Could not find the name / config __init.class or the name /config.clj in the classpath.
I assume that he did not even check cljc files.
I added "src/cljc" to the vector :source-paths in project.clj and :garden :builds , but I get the same error even after restarting the build processes.
I see this behavior on Clojure 1.7.0 and 1.8.0.
It is also worth noting that it works without problems in ClojureScript (with Figwheel processing the assembly). I can easily use and use the new namespace.
It seems like I should be missing out on something really simple, because no documentation around .cljc files even needs to be mentioned.
clojure clojurescript
Dan prince
source share