Fork me on GitHub
#fulcro
<
2019-12-30
>
JAtkins08:12:00

I just found a sore point in the docs. http://book.fulcrologic.com/#_joins

currentoor19:12:17

we would really appreciate a PR if you think something small is wrong/confusing the docs

JAtkins19:12:52

Sounds good. I was looking for the repo but got lost I guess. It was pretty late last night 😉

currentoor19:12:31

yeah it’s a little hard to find

currentoor19:12:52

we probably should have a link to the repo at the top of the docs

JAtkins19:12:30

Is it correct that fulcro will auto-norm a to-many only if the element passed in is a vector, and not any other seq?

currentoor22:12:20

i’m not entirely sure, i doubt fulcro was intentionally built to handle non-vector seqs in app state

currentoor22:12:35

but the algorithms may be able to process them anyway as a consequence

currentoor22:12:17

that said everything in app state should be serializable, and i wouldnt consider lazy seqs to be very serializable

currentoor22:12:39

short answer, i don’t know simple_smile

JAtkins08:12:11

It could use a note nearby in bold saying that a to many join requires a vector in the initial state. To be fair it does say it in the docs, but as I can attest this is easy to miss. Esp. when simple code like this comes up:

JAtkins08:12:29

:initial-state (fn [_] {:code-form (map (partial comp/get-initial-state CodeForm)
                                     [{:id   1 :title "Number1"
                                       :code "nil"}
                                      {:id   2 :title "Number2"
                                       :code "nil2"}])})

1
mping22:12:34

Hi, is there anything required to use fulcro-inspect within an electron app?

mping22:12:48

The extension is installed correctly, and I call com.fulcrologic.fulcro.inspect.inspect-ws/install-ws from the renderer process

mping22:12:55

but the extension doesn't detect the app

mping22:12:04

No app connected.

currentoor22:12:20

i’ve been using it for react native development without any grief

mping22:12:02

I couldnt run it in lnux

mping22:12:22

It installed but it doesn't open

mping23:12:46

/opt/fulcro-inspect-electron/fulcro-inspect-electron: error while loading shared libraries: libgconf-2.so.4: cannot open shared object file: No such file or directory

mping23:12:12

sudo apt -y install libgconf2-4 fixes it

mping23:12:16

but still it says no app connectec

cjmurphy04:12:51

Rebooting the machine is the only way I've discovered to get round that problem: "No app connected". (Perhaps ports are taken and never released).

tony.kay06:12:38

So, the electron app is somewhat alpha, in that it only works with one app at a time, and can easily get confused. It is the only resort for mobile dev, but I don’t really recommend it over the chrome extension. It won’t take much work to make it more robust, but only have so much time…it just need to track conenctions with apps. In terms of Linux compat: I don’t have the time to test all the builds. I’m just running an electron build and putting the resulting files up. The OSX version is tested by me…the others are user-tested. lsof is your friend as far as finding stuck processes that have allocated a port. OH, one other thing: the elecron app is at a fixed port (not yet configurable), so if something is already on that port it will fail to allocate it.

mping10:12:55

Thanks, do you have any pointers for finding out why the extension doesn't work for me? I'm using fulcro to create an electron app

mping10:12:52

AFAIK the preload thing ensures the websocket is opened and the extension would connect there right?

tony.kay19:12:02

The extension to chrome? No, that should just work on Chrome (the official google one). If you’re talking about the websocket one: The electron app version of Inspect runs a node process, which creates a socket. The version of http://socket.io MATTERS. Make sure you do NOT use the latest. The instructions say what to do. So it is one of 2 problems I would think:

tony.kay19:12:41

1. The version of http://socket.io you have in package.json (or are getting) is incorrect. 2. The port Inspect is trying to allocate is used by something else (see lsof -inP)

tony.kay19:12:57

it tries to use 8237