Fork me on GitHub
#clojure-spec
<
2017-10-03
>
dbushenko11:10:48

I'm specifying an anonymous function, and its return value does not match the spec. Instead of normal error report or something it says like this: clojure.lang.ExceptionInfo: Can't convert path {:form (#function[.../fn--20377/fn--20384]), :val {}, :in [0], :in' []}

dbushenko11:10:56

is it normal or I'm doing something wrong?

bbrinck21:10:38

It sounds like a bug in Expound? https://github.com/bhb/expound/blob/b9fc0d46dc3534bd77cdfebcf771cfecf163f058/src/expound/paths.cljc#L160-L166 If you have a repro and some time, a bug report would be appreciated šŸ™‚

dbushenko15:10:46

sorry? do you want a gist?

Alex Miller (Clojure team)15:10:45

yeah, want to know how to reproduce that error

Alex Miller (Clojure team)15:10:05

and then if you can follow it with a (pst *e)

dbushenko15:10:41

what is this (pst *e) ?

guy15:10:55

previous stack trace ?

guy15:10:04

my guess

Alex Miller (Clojure team)15:10:18

it is a function in clojure.repl

dbushenko15:10:30

know what, looks like spec went ok, it was test who produced this strange error report...

Alex Miller (Clojure team)15:10:36

good, because I didnā€™t know where the ā€œconvert pathā€ error was coming from :)

dbushenko15:10:35

@alexmiller are there any plans to support specing the protocol implementations in records?

Alex Miller (Clojure team)15:10:38

not near term. If you could spec them, Iā€™m not sure you have the opportunity to actually do useful stuff with those specs.

dbushenko15:10:03

@alexmiller maybe you remember I tried to invite you to our conf in December and you couldn't make it šŸ™‚ Can you probably recommend someone from clojure core developers who might be able to visit us with a talk?

Alex Miller (Clojure team)15:10:07

lots of fine people - take a look at any of the recent clojure confs (EuroClojure, Clojure/west, Clojure/conj, ClojureX, clojureD, clojuTRE, etc)

Alex Miller (Clojure team)15:10:44

maybe post something here in #events, on the mailing list, on the reddit, etc

jonas18:10:26

Is there a function in spec similar to spec/assert but that conforms the value? (spec/assert ::a-spec x) returns x (or throws) and not the conformed value of x.

jonas18:10:21

Perhaps the reason is that you can set *compile-asserts* to false which results in all assertions to compile to x?

souenzzo18:10:46

instrument?

bfabry18:10:02

@jonas that would seem like a good reason why that wouldn't work