Fork me on GitHub
#cljs-dev
<
2019-06-13
>
mfikes01:06:46

I shared https://gist.github.com/swannodette/ebd8b65f887318ba68579b6bea911daf at a Clojure meetup tonight... the general notion was well received 🙂

🎉 4
Alex Miller (Clojure team)02:06:06

the regex specs are inherently for working with ordered collections. as such, it's inherently a little weird to support the regex ops on non-ordered collections (like sets) as the order is arbitrary. this was tightened up in the latest versions of spec

Alex Miller (Clojure team)02:06:41

however, this is a case where you are better served by using (s/coll-of vector?) instead

Alex Miller (Clojure team)02:06:13

user=> (s/def ::x (s/coll-of vector?))
:user/x
user=> (s/conform ::x #{[:a]})
#{[:a]}

tomjkidd02:06:23

Thanks Alex, I was just changing to (s/nilable (s/coll-of vector?)) locally

Alex Miller (Clojure team)02:06:36

ah yes, nilable will be good too

Alex Miller (Clojure team)02:06:50

if the output collection is important, you can use the :into clause in coll-of

Alex Miller (Clojure team)02:06:00

otherwise it should match the original value

mfikes23:06:02

"ClojureScript Support for Foreign Libraries via NPM" ?

mfikes23:06:29

Yeah. The story there was that someone wanted to use something from NPM and then unfortunately used :npm-deps

mfikes23:06:21

We should probably mark that compiler option as alpha if not already. (My sense was that there was an expectation that it would just work.)

✔️ 4
mfikes23:06:36

I'll check up and file a site change...

dnolen23:06:13

cool, thanks