This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-12-20
Channels
- # adventofcode (47)
- # announcements (3)
- # aws (29)
- # bangalore-clj (3)
- # beginners (63)
- # boot (2)
- # braveandtrue (40)
- # calva (34)
- # cider (37)
- # cljs-dev (8)
- # clojars (3)
- # clojure (45)
- # clojure-europe (2)
- # clojure-france (4)
- # clojure-india (2)
- # clojure-italy (44)
- # clojure-japan (4)
- # clojure-nl (39)
- # clojure-serbia (1)
- # clojure-spec (21)
- # clojure-uk (75)
- # clojurescript (28)
- # cursive (24)
- # data-science (3)
- # datomic (31)
- # emacs (13)
- # fulcro (35)
- # hoplon (21)
- # jobs-discuss (66)
- # nrepl (18)
- # off-topic (72)
- # pathom (35)
- # re-frame (20)
- # reagent (54)
- # shadow-cljs (35)
- # spacemacs (9)
- # specter (8)
- # sql (13)
- # testing (9)
- # tools-deps (21)
- # vim (3)
It would be nice if clj show invalid edn parsing errors
I think there is a ticket for that, it's been mentioned. I think one would be welcome if you can't find one, if you can, a vote helps prioritize.
I was planning to look at that for the next release
but there are limits to what we can do other than say “the edn is invalid”
since the edn file is a map, it either will read the whole thing, or it will fail (if you miss a brace for example)
and bang for the buck i suppose. EOF encountered while ... is the current message, right?
@alexmiller is this the same behaviour as for Clojure? Could we look at something like the figwheel error tool?
I’m planning to catch this case and make the error message better (and skip the stack trace) but it’s probably not going to actually help you in a lot of cases
sorry, don’t have context on figwheel
I think figwheel can print out a snippet and give you an ASCII arrow pointing at the error.
the errors I see reported are almost always invalid edn (usually a missing brace), not a valid map that is invalid
I think figwheel is doing that with spec-like validation on invalid values, but that’s not the error I’m describing
we have specs and (if we bump the min clojure version) can check the read map against the specs to get that, but again, that’s not where I see most issues
I was bitten by Map literal must contain an even number of forms. Even on a modest file size it's very pratical to be pointed to the exact spot. I've downloaded diogo149/lein-edn-validator to help me find .
@dominicm tons of issues. ppl are using tools.dep. That's good!
@alexmiller figwheel also does something with the data coming out of cljs compiler, and can information related to this. I suppose in theory tdeps can be even smarter if the data was available from clojure.edn
https://github.com/diogo149/lein-edn-validator/blob/master/src/leiningen/edn_validator.clj interesting approach.
Well, I’m not planning to do that