This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-08-05
Channels
- # announcements (1)
- # babashka (3)
- # beginners (4)
- # calva (9)
- # cider (12)
- # clj-kondo (53)
- # clojure (64)
- # clojure-austin (1)
- # clojure-dev (3)
- # clojure-europe (4)
- # clojure-norway (3)
- # clojurescript (8)
- # conjure (11)
- # datalevin (47)
- # datomic (28)
- # emacs (7)
- # gratitude (2)
- # hyperfiddle (74)
- # introduce-yourself (1)
- # kaocha (6)
- # lsp (13)
- # malli (5)
- # off-topic (1)
- # practicalli (1)
- # re-frame (31)
- # shadow-cljs (24)
- # tools-build (4)
- # vim (2)
- # yamlscript (8)
I need some help with ideas around why Calva’s node-library fails to compile when I try to use a cljfmt version later than 0.9.2
. More details in 🧵
The error (I truncated the very long stack-trace):
❯ npx shadow-cljs compile :calva-lib
shadow-cljs - config: /Users/pez/Projects/calva/shadow-cljs.edn
shadow-cljs - starting via "clojure"
[:calva-lib] Compiling ...
------ ERROR -------------------------------------------------------------------
File: jar:file:/Users/pez/.m2/repository/dev/weavejester/cljfmt/0.11.2/cljfmt-0.11.2.jar!/cljfmt/core.cljc
failed to require macro-ns "cljfmt.core", it was required by "cljfmt.core"
Error in phase :compile-syntax-check
RuntimeException: No such var: z/of-node
clojure.lang.Util.runtimeException (Util.java:221)
It seems to be something specific we do in Calva, because I fail to reproduce it in a minimal project.
• Repoduction-attempt: https://github.com/PEZ/cljs-node-script
• Calva shadow-cljs.edn: https://github.com/BetterThanTomorrow/calva/blob/dev/shadow-cljs.ednUmmm, realizing I don’t know how to try that. Thought it might be zprint bringing in something, but adding that to the dependency of the repro-attempt didn’t provoke the error…
this is also a clojure error, so you can probably reproduce it via clj -A:whatever:aliases
Is it under the cljfmt node I should check? The repro:
dev.weavejester/cljfmt 0.11.2
. org.clojure/tools.cli 1.0.219
. org.clojure/tools.reader 1.3.6
. com.googlecode.java-diff-utils/diffutils 1.3.0
. rewrite-clj/rewrite-clj 1.1.47
Calva:
dev.weavejester/cljfmt 0.11.2
. org.clojure/tools.cli 1.0.219 :newer-version
. org.clojure/tools.reader 1.3.6
. com.googlecode.java-diff-utils/diffutils 1.3.0
. rewrite-clj/rewrite-clj 1.1.47
Yeah:
❯ clj
Clojure 1.10.3
user=> (require '[ :as io])
nil
user=> (io/resource "rewrite_clj/zip.cljc")
#object[java.net.URL 0xaa5455e "jar:file:/Users/pez/.m2/repository/org/clojars/liverm0r/dartclojure/0.1.10-SNAPSHOT/dartclojure-0.1.10-SNAPSHOT.jar!/rewrite_clj/zip.cljc"]
I had
rewrite-clj/rewrite-clj {:mvn/version "1.0.767-alpha"}
Updated it to the latest 1.1.47. Published https://clojars.org/org.clojars.liverm0r/dartclojure/versions/0.2.16-SNAPSHOTThanks! It works, I get some warnings and will DM you about those. However, maybe this is the place for me to ask about wether this needs to be solved in a more permanent way? It seems like you suggest the bundling is avoidable, @U05224H0W?
yes, you are not supposed to publish uberjars to clojars. you just publish your own sources and properly declare your dependencies.