This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-05-20
Channels
- # beginners (49)
- # boot (139)
- # cider (10)
- # clojure (82)
- # clojure-belgium (59)
- # clojure-dusseldorf (5)
- # clojure-russia (11)
- # clojure-sanfrancisco (2)
- # clojure-uk (56)
- # clojurebridge (4)
- # clojurescript (138)
- # cursive (19)
- # datomic (8)
- # dirac (1)
- # editors (11)
- # emacs (18)
- # flambo (21)
- # hoplon (45)
- # jobs (1)
- # juxt (3)
- # keechma (1)
- # mount (43)
- # off-topic (2)
- # om (64)
- # om-next (1)
- # onyx (2)
- # other-languages (8)
- # re-frame (72)
- # reagent (99)
- # ring-swagger (7)
- # rum (3)
- # spacemacs (21)
- # specter (5)
- # untangled (42)
- # vim (4)
- # yada (7)
hm, ok. I’ll try it again in the morning, might just have been a glitch on my side — tried going back and forth a few times and thought I could reproduce it. some sleep and a night away from the machine might help 🤓
There's definitely something bad going on here, just not sure what - checking development mode again to make sure I'm not crazy, but it seems to work there
@ethangracer: just in case it helps we were able to consistently see the post-mutations not fire when we had advanced compilation on, and post-mutations consistently worked when we turned off the advanced compilation
ok in our app post-mutations work for optimizations none, whitespace, and simple. only advanced seems to break it
@currentoor @therabidbanana thanks for the help troubleshooting. I thought we werent using advanced compilation on our dev build but I'll double check tomirriw. Any theories on why? That's just bizarre
well it could be that we have a different error than you and it gets exposed by the same recent code?
i’m verifying wether we can get post-mutations (for existing stuff so no tempids) on 0.4.8 with advanced compilation
nevermind i get the same error on 0.4.8
must be something wrong on our side as well
well for us the fix was changing (om/ident table/Widget widget)
to [:widget/by-id (:db/id widget)]
inside a mutation
the fact that this only happens with advanced compilation suggests it might be a bug in om/ident
we probably shouldn’t use om/ident
anyway...
anyway, the latest snapshot appears to handle post-mutations, with tempids, fine for us (though as @therabidbanana said we only have one simple usecase for them)
@currentoor: you should use om/get-ident
instead, makes it a tad easier to get the ident
ok @currentoor @therabidbanana @tony.kay confirmed the bug — has to do with post-mutations when parallel loading is true. see lines 58 and 87 in impl.data-fetch
. notice on line 87 that items-to-load, which is a vector of data states, is being put inside another vector. On line 58, item
, which is a singular data-state, is put in one vector (missing that second level of nesting).
working on a patch now
@therabidbanana would it be ok to re-write impl.data-fetch:47
as:
(action resp args)
… in which case we might be able to get rid of the whole action-with-args function? It looks like args
is always supposed to be a vector of data states that is passed directly to the loaded-callback. not understanding why an apply is neededif not, it’s simple enough to wrap item
on line 58 in another vector — just not as clean of a solution as I’d like
@ethangracer: thanks for the tip! And good job on figuring it out.
My only reasoning for using action-with-args was to allow existing requests in the queue that don't define callback-args to be called with the correct argument-arity. I wasn't sure if there would be other places where requests get pushed on that need to-load to take a single argument.
It's javascript under the hood, so I think maybe arity doesn't matter?
I didn't want to assume that all to-load callbacks would be okay with receiving a new second args argument though
so, have you pushed a fix @ethangracer ?
OK, so I did a patch that simplified the code quite a bit. testing now, but it is up on clojars as well
@tony.kay: confirmed working on insight — good to go, thanks
@therabidbanana and thank you for finding the tempid remap issue in the first place because that solved another bug for us 😄
Glad to hear it was helpful, even if I broke a bunch of stuff. 🙂
ah, we just need to standardize a set of post integration tests for network layer stuff
We have CI builds that take screenshots of all of our devcards. I wonder if you could set up something similar to just load each cookbook and screenshot the initial page to get some idea that the various stuff still works
You guys getting checkouts-like stuff going so you can verify against a real app would be good too
we also need behavioral tests on more of this layer...it is one of the critical spots that has no tests...
I think we found we can just symlink the untangled client source directory into our source dir and get builds complete with hot code reloading, which should be helpful testing new commits in our app moving forward
So, I've updated todomvc to latest versions on develop. I had to do some project file tweaks t oget advanced optimization working on production build...running it now and it looks perfect. Single 195k download.