Fork me on GitHub
#beginners
<
2023-01-12
>
fadrian13:01:51

I have a Clojure project structured as follows: +mercator | src | mercator | +api-emitters | +dates.clj (containing ns mercator.dates) | +medical_claims.clj (containing ns mercator.medical-claims) | +set.clj (containing ns mercator.set) | +... | +mapper.clj (containing ns mercator.mapper) +primitives.clj (containing ns mercator.primitives) +emitters.clj (containing ns mercator.emitters) +templates (containing ns mercator.templates, referring to ns mercator.dates, mercator.medical-claims, etc.) +... I've got my :paths set up in the project's deps.edn as follows: {:paths ["src" "src/mercator/api-emitters"] ... } But when I try to load mapper.clj, I get the error: ; Evaluating file: mapper.clj ; Syntax error (FileNotFoundException) compiling at (mercator\templates.clj:1:1). ; Could not locate mercator/dates__init.class, mercator/dates.clj or mercator/dates.cljc on classpath. ; Evaluation of file mapper.clj failed: class clojure.lang.Compiler$CompilerException What should I do in my deps.edn file to allow me to reference the clj files in src/mercator/api-emitters from the clj files in src/mercator?

Alex Miller (Clojure team)13:01:20

The paths have to match the namespaces under a root

Alex Miller (Clojure team)13:01:36

So it seems you need to have more sub paths under api-emitters as those do not

fadrian13:01:21

I've now got it working. Thanks for the advice.