fulcro

Book: http://book.fulcrologic.com, Community Resources: https://fulcro-community.github.io/, RAD book at http://book.fulcrologic.com/RAD.html
Henry 2020-11-29T08:04:49.009600Z

@tony.kay This matter was interesting so I took some time to investigate. Based on the screenshot provided by @dionysius.almeida, I tried out the same piece of demo codes under chapter 3.9.1 in the Fulcro book.  The issue does exist for this particular demo. However, Fulcro Inspect works fine in other settings, like the latest Fulcro RAD Demo which I just checked.  A video is worth a thousand words, so I have prepared the following video to show the strange behaviour.  The same behaviour can also be observed when running the codes in a workspace.  Also note that after getting "Revision nil", if you send any transaction, Fulcro Inspect springs up properly again. Hope this is helpful in the debugging process.

Henry 2020-11-29T08:14:50.010200Z

P.S. The console error message is the same as stated by @reshef.mann above. So, it might be worth noting that the error message in this issue is the same as the one caused by not running Fulcro 3.4.2+. Error message points to: [fulcro.inspect.chrome.devtool.main:176] - Something was nil (anonymous) @ main.js:4081 .

Reshef Mann 2020-11-29T08:24:53.010600Z

https://opencrux.com/reference/queries.html#eql-projection Maybe this can help

roklenarcic 2020-11-29T13:00:38.011100Z

so crux can do it, as long as I generate the query for the root….

2020-11-29T16:15:22.011300Z

I think of pathom as an alternative to needing to write pull syntax queries yourself - it handles the nested traversal. If you need inspiration, here's a sample repo: https://github.com/souenzzo/graph-demo that being said, I do have a few use cases using crux where I need to use pull queries (using recursion), for that you can use client libraries like this: https://github.com/dvingo/my-clj-utils/blob/master/src/main/dv/crux_pull.clj

tony.kay 2020-11-29T19:06:46.011700Z

Thanks a lot @hk9861. This is a very minor issue that has to do with how Inspect works now. The older inspect used to send every database delta but as a diff. This was a lot of overhead, and would also get out of sync. The new version asks for diffs based on what it already has, and the UI just sends revision numbers. So, at each swap on the state atom the UI is sending “I now have revision n+1”, to which Inspect responds by looking in the history of what it has (I have nothing) and sends a message “I need all of revision n+1". Startup is a bit of a conundrum, because the app has to send a connect message, but if Inspect isn’t running when the app starts, then there is nothing to talk to. Thus, when you open inspect it is just waiting for an app to “appear”. Remember: you can embed 20 apps on a single page. I guess each app could poll for inspect if it hasn’t reached it, but simple interacting with the app “fixes it”, because then the app knows to try to talk to Inspect. I’m sure this could be made better, but I don’t currently have the time to work on it, test it, and then do the hour of deployments stuff to get it out.

tony.kay 2020-11-29T19:09:11.012300Z

It really should work if you open the app with Inspect open, so that is a minor bug, but just interacting with the app should “wake it up” I think, no?

Ola Sikström 2020-11-29T20:49:57.012900Z

Is the latest inspector version expected to work at https://book.fulcrologic.com/ at the moment? I seem to get "revision: nil" no matter what i try.

Ola Sikström 2020-11-29T21:07:00.013100Z

Seems like the book is running version 3.0.8, so i assume that's a no then?

Ola Sikström 2020-11-29T22:06:11.013300Z

That was it. Installed an older version of inspect, and now it works fine. https://github.com/fulcrologic/fulcro-developer-guide/pull/60 with added instructions.