clojure.string/starts-with? was added in Clojure 1.8.0, I see 1.7.0 in the project.clj?
See https://github.com/clojure/clojure/blob/b1b88dd25373a86e41310a525a21b497799dbbf2/src/clj/clojure/string.clj#L362 What exactly else is going on I don't know but it all starts from the wrong Clojure version. HTH On Monday, June 14, 2021 at 2:21:04 PM UTC+2 Simon Brooke wrote: > > 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 > > https://github.com/clojure/tools.cli/blob/master/src/main/clojure/clojure/tools/cli.cljc#L12 > > 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) > > In case anyone's interested, my current diff with respect to weavejester's > current codox is here: > https://github.com/simon-brooke/codox/commit/ef4ba70659c768f1aab4bfbf32efdaa48e9c43a8 > > Thanks in advance for any help or thoughts! > > > -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/clojure/67ca8def-3a52-4126-a969-b92577942c53n%40googlegroups.com.