untangled

NEW CHANNEL: #fulcro
wilkerlucio 2017-03-16T13:13:29.304496Z

@tony.kay we are starting a new project from the template here, when we used the bin/rename-project.sh it created duplicates of most of project files, adding "" to the end of the file name, is that expected?

tony.kay 2017-03-16T16:41:25.968012Z

Yeah, the rename is broken.

tony.kay 2017-03-16T16:41:41.973954Z

sorry about that. Would love a patch...just have not had time.

tony.kay 2017-03-16T16:41:49.976959Z

@wilkerlucio ^^^

adambros 2017-03-16T18:07:36.917189Z

Taking a look, it seems like a patch about compatibility with older versions of sed is causing this, ill try to have a patch here soon

macrobartfast 2017-03-16T18:26:25.316044Z

figwheel isn't reloading the devguide; what's the most common cause of this (playing lotto here)?

macrobartfast 2017-03-16T18:27:49.345955Z

watching devguide in figwheel; ran (clean-builds); no dice yet.

macrobartfast 2017-03-16T18:28:44.365348Z

shows 'figwheel: socket connection established'.

macrobartfast 2017-03-16T18:31:17.420197Z

ran the repl with 'JVM_OPTS="-Ddevguide" lein run -m clojure.main script/figwheel.clj'

adambros 2017-03-16T18:33:49.472794Z

@wilkerlucio i just pushed a patch that should fix it, tested it locally

adambros 2017-03-16T18:37:11.542448Z

@macrobartfast i cannot reproduce, i just ran your command locally

macrobartfast 2017-03-16T18:37:36.551301Z

@adambros thanks, and stand by... may have a solution in the works here.

adambros 2017-03-16T18:37:54.557526Z

did you go to localhost:3449 ?

wilkerlucio 2017-03-16T18:38:09.562389Z

@adambros thank you 🙂

macrobartfast 2017-03-16T18:39:21.586735Z

@adambros I did... it looks like I'm editing a copy of the file that's not being watched... pebkap I think

macrobartfast 2017-03-16T18:39:55.597931Z

@adambros stand by for 5 and I think I'll have it solved

2017-03-16T18:44:11.684660Z

@adambros, tested with @wilkerlucio and it worked, but it's not on the default branch "develop", could you merge there?

macrobartfast 2017-03-16T18:49:53.802272Z

😳

macrobartfast 2017-03-16T18:51:59.846338Z

had been editing ./resources/public/js/devguide/untangled_devguide/A_Introduction.cljs instead of ./src/devguide/untangled_devguide/A_Introduction.cljs

😅 1
adambros 2017-03-16T19:14:14.301243Z

@rfhayashi woops! let me fix that, i will rebase as that was a total mistake, so make sure you force pull once im done

adambros 2017-03-16T19:23:04.209066Z

@rfhayashi @wilkerlucio ok rebased so develop & master should be correct now you will have to force pull if you’ve been following along with me

👍 2
2017-03-16T22:05:08.122380Z

So I'm finding that where (om/transact! this '[(widget/new ~(om/tempid))]) works as expected with regards to tempids, (om/transact! this '[(widget/new ~(om/tempid)) (widget/new ~(om/tempid))]) only resolves the second tempid.

😱 1
2017-03-16T22:05:42.130792Z

Is that expected, and if not, is that more likely on the om.next or untangled side?

gardnervickers 2017-03-16T22:12:16.218192Z

@therabidbanana Are you using a backtick for the macro quote? `

adambros 2017-03-16T22:12:54.226338Z

doesnt seem like the problem if '[(widget/new …)] works

adambros 2017-03-16T22:14:48.250820Z

@therabidbanana i would think the problem is with untangled-client, probably the networking related code

tony.kay 2017-03-16T22:49:05.662786Z

@therabidbanana So, the problem is responses from the server come back in a map

tony.kay 2017-03-16T22:49:26.666656Z

so sending both of those in a single transaction will end up with both going, but only one can response because there is only one slot in the response map

tony.kay 2017-03-16T22:49:32.667805Z

for 'widget/new

tony.kay 2017-03-16T22:49:52.671567Z

{ 'widget/new { :tempids { old new } } }

tony.kay 2017-03-16T22:50:11.674956Z

and our server handling code isn't smart enough for that case

adambros 2017-03-16T22:50:29.678462Z

wouldn’t you expect it to just merge the tempids?

tony.kay 2017-03-16T22:50:29.678476Z

so, this is a bug on untangled server's merging of tempids into a response

tony.kay 2017-03-16T22:50:34.679421Z

yes, I would

tony.kay 2017-03-16T22:51:43.692724Z

feel free to open an issue.

2017-03-16T22:52:49.705552Z

Sorry - was away - yes I'm actually quoting with ` but that was harder to show with slack syntax

2017-03-16T22:53:41.715454Z

Okay - thought that might be the case, somewhere in the server, but wasn't sure where to dig in more

tony.kay 2017-03-16T22:54:12.721217Z

that function needs logic to look for :tempids (mutations can return anything else as well) and do merges on the tempids ONLY

2017-03-16T22:54:12.721307Z

Is the expected case to also merge all keys, or just the tempids?

2017-03-16T22:54:21.723132Z

Heh, one step ahead of me

tony.kay 2017-03-16T22:54:26.724065Z

we can't assume we know what the others are

2017-03-16T22:54:57.729971Z

Stepping back - is this functionality that should work and doesn't, or is it generally unexpected to chain together mutations like this?

tony.kay 2017-03-16T22:55:07.731862Z

so, I'd say that we have a sort-of unsolvable case here. If you invoke a remote mutation more than once in a transaction that wants to return values you'll have to override this logic

adambros 2017-03-16T22:55:44.738824Z

*other than tempids

tony.kay 2017-03-16T22:55:48.739498Z

we might provide a hook for people to customize it

tony.kay 2017-03-16T22:56:05.742715Z

right, other than tempids, and many people will never need anything other than tempids

tony.kay 2017-03-16T22:56:24.746159Z

and most won't need to invoke the same mutation more than once per xaction

tony.kay 2017-03-16T22:56:31.747503Z

so, it should be a rare case

tony.kay 2017-03-16T22:56:55.751988Z

so, I'd say fix the tempid logic, and wait for someone to have further need

2017-03-16T22:57:00.752912Z

Yeah - I'm only doing this because it seemed most straightforward - I could easily just write a new multiple mutation

2017-03-16T22:57:15.755411Z

I felt like based on the way transactions work it felt like it should work?

tony.kay 2017-03-16T22:57:16.755787Z

we've got a ton to do here, so no horsepower will be given to this...will accept a PR though

tony.kay 2017-03-16T22:57:56.763161Z

Your case should work the way you wrote it...we just didn't write the plumbing right because no one thought of the case

tony.kay 2017-03-16T22:58:43.771921Z

except David Nolen 😉 I wondered why he wasn't auto-raising return values

tony.kay 2017-03-16T22:59:23.779046Z

well, he could have auto-raised, but you'd still have to decide on the merging of responses