This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-07-10
Channels
- # announcements (3)
- # beginners (67)
- # calva (4)
- # cider (3)
- # clj-kondo (58)
- # cljs-dev (4)
- # clojure (172)
- # clojure-berlin (4)
- # clojure-chicago (8)
- # clojure-europe (4)
- # clojure-greece (8)
- # clojure-italy (12)
- # clojure-nl (4)
- # clojure-spec (7)
- # clojure-uk (77)
- # clojurescript (13)
- # clojutre (16)
- # core-async (10)
- # cursive (3)
- # datomic (29)
- # figwheel-main (27)
- # fulcro (22)
- # garden (3)
- # jobs (2)
- # jobs-discuss (13)
- # juxt (5)
- # leiningen (14)
- # mount (4)
- # off-topic (28)
- # pathom (6)
- # pedestal (8)
- # portland-or (2)
- # re-frame (20)
- # remote-jobs (6)
- # shadow-cljs (13)
- # sql (74)
- # testing (17)
- # tools-deps (1)
- # vim (1)
- # xtdb (1)
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
?
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
I just connect to the regular REPL then do cider-connect-sibling-cljs
-> shadow-select
-> main
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?
I’ve been revamping some of the internals of default result action, which is where that happens
https://github.com/fulcrologic/fulcro3/blob/develop/src/main/com/fulcrologic/fulcro/mutations.cljc#L121 calls: https://github.com/fulcrologic/fulcro3/blob/develop/src/main/com/fulcrologic/fulcro/mutations.cljc#L109
if there is a bug, it is in there somewhere…it’s pretty small amounts of code, so should be easy to figure out
resolve tempids is this: https://github.com/fulcrologic/fulcro3/blob/develop/src/main/com/fulcrologic/fulcro/algorithms/tempid.cljc#L87
which remaps then in your state db, along with in all of the possible places in tx processing they could be hiding
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
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
most of that code came from f2, but the new assembly of it is what I have not tried much
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
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.
that’s true, though with the local root it is easier to submit a PR if you find a problem
(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)