Fork me on GitHub
#re-frame
<
2018-01-29
>
caleb.macdonaldblack06:01:50

Can query-v be passed into input signals when using the :<- [:sub] notation?

caleb.macdonaldblack06:01:44

Going to answer my own question here with no. Looking at the source:

(let [[marker vec] input-args]
  (when-not (= :<- marker)
    (console :error err-header "expected :<-, got:" marker))
  (fn inp-fn
    ([_] (subscribe vec))
    ([_ _] (subscribe vec))))

danielcompton06:01:58

@caleb.macdonaldblack if you want to do fancier things you can just pass a subscription function

danielcompton06:01:01

as the first arg

caleb.macdonaldblack06:01:23

@danielcompton I ended up working that out. Cheers. It’s really cool that we can do this with subs. Makes things much simpler and more efficient!

caleb.macdonaldblack06:01:34

@danielcompton What is the dynamic-vec used for?

(fn [query-vec dynamic-vec]
         [(subscribe [:a-sub])
          (subscribe [:b-sub])])

caleb.macdonaldblack06:01:06

I think it returned nil when I logged it

mikethompson07:01:00

@caleb.macdonaldblack use of dynamic-vec is pretty much deprecated these days (because it is unneeded)

mikethompson07:01:25

I could explain it ... but then I'd just have to tell you to forget everything I'd just said :-)

pablore14:01:33

I’m having this error when getting the dependencies for a lein re-frame project: Exception in thread "main" java.lang.ClassNotFoundException: javax.xml.bind.DatatypeConverter, compiling:(cljs/util.cljc:1:1)

pablore15:01:26

I googled it and this error is all over the place when building java tools, not only clojure

pablore15:01:04

So it appears is a Java 9 vs figwheel issue https://github.com/bhauman/lein-figwheel/issues/612

mikerod15:01:56

Yeah, I think this is a pretty popular problem that is faced right now in trying to use Java9

danielcompton20:01:01

Yep, I wrote https://www.deps.co/blog/how-to-upgrade-clojure-projects-to-use-java-9/ with a full set of upgrade instructions for Java 9 use

pablore15:01:27

So adding :jvm-opts ["--add-modules" "java.xml.bind"] to project.clj fixed it

pablore15:01:44

Thanks Google

andrzejsliwa13:01:04

:jvm-opts ["-XX:+IgnoreUnrecognizedVMOptions" "--add-modules java.xml.bind"] 
This should work on 7,8,9 without modification