This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-10-21
Channels
- # aleph (5)
- # aws (3)
- # bangalore-clj (1)
- # beginners (8)
- # boot (198)
- # cider (4)
- # cljsjs (5)
- # cljsrn (2)
- # clojure (14)
- # clojure-argentina (1)
- # clojure-dusseldorf (8)
- # clojure-greece (29)
- # clojure-italy (10)
- # clojure-japan (1)
- # clojure-poland (4)
- # clojure-russia (8)
- # clojure-spec (51)
- # clojure-uk (8)
- # clojurescript (97)
- # cursive (4)
- # datomic (6)
- # emacs (2)
- # events (2)
- # figwheel (3)
- # hoplon (32)
- # lein-figwheel (5)
- # leiningen (1)
- # luminus (2)
- # off-topic (29)
- # om (109)
- # other-languages (38)
- # proton (3)
- # re-frame (3)
- # ring (1)
- # slack-help (10)
- # testing (1)
- # uncomplicate (1)
- # untangled (21)
- # vim (10)
- # yada (11)
@anmonteiro It would be fantastic if you could have a look at this question that I have struggled with for quite a while now. I'm trying to do my own union routing to increase my control and understanding of how it all works, but I have this problem getting the remotes working. If you look at the comments in the code you can see that I've had some success with a couple of solutions, but never got it all working. https://github.com/molst/om-routing-with-union-query
@anmonteiro The main question is in the Readme
@molstt sorry a bit tied up with some stuff, might have to wait until the weekend
is it possible to make a component with a query and ident that can be dynamically injected with different render functions? I have an identical set of props that I want to render in several different ways in the app, but I don’t want to copy the query and ident into several different components
@ethangracer depends when you want to “dispatch” the different render fns
a single component that dispatches at render time based on some heuristic would work
or you could use ui
to dispatch at component creation time
it would have to be at component creation time — the props would be identical at render so can’t dispatch that way. by ui
do you mean an anonymous component?
know of a good snippet using ui
?
@ethangracer it’s just like defui
. here’s one:
(ui
static om/IQuery
(query [this]
[:foo]))
(except you don’t give it a name)
@ethangracer here’s another one: https://github.com/compassus/compassus/blob/master/src/main/compassus/core.cljc#L25
@anmonteiro interesting, i’ll play with that a bit. thanks
have fun!
When using :send
, what is the format for the server response? Is that documented anywhere?
after updating cljs to 1.9.293
and om to alpha47
I'm getting this when trying to compile:
initially I though was untangled issue, but seems more like to be Om issue when untangled tries to load it
@wilkerlucio if the problem is the warning, you can disable them in Figwheel
it should of course be fixed in om.dom
, we need to exclude that new cljs.core
var
Stupid question - can someone tell me what the read
should look like for this example: http://stackoverflow.com/a/35680798/25538
@anmonteiro I don't think this is the case, this is not on update, it's on compiling, even using lein cljsbuild
I can't compile with cljs 1.9.293
, full trace on the lein process:
it works if I revert the cljs version
@wilkerlucio I would check what transit versions are in your classpath first of all
@anmonteiro checked my path, those are the versions:
[com.cognitect/transit-clj "0.8.290"] [com.cognitect/transit-java "0.8.316"] [com.cognitect/transit-js "0.8.846"] [com.cognitect/transit-cljs "0.8.239"]
@wilkerlucio sure? is that what lein deps :tree
outputs?
or boot show -d
@wilkerlucio does it work without :parallel-build
?
let me try
@anmonteiro same thing with :parallel-build false
@wilkerlucio probably worth bringing it up in #cljs-dev then. I can’t help you more right now
ok, thanks for the support so far
I'll try to reduce it to a minimal case before ask more on it
@wilkerlucio one last attempt to debug what might be going on would be:
remove transit-clj from your project and compile it with :cache-analysis true
I’d be interested to see the .edn
analysis file for that namespace that’s failing
@anmonteiro ok, so you mean I add the transit-clj
into the untangled
:excludes
?
I don’t know, but make it so that transit-clj
is not in the classpath at all
I'm not sure how to do that, since transit-clj is a dependency of untangled, and I need untangled to compile (and the namespace that's crashing is also part of untangled)
transit-clj
shouldn’t be an untangled client dependency right?
maybe shouldn't, but currently it is
@wilkerlucio what I mean is, the client is supposed to be ClojureScript
so you can compile that without a transit-Clojure dep
yes, I just don't know how to remove the transit-clj
, it's not part of my project either
on the tree it comes all as untangled-client
dependencies
I have the transit-cljs
as my dependency (my server side is cljs as well), when I remove it, it just goes under untangled-client
dependencies
ah, sorry, not untangled, it's an Om dependency
ok, seems to be removed, trying again
@anmonteiro removing transit-clj
makes Om fails to compile:
Hi there. It's funny, I joined this channel basically to ask what @jonsmock asked an hour ago. I tried (assoc ast :query-root true)
, but process-roots doesnt re-root my query. Is there a working example for this?
Seems to be working on the read side, but I haven’t gotten my example entirely working
i read through this code yesterday, and it made me (i think) basically understand how to write parser code
but process-roots
does not return a re-rooted-query
, just query
, which is the same as my original query
i am using the compassus library and at the route level the parser returns { target (assoc-in ast [:query] (parser env query target)) }
then the actual component query is parsed to { :remote (assoc ast :query-root true) }
(if-let [page-data (:account/index @state)] {:value page-data} (recurse-remote env k true) ))
don’t you have code highlighting?!?
@charliekilo stop trolling me 😉
No, but I did comment out the “then” branch in descend, because I didn’t know about the moving of om/ident?
https://github.com/omcljs/om/blob/ee4c7ac33934fcd9b3ea663045ced1408dd7df24/src/main/om/util.cljc#L20
so any ideas how the :query-root flag actually travels to the send function? I am wondering since send doesnt get an ast, but just the query, and there is no trace of :query-root in the query it receives. Is it some Clojurescript metadata magic?
I know the queries returned by components have meta data about the components and stuff
hmmm... that might be my problem, because in my case there doesn't seem to be any metadata on any node of the query
na, it's there, i was printing it wrong. The query that lands in send is [{:app/home [^{:query-root true} (:google-signin/current-user)]}]
and i would like to re-root it to [:google-signin/current-user]
, without the :app/home
Is there a way to elide the logging of transaction in dev?
@currentoor easiest way is to set :logger
to nil in the reconciler
@anmonteiro I was hoping to just set a character limit so small log lines would still show up.
Would setting :logger
to nil just disable logging completely?
you could probably use your own logger as well that only logs messages up to a certain character limit
I’d look in Closure Library’s goog.log
namespace
probably also more trouble than it’s worth, but that’s not up to me to decide 🙂
Then just pass that in as :logger
?
Thanks!