I wish mine would have failed. We really need to know the specific condition under which it fails.
that code appeared in alpha42
I’m not sure it will compile, but try backing your version of Om down to alpha41
you’ll want to stop figwheel, clean, etc
@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?
strange…I thought that had been there a while
that should compile
that function is there
you sure you cleaned out the generated js folder?
@bbktsk does everything have an ident but root?
yup, cleaned, still the same.
let me check.
yes, everything’s got ident.
app-state has been a function for a while. not understanding why you’re seeing that
you know that lein clean
does not clean resources by default, right?
OH
wait
I know…the cljc stuff
it is looking for it on the clj side, which it is not in alpha41
bummer
Your router: is that an untangled router?
yes, it is.
just for giggles, copy that Ident fucntion onto the sub-screens
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?
I suspect the answer might be “yes”
and that is all that is diff in your case
you mean use the same function for both router and subscreens?
yes, it has to be the same or routing cannot work
I normally leave it off the subscreens, since it is used through the router
but it doesn’t hurt anything for the subscreens to also have it declared
I’m wondering if it hurts incremental rendering for them to NOT have the ident
Hm. I updated my example to use a router, adn everything still works fine.
Still the same here.
I’m just wondering, why is there that shortcut in Bean’s path? What puts it there?
well, I’m stumped. I can’t get it to break, and you can’t get it to work 😕
I pushed my updates to that load-sample branch in case you want to look
see if there is anything different
I will check that out. Also, I will try to put together a simple test case to demonstrate the issue.
ok. I’m bummed you hit a snag like this. usually I’m able to help solve them pretty quickly
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!
welcome. I want it to be as bug free as possible. I kind hope it is a mistake 😉
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.
I thought it was only with pathopt turned on
Interestingly, with pathopt OFF, it doesn’t do it as much
but it still does it some
take that back…seems to have no effect.
@bbktsk AH…Untangled isn’t passing pathopt through properly
give me a sec
I’m just looking at that 😎
:reconciler-options {}
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
it is up on clojars
try refreshing deps and seeing if anything changes
I’m betting that fixes it
strange that we haven’t hit that more, if it is broken
YES!
It’s working!
bummer, but agreed…YES
Probably.
I’m way past my bedtime now, so chances are I’m just hallucinating or messing something up.
I’ll check again tommorow and let you know.
ok
night
But it’s looking good 😎
Yay! 😎
😃
the algo I’m see in Om Next makes me think that pathopt won’t work
which is why I had the idea to turn it off
good that we caught that turning it off wasn’t working 🙂
What? There’s no way to insert huge animated gif of absurdly happy person into Slack channel? Bummer 😎
:bananadance:
:bmo:
Bye for now. Will let you know tomorrow.
ok
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"
The combo lib snapshot has the fix already
bummer…that was stale. ignore 0.8.1. I’ll release it as 0.8.2
OK: [awkay/untangled-client "0.8.2"]
on clojars. No longer using pathopt
[awkay/untangled "1.0.0-SNAPSHOT"]
(the new combo lib) also updated
@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?
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?
@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
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.