Fork me on GitHub
#fulcro
<
2018-05-31
>
levitanong09:05:22

@tony.kay Running into issues with merge!. complaining about derefing the state map. (it should be an atom) The problem appears to be because of https://github.com/fulcrologic/fulcro/blob/master/src/main/fulcro/client/mutations.cljc#L207 Where it’s derefing the state atom and passing it to merge*, which itself passes to merge-novelty!, which seems to expect a state atom rather than a state map.

mitchelkuijpers13:05:44

Is there a way in fulcro to make a mutation :parallel just like loads?

tony.kay14:05:42

@levitanong hm. when did that get broken?

levitanong14:05:19

Since I updated to 2.5.5 from 2.5.3

tony.kay14:05:45

@wilkerlucio I think that merge change was in your patch?

tony.kay14:05:13

and it looks incorrect to me as well

tony.kay14:05:22

but perhaps just on the get-query line

wilkerlucio14:05:22

humm, weird, it might be

tony.kay14:05:42

not sure how that passed any tests

wilkerlucio14:05:03

I'm trying to look at the PR to see what we missed something: https://github.com/fulcrologic/fulcro/pull/191/files

tony.kay14:05:24

line 1841 of primitives should not deref

tony.kay14:05:14

1824 in that PR

tony.kay14:05:52

well, actually, the name merge-novelty has a !, but I think thats just a misnomer perhaps

tony.kay14:05:22

since it obviously just threads state through functions that take a map

tony.kay14:05:28

this stuff needs specs badly

tony.kay14:05:20

I’m still not sure why it isn’t crashing for everyone…

tony.kay14:05:34

@levitanong try 2.5.6-SNAPSHOT.

tony.kay14:05:47

@wilkerlucio I think it was just that one deref

wilkerlucio14:05:37

cool, thanks for looking it up

tony.kay14:05:01

if anyone else could try out 2.5.6-SNAPSHOT that would be appreciated. I’d like to release an update with the fix ASAP

tony.kay14:05:23

that’s a pretty central function. Not sure why it is (mostly) working. I’ve been using 2.5.5 for a week at least daily

wilkerlucio14:05:42

yeah, it's weird, I've been using it here too, and got no problems reported

tony.kay14:05:56

oh, I guess it only would hit if query was nil

tony.kay14:05:49

so a load or merge where “root” was assumed to be the merge target

tony.kay14:05:58

probably not a load

tony.kay14:05:10

anyway…none of my code exercises that path, clearly

OliverM15:05:05

@tony.kay just tried out 2.5.6-SNAPSHOT, no issues (not that I had any with 2.5.5)

tony.kay15:05:42

cool, yeah, it is a rare case where merge is called without a query…I guess if it fixes @levitanong it is good, since he obviously has a failing case

levitanong15:05:22

@tony.kay That seems to fix it!

levitanong15:05:57

Yes, this is the case.

tony.kay15:05:51

Thanks. 2.5.6 is on clojars

🎉 12
levitanong18:05:30

@tony.kay in this part of the book: http://book.fulcrologic.com/#_paginating_large_lists load-if-missing is called from within a mutation, but it uses load rather than load-action. Shouldn’t the latter be invoked rather than the former?