Fork me on GitHub
#untangled
<
2017-06-20
>
tony.kay00:06:27

I wish mine would have failed. We really need to know the specific condition under which it fails.

tony.kay00:06:06

that code appeared in alpha42

tony.kay00:06:28

I’m not sure it will compile, but try backing your version of Om down to alpha41

tony.kay00:06:39

you’ll want to stop figwheel, clean, etc

bbktsk00:06:19

@tony.kay No such var: om/app-state, compiling:(untangled/client/util.cljc:32:20), so I guess I should downgrade untangled a little bit too? How far?

tony.kay00:06:40

strange…I thought that had been there a while

tony.kay00:06:06

that should compile

tony.kay00:06:10

that function is there

tony.kay00:06:22

you sure you cleaned out the generated js folder?

tony.kay00:06:31

@bbktsk does everything have an ident but root?

bbktsk00:06:28

yup, cleaned, still the same.

bbktsk00:06:31

let me check.

bbktsk01:06:20

yes, everything’s got ident.

tony.kay01:06:20

app-state has been a function for a while. not understanding why you’re seeing that

tony.kay01:06:42

you know that lein clean does not clean resources by default, right?

tony.kay01:06:14

I know…the cljc stuff

tony.kay01:06:25

it is looking for it on the clj side, which it is not in alpha41

tony.kay01:06:33

Your router: is that an untangled router?

bbktsk01:06:28

yes, it is.

tony.kay01:06:54

just for giggles, copy that Ident fucntion onto the sub-screens

tony.kay01:06:45

I’ve been debating this one internally: the union component needs the ident in order to route, but do the children being routed also need the ident function?

tony.kay01:06:58

I suspect the answer might be “yes”

tony.kay01:06:17

and that is all that is diff in your case

bbktsk01:06:04

you mean use the same function for both router and subscreens?

tony.kay01:06:21

yes, it has to be the same or routing cannot work

tony.kay01:06:35

I normally leave it off the subscreens, since it is used through the router

tony.kay01:06:05

but it doesn’t hurt anything for the subscreens to also have it declared

tony.kay01:06:19

I’m wondering if it hurts incremental rendering for them to NOT have the ident

tony.kay01:06:59

Hm. I updated my example to use a router, adn everything still works fine.

bbktsk01:06:04

Still the same here.

bbktsk01:06:03

I’m just wondering, why is there that shortcut in Bean’s path? What puts it there?

tony.kay01:06:14

well, I’m stumped. I can’t get it to break, and you can’t get it to work 😕

tony.kay01:06:41

I pushed my updates to that load-sample branch in case you want to look

tony.kay01:06:48

see if there is anything different

bbktsk01:06:21

I will check that out. Also, I will try to put together a simple test case to demonstrate the issue.

tony.kay01:06:30

ok. I’m bummed you hit a snag like this. usually I’m able to help solve them pretty quickly

bbktsk01:06:15

Do not worry! It’s been fun 😎 I just hope it’s not some kind of stupid mistake on my side, you’ve spent so much time on this. Appreciate it a lot!

tony.kay01:06:04

welcome. I want it to be as bug free as possible. I kind hope it is a mistake 😉

tony.kay01:06:23

the “shortcut” is common. It’s possible to talk about a subtree starting at some ident. I had never dumped the paths before, but it seems to do it all over the place.

tony.kay01:06:31

I thought it was only with pathopt turned on

tony.kay01:06:29

Interestingly, with pathopt OFF, it doesn’t do it as much

tony.kay01:06:33

but it still does it some

tony.kay01:06:11

take that back…seems to have no effect.

tony.kay01:06:49

@bbktsk AH…Untangled isn’t passing pathopt through properly

tony.kay01:06:55

give me a sec

bbktsk01:06:23

I’m just looking at that 😎

bbktsk01:06:30

:reconciler-options {}

tony.kay01:06:12

I just turned off pathopt in the application. It is just an optimization, and one that Om isn’t seeming to want to support…so, I don’t mind disabling it

tony.kay01:06:16

it is up on clojars

tony.kay01:06:24

try refreshing deps and seeing if anything changes

tony.kay01:06:48

I’m betting that fixes it

tony.kay01:06:18

strange that we haven’t hit that more, if it is broken

bbktsk01:06:36

It’s working!

tony.kay01:06:41

bummer, but agreed…YES

bbktsk01:06:22

I’m way past my bedtime now, so chances are I’m just hallucinating or messing something up.

bbktsk01:06:39

I’ll check again tommorow and let you know.

bbktsk01:06:47

But it’s looking good 😎

tony.kay01:06:10

the algo I’m see in Om Next makes me think that pathopt won’t work

tony.kay01:06:19

which is why I had the idea to turn it off

tony.kay01:06:27

good that we caught that turning it off wasn’t working 🙂

bbktsk01:06:02

What? There’s no way to insert huge animated gif of absurdly happy person into Slack channel? Bummer 😎

bbktsk01:06:26

Bye for now. Will let you know tomorrow.

tony.kay02:06:15

So, general note to channel: Om Next pathopt seems to be generally broken (as of about alpha 42 at least). It is an undocumented optimization feature that Untangled was using from the early days, but it seems to not be something Om Next is too worried about. I’m changing the default from true to false on this option, and it has cleared up one mysterious bug in my own code, and it looks like it was the solution to the above problem. Unfortunately, Untangled’s option processing of pathopt got broken a while back and no one noticed…and there is no way in the old versions to turn pathopt off! I’ve pushed an updated untangled-client library with the fix, but I cannot push to the navis namespace. So, if you want this fix without moving to the combo lib use awkay/untangled-client "0.8.1"

tony.kay02:06:40

The combo lib snapshot has the fix already

tony.kay02:06:13

bummer…that was stale. ignore 0.8.1. I’ll release it as 0.8.2

tony.kay02:06:48

OK: [awkay/untangled-client "0.8.2"] on clojars. No longer using pathopt

tony.kay02:06:15

[awkay/untangled "1.0.0-SNAPSHOT"] (the new combo lib) also updated

gardnervickers04:06:05

@tony.kay Are there other mechanisms to avoid querying from root when a component has an ident it can root it’s query from now?

tony.kay12:06:26

gardnervickers: no. I’ve opened an issue in Om Next. D.N. seems to want it to work, so we can probably expect a fix.

uwo18:06:36

I’ve got a legacy application that I’d really like to transition to untangled, however I won’t be able to change the database, for now, which is mongodb. Is it worth it, even though I’d be stuck with mongo?

wilkerlucio19:06:43

@uwo you can write a parser to fetch data from anywhere you want, I wrong a blog post describing how to do that, it might be useful for you: https://medium.com/@wilkerlucio/implementing-custom-om-next-parsers-f20ca6db1664

cjmurphy23:06:00

Looking at the source from Untangled Getting Started, the Root component has a :ui/person-id: https://github.com/awkay/untangled-getting-started/blob/master/src/main/app/basic_ui.cljs#L84, which I can't see being used anywhere.

tony.kay12:06:43

cjmurphy: Yeah, clearly I refactored something and forgot it. On the road right now. Open an issue? Thanks!

tony.kay12:06:26

gardnervickers: no. I’ve opened an issue in Om Next. D.N. seems to want it to work, so we can probably expect a fix.