Fork me on GitHub
#fulcro
<
2019-07-10
>
PB05:07:30

Is anybody here using cider jack in to start both the server and the shadow repl? If so, which cljs repl are you picking? shadow or shadow-select?

PB05:07:41

This is what I'm getting everytime I try to jack-in :

[nREPL] Starting server via /usr/local/bin/clojure -Sdeps '{:deps {nrepl {:mvn/version "0.6.0"} cider/piggieback {:mvn/version "0.4.1"} refactor-nrepl {:mvn/version "2.5.0-SNAPSHOT"} cider/cider-nrepl {:mvn/version "0.22.0-beta8"}}}' -m nrepl.cmdline --middleware '["refactor-nrepl.middleware/wrap-refactor", "cider.nrepl/cider-middleware", "cider.piggieback/wrap-cljs-repl"]'...
[nREPL] server started on 64373
[nREPL] Establishing direct connection to localhost:64373 ...
[nREPL] Direct connection to localhost:64373 established
[nREPL] Establishing direct connection to localhost:64373 ...
[nREPL] Direct connection to localhost:64373 established
error in process filter: user-error: The shadow-cljs ClojureScript REPL is not available
error in process filter: The shadow-cljs ClojureScript REPL is not available

kszabo09:07:02

I just connect to the regular REPL then do cider-connect-sibling-cljs -> shadow-select -> main

bbss18:07:04

I'm trying to merge back tempids in fulcro3 "3.0.0-alpha-16-1", my pathom resolver sends back :tempids {tempid real-id} but I don't see the tempids merging on the front-end. I expected this to be automatic, do I need add something to my mutation?

bbss18:07:48

This is what the response of the mutation looks like. Looks okay?

tony.kay19:07:27

@bbss The support should be there, but I have not had time to test it

tony.kay19:07:30

try alpha-18

tony.kay19:07:27

I’ve been revamping some of the internals of default result action, which is where that happens

tony.kay19:07:43

which side-effects the tempid remappings into place

tony.kay19:07:04

if there is a bug, it is in there somewhere…it’s pretty small amounts of code, so should be easy to figure out

tony.kay19:07:59

which remaps then in your state db, along with in all of the possible places in tx processing they could be hiding

tony.kay19:07:29

This is the function that tries to pull the remaps out of your response (which may looks something like {'sym {:tempids {t1 1}} 'mutation-sym2 {:tempids {t2 2}}}: https://github.com/fulcrologic/fulcro3/blob/develop/src/main/com/fulcrologic/fulcro/algorithms/tempid.cljc#L66

tony.kay19:07:21

into {t1 1 t2 2} (which is refer to as tid->rid for “tempid to realid”), since that map can act as a function that does exactly that

tony.kay19:07:49

most of that code came from f2, but the new assembly of it is what I have not tried much

tony.kay19:07:21

If you’re using deps, clone fulcro3 and use :local/root in deps, and you can edit the Fulcro code in the context of your app and spy on the values and see where it is going wrong

mdhaney11:07:57

Since we’re using shadow-cljs, it’s even easier. Just copy the namespace you want to modify to your local project and make changes and shadow-cljs will monkey-patch it.

tony.kay15:07:22

that’s true, though with the local root it is easier to submit a PR if you find a problem

tony.kay15:07:58

and not have to remember to delete random files you’ve moved around

tony.kay19:07:13

(you will need to include ghostwheel.stubs in your deps as well, if you don’t use ghostwheel…that is handled for you by the mvn version)

mdhaney11:07:57

Since we’re using shadow-cljs, it’s even easier. Just copy the namespace you want to modify to your local project and make changes and shadow-cljs will monkey-patch it.