This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-12-17
Channels
- # adventofcode (76)
- # announcements (6)
- # beginners (103)
- # boot (28)
- # calva (128)
- # cider (48)
- # cljs-dev (40)
- # clojure (268)
- # clojure-austin (2)
- # clojure-dev (2)
- # clojure-europe (47)
- # clojure-italy (10)
- # clojure-nl (17)
- # clojure-spec (2)
- # clojure-uk (15)
- # clojurescript (45)
- # code-reviews (14)
- # cursive (5)
- # data-science (2)
- # datascript (1)
- # datomic (52)
- # duct (4)
- # emacs (2)
- # figwheel (1)
- # figwheel-main (4)
- # fulcro (13)
- # hyperfiddle (51)
- # leiningen (19)
- # nrepl (40)
- # off-topic (45)
- # pathom (3)
- # pedestal (28)
- # portkey (7)
- # re-frame (25)
- # reagent (76)
- # reitit (7)
- # shadow-cljs (92)
- # slack-help (3)
- # specter (5)
- # timbre (2)
- # tools-deps (39)
- # unrepl (1)
- # vim (13)
When passing some serialized EDN to clj
is that when people use commas instead of spaces to get it regarded as a single argument?
clj -m some.ns '{:my "data"}'
Hi - longtime leiningen user here. I’m on a mac, I am using home brew, but the clj
that gets installed stacktraces miserably
Here is the stacktrace:
$ clj -Sdescribe
Error building classpath. EOF while reading
java.lang.RuntimeException: EOF while reading
at clojure.lang.Util.runtimeException(Util.java:221)
at clojure.lang.EdnReader.readDelimitedList(EdnReader.java:746)
at clojure.lang.EdnReader$MapReader.invoke(EdnReader.java:680)
at clojure.lang.EdnReader.read(EdnReader.java:145)
at clojure.lang.EdnReader.read(EdnReader.java:111)
at clojure.edn$read.invokeStatic(edn.clj:35)
at clojure.edn$read.invoke(edn.clj:14)
at $slurp_edn.invokeStatic(io.clj:29)
at $slurp_edn.invoke(io.clj:22)
at clojure.tools.deps.alpha.reader$slurp_edn_map.invokeStatic(reader.clj:38)
at clojure.tools.deps.alpha.reader$slurp_edn_map.invoke(reader.clj:35)
at clojure.tools.deps.alpha.reader$slurp_deps.invokeStatic(reader.clj:58)
at clojure.tools.deps.alpha.reader$slurp_deps.invoke(reader.clj:54)
at clojure.core$map$fn__5587.invoke(core.clj:2745)
at clojure.lang.LazySeq.sval(LazySeq.java:40)
at clojure.lang.LazySeq.seq(LazySeq.java:49)
at clojure.lang.Cons.next(Cons.java:39)
at clojure.lang.RT.boundedLength(RT.java:1785)
at clojure.lang.RestFn.applyTo(RestFn.java:130)
at clojure.core$apply.invokeStatic(core.clj:659)
at clojure.core$apply.invoke(core.clj:652)
at clojure.tools.deps.alpha.reader$merge_deps.invokeStatic(reader.clj:73)
at clojure.tools.deps.alpha.reader$merge_deps.invoke(reader.clj:70)
at clojure.tools.deps.alpha.reader$read_deps.invokeStatic(reader.clj:78)
at clojure.tools.deps.alpha.reader$read_deps.invoke(reader.clj:75)
at clojure.tools.deps.alpha.script.make_classpath$combine_deps_files.invokeStatic(make_classpath.clj:47)
at clojure.tools.deps.alpha.script.make_classpath$combine_deps_files.invoke(make_classpath.clj:43)
at clojure.tools.deps.alpha.script.make_classpath$run.invokeStatic(make_classpath.clj:68)
at clojure.tools.deps.alpha.script.make_classpath$run.invoke(make_classpath.clj:64)
at clojure.tools.deps.alpha.script.make_classpath$_main.invokeStatic(make_classpath.clj:109)
at clojure.tools.deps.alpha.script.make_classpath$_main.doInvoke(make_classpath.clj:84)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.lang.Var.applyTo(Var.java:702)
at clojure.core$apply.invokeStatic(core.clj:657)
at clojure.main$main_opt.invokeStatic(main.clj:317)
at clojure.main$main_opt.invoke(main.clj:313)
at clojure.main$main.invokeStatic(main.clj:424)
at clojure.main$main.doInvoke(main.clj:387)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.lang.Var.applyTo(Var.java:702)
at clojure.main.main(main.java:37)
What does cat ~/.clojure/deps.edn
show?
when i run clj -Sdescribe
it gives me some output that includes config-files ["/usr/local/lib/clojure/deps.edn" "/home/dan/.clojure/deps.edn" ]
. There are some deps.edn files and it seems like one of these is broken. can you check your equivalent ones
That’s likely the culprit…
$ cat ~/.clojure/deps.edn
;; The deps.edn file describes the information needed to build a classpath.
;;
;; When using the `clojure` or `clj` script, there are several deps.edn files
;; that are combined:
;; - install-level
;; - user level (this file)
;; - project level (current directory when invoked)
;;
;; For all attributes other than :paths, these config files are merged left to right.
;; Only the last :paths is kept and others are dropped.
{
{:aliases
{:new {:extra-deps {seancorfield/clj-new
{:mvn/version "0.5.5"}}
:main-opts ["-m" "clj-new.create"]}
}
;; Paths
;; Directories in the current project to include in the classpath
;; :paths ["src"]
;; External dependencies
;; :deps {
;; org.clojure/clojure {:mvn/version "1.9.0"}
;; }
;; Aliases
;; resolve-deps aliases (-R) affect dependency resolution, options:
;; :extra-deps - specifies extra deps to add to :deps
;; :override-deps - specifies a coordinate to use instead of that in :deps
;; :default-deps - specifies a coordinate to use for a lib if one isn't found
;; make-classpath aliases (-C) affect the classpath generation, options:
;; :extra-paths - vector of additional paths to add to the classpath
;; :classpath-overrides - map of lib to path that overrides the result of resolving deps
;; :aliases {
;; :deps {:extra-deps {org.clojure/tools.deps.alpha {:mvn/version "0.5.460"}}}
;; :test {:extra-paths ["test"]}
;; }
;; Provider attributes
;; :mvn/repos {
;; "central" {:url " "}
;; "clojars" {:url " "}
;; }
}
That's where your EOF is coming from @aaelony -- you're missing a }
@dpsutton right, clojure -Sdescribe
would error if either the system or user level deps.edn had a problem, clojure -Srepro -Sdescribe
would error if it was the system level
{:aliases
{:new {:extra-deps {seancorfield/clj-new
{:mvn/version "0.5.5"}} ; NEED EXTRA } HERE
:main-opts ["-m" "clj-new.create"]}
}
Happy to help! At work we drive everything with clojure
CLI -- we started with Leiningen back in 2011, switched to Boot at the end of 2015, and switched completely to the new CLI stuff this year.
Great - I’ve been mostly using R for the past year++ and getting back into Clojure and updating my toolset from lein
…
Cool. And you can get started with Clojure 1.10 since the "gold" release of that dropped today which greatly improves error reporting in a lot of cases!
yeah - ironically, I didn’t feel the error reporting pain (until just now). The clj
tool is still on 1.9 until it gets released to home brew.
This particular error isn’t going to be any different with 1.10 afaik
The error reporting differences are primarily in the repl and this is just throwing an exception out of the main
It would probably be reasonable to better trap around config file reading and give a better semantic error here
Well, we’ve been supporting back to Clojure 1.8 in tools.deps, which is pre spec
I will probably bump that up soon
But in this case, it didn’t even read so would never be able to do a spec check anyhow