This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-05-31
Channels
- # announcements (8)
- # babashka (8)
- # beginners (13)
- # biff (1)
- # calva (1)
- # cider (12)
- # clj-kondo (16)
- # cljs-dev (3)
- # cljsrn (14)
- # clojure (18)
- # clojure-austin (2)
- # clojure-czech (3)
- # clojure-europe (54)
- # clojure-germany (5)
- # clojure-nl (1)
- # clojure-norway (2)
- # clojure-spec (4)
- # clojure-survey (2)
- # clojure-uk (1)
- # clojured (15)
- # clojurescript (5)
- # conjure (6)
- # core-async (65)
- # cursive (24)
- # data-science (1)
- # emacs (9)
- # events (3)
- # graphql (5)
- # integrant (6)
- # jobs (2)
- # joyride (62)
- # lsp (5)
- # malli (10)
- # off-topic (20)
- # pathom (57)
- # polylith (18)
- # re-frame (12)
- # remote-jobs (3)
- # rewrite-clj (14)
- # sci (2)
- # shadow-cljs (41)
- # sql (9)
- # tools-deps (68)
Hi, I hope this is the right place to ask this. I work with a Leiningen project and I wanted to try out https://github.com/nextjournal/clerk. It keeps complaining about missing dependencies (e.g. can't find tools.reader
on the classpath which seems to be a transient dependency via edamame
) when it's required and after a while I realized that it seems to work when used with tools.deps
. Could anybody help me understand why it wouldn't work as a dependency in Leiningen and maybe how to get it working there? Currently it's not really an option to switch.
What error exactly you get when you try to run it and what your dependency tree looks like? (lein deps :tree)
The error is
user=> (require '[nextjournal.clerk :as clerk])
Execution error (FileNotFoundException) at edamame.impl.parser/eval45481$loading (parser.cljc:1).
Could not locate clojure/tools/reader/impl/inspect__init.class, clojure/tools/reader/impl/inspect.clj or clojure/tools/reader/impl/inspect.cljc on classpath.
The output of lein deps :tree
is massive and it won't grep easily. But thank you for the hint, there might actually be some conflict there. I found a line like this
Consider using these exclusions:
[io.github.nextjournal/clerk "0.7.418" :exclusions [log4j org.clojure/tools.reader]]
[vlaaad/reveal "1.3.273" :exclusions [log4j org.clojure/tools.reader]]
[com.layerware/hugsql "0.5.1" :exclusions [log4j org.clojure/tools.reader]]
Reveal works without issues thoughThis is the output for clerk
[io.github.nextjournal/clerk "0.7.418" :exclusions [[log4j]]]
[babashka/fs "0.1.3"]
[borkdude/edamame "0.0.11"]
[com.nextjournal/beholder "1.0.0"]
[io.methvin/directory-watcher "0.15.0"]
[net.java.dev.jna/jna "5.7.0"]
[hiccup "2.0.0-alpha2"]
[http-kit "2.5.3"]
[io.github.nextjournal/markdown "0.3.69"]
[applied-science/js-interop "0.2.6"]
[appliedscience/js-interop "0.2.6-MOVED"]
[org.graalvm.js/js-scriptengine "21.3.0"]
[org.graalvm.js/js "21.3.0"]
[com.ibm.icu/icu4j "69.1"]
[org.graalvm.regex/regex "21.3.0"]
[org.graalvm.sdk/graal-sdk "21.3.0"]
[org.graalvm.truffle/truffle-api "21.3.0"]
[lambdaisland/uri "1.11.86"]
[mvxcvi/multihash "2.0.3"]
[mvxcvi/alphabase "1.0.0"]
[org.clojure/java.classpath "1.0.0"]
[org.clojure/tools.analyzer.jvm "1.1.0"]
[org.clojure/tools.analyzer "1.0.0"]
[org.ow2.asm/asm "5.2"]
[rewrite-clj "1.0.699-alpha"]
[weavejester/dependency "0.2.1"]
It looks like edamame is using tools.reader 1.3.4: https://github.com/borkdude/edamame/blob/master/project.clj#L12
But perhaps that exclude prevents tools.reader from being on the classpath - you can try lein classpath
too.
I had some wrong ideas about the dependencies in Clojure, I got it working now. Thanks a lot for your help!
…and at the same time you should not need mutexes in everyday Clojure programming