This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-01-10
Channels
- # adventofcode (3)
- # aws (2)
- # beginners (85)
- # boot (8)
- # boot-dev (4)
- # cider (36)
- # clara (3)
- # cljs-dev (87)
- # cljsrn (3)
- # clojure (87)
- # clojure-austin (12)
- # clojure-brasil (1)
- # clojure-dev (8)
- # clojure-dusseldorf (5)
- # clojure-estonia (5)
- # clojure-greece (4)
- # clojure-italy (3)
- # clojure-spec (17)
- # clojure-uk (55)
- # clojurescript (70)
- # core-logic (2)
- # cursive (6)
- # data-science (18)
- # datomic (13)
- # emacs (34)
- # fulcro (347)
- # graphql (12)
- # hoplon (6)
- # jobs (3)
- # jobs-discuss (43)
- # juxt (2)
- # keechma (31)
- # leiningen (29)
- # lumo (2)
- # midje (2)
- # off-topic (118)
- # om-next (4)
- # onyx (39)
- # pedestal (6)
- # re-frame (85)
- # reagent (21)
- # remote-jobs (3)
- # ring (5)
- # rum (2)
- # shadow-cljs (126)
- # spacemacs (1)
- # sql (6)
Accidentally had the symbol "true" inside a boot comp task. Took me 2 hours to find it, because this is the error I got:
Starting reload server on
java.lang.Thread.run Thread.java: 748
java.util.concurrent.ThreadPoolExecutor$Worker.run ThreadPoolExecutor.java: 624
java.util.concurrent.ThreadPoolExecutor.runWorker ThreadPoolExecutor.java: 1149
java.util.concurrent.FutureTask.run FutureTask.java: 266
...
clojure.core/binding-conveyor-fn/fn core.clj: 2022
boot.core/boot/fn core.clj: 1031
boot.core/run-tasks core.clj: 1021
clojure.core/comp/fn core.clj: 2561 (repeats 7 times)
java.lang.ClassCastException: java.lang.Boolean cannot be cast to clojure.lang.IFn
clojure.lang.ExceptionInfo: java.lang.Boolean cannot be cast to clojure.lang.IFn
line: 265
Because I'm using system.repl and component, was really hard to diagnose 😕
Hoping spec can help heredid “line: 265” point to the line of the error? would be curious if the non-prettified version of this is actually a better locator
thx but no, line: 265 is not from my build.boot file
I would expect that to refer to a line of code but I’m not sure in what file
a spec for comp
would detect this. you can try it yourself!
@petrus for the non-prettified version use boot -vv
user=> (require '[clojure.spec.alpha :as s] '[clojure.spec.test.alpha :as stest])
nil
user=> (s/fdef clojure.core/comp :args (s/* ifn?) :ret ifn?)
clojure.core/comp
user=> (stest/instrument 'clojure.core/comp)
[clojure.core/comp]
user=> (comp count true)
ExceptionInfo Call to #'clojure.core/comp did not conform to spec:
In: [1] val: true fails at: [:args] predicate: ifn?
clojure.core/ex-info (core.clj:4739)
spec is awesome. Is there work happening to spec out all the core fn's like this?
spec is awesome. Is there work happening to spec out all the core fn's like this?
thx but no, line: 265 is not from my build.boot file