I've discovered a weird behaviour which I don't understand and can't seem to fix - it's probably some obvious mistake of my own.
Brief background, I'm trying to integrate cloverage with codox, so that I can show test coverage reports on my documentation pages. Both of these are established, solid, well written packages by respected members of the community.
Cloverage (1.3.0-SNAPSHOT) depends on clojure.tools.cli version 0.4.2. When you start a repl within the cloverage/cloverage directory and attempt to use clojure.tools.cli, no problem:
cloverage.coverage=> (use 'clojure.tools.cli)
nil
Codox 0.10.7 does not depend on clojure.tools.cli, but my mildly modified version of codox does depend on cloverage 1.3.0-SNAPSHOT (that is literally the only change to the codox project.clj). When you start a repl within the codox/codox directory, and attempt to use clojure.tools.cli, you get:
user=> (use 'clojure.tools.cli)
CompilerException java.lang.RuntimeException: No such var: s/starts-with?, compiling:(clojure/tools/cli.cljc:97:8)
OK, so, it's picking up clojure.tools.cli at all presumably via the dependency on cloverage, which is good. but clojure.tools.cli requires clojure.string as `s`, see
so you would have thought this would all work fine.
So what happens if I require clojure.string as `s` in the repl? Well, I get a different error:
user=> (require '[clojure.string :as s])
nil
user=> (use 'clojure.tools.cli)
CompilerException java.lang.Exception: namespace 'clojure.tools.cli' not found, compiling:(/tmp/form-init1843820122884430414.clj:1:1)
So, can anyone explain what is going on here, and how I fix it? it matters to me, because it prevents my code from compiling:
user=> (use 'codox.cloverage-integration.runner :reload)
CompilerException java.lang.RuntimeException: No such var: s/starts-with?, compiling:(clojure/tools/cli.cljc:97:8)
Thanks in advance for any help or thoughts!