This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-05-27
Channels
- # admin-announcements (1)
- # announcements (1)
- # babashka (16)
- # beginners (222)
- # bristol-clojurians (6)
- # calva (13)
- # cestmeetup (5)
- # cider (19)
- # cljs-dev (2)
- # cljsrn (4)
- # clojure (65)
- # clojure-europe (31)
- # clojure-nl (1)
- # clojure-norway (1)
- # clojure-uk (33)
- # clojurescript (64)
- # community-development (5)
- # core-async (18)
- # cursive (15)
- # datomic (6)
- # devcards (1)
- # emacs (18)
- # figwheel-main (102)
- # fulcro (51)
- # graalvm (2)
- # helix (8)
- # instaparse (33)
- # jobs (8)
- # jobs-discuss (3)
- # leiningen (42)
- # off-topic (88)
- # pedestal (15)
- # re-frame (18)
- # reagent (26)
- # reitit (15)
- # rum (3)
- # shadow-cljs (119)
- # spacemacs (9)
- # sql (2)
- # tools-deps (7)
This is my shadow-cljs build config
:builds {:desktop-main {:target :node-script
:output-to "resources/main.js"
:main app.desktop.main.core/main}
:desktop-renderer {:target :browser
:output-dir "resources/public/js"
:asset-path "js"
:modules {:renderer {:init-fn app.desktop.renderer.core/init}}
:js-options {:keep-native-requires true
:extensions [".web.js" ".js" ".json"]
:resolve {"react-native" {:target :npm
:require "react-native-web"}}}
:dev {:closure-defines {com.fulcrologic.fulcro.inspect.inspect_ws/SERVER_PORT 8237}}
:devtools {:preloads [com.fulcrologic.fulcro.inspect.websocket-preload]}}}}
Ahhh, I'm guessing this has to do with the fact that electron grabs the app via "file://" and not an http server...
Looking at the source we could pass in
:protocol ; Server protocol, e/o #{:http :https}.
to sente/make-channel-socket-client!
there are instructions for building inspect in the inspect repo..feel free to tinker. Be careful about pinning it to one value, though. If websocket is used in browser, it would have to adapt between http and https (I think? mixed content policy?)
@U0CKQ19AQ Figured out com.taoensso/sente 1.15.0
doesn't respect the host param, but v1.16.0-alpha1
does. And it works! I'll use that locally until you decide to bump it in fulcro
Yep, it includes this change to respect the host param https://github.com/ptaoussanis/sente/commit/9bb09acbf6f969e869b4736846107a54a32860ed
yeah, my collaborator currentoor sent that patch…I’m aware of the problem…just didn’t think about it w/respect to your issue
Oh, hmm, let me double check, because I was overriding fulcro to a local version as well
Okay, yes, providing a protocol does matter, otherwise it will pull what's in the window location
But as you said, we should probably account for either? And if file:
feed it one or the other?
--- a/src/main/com/fulcrologic/fulcro/inspect/inspect_ws.cljs
+++ b/src/main/com/fulcrologic/fulcro/inspect/inspect_ws.cljs
@@ -35,6 +35,11 @@
{:type channel-type
:host SERVER_HOST
:port SERVER_PORT
+ :protocol (let [enc-protocol (:protocol (enc/get-win-loc))]
+ (cond
+ (= enc-protocol "http:") :http
+ (= enc-protocol "https:") :https
+ :else :http))
:packer (make-packer {:read inspect.transit/read-handlers
:write inspect.transit/write-handlers})
:wrap-recv-evs? false
This is the patch I'm thinking. Match up http and https if that's the case, otherwise default to http
Another option might be to have a fulcro starter for electron using ses.loadExtension(path)
to load fulcro-inspect as a chrome extension
@U0CKQ19AQ Let me know your thoughts on the above when you have a moment.
I had this scenario which I am not able to reason about. I was doing a mutation which performed a datomic operation. However because the result of the datomic operation was being returned, transit was failing to serialize it and threw an error. However interestingly the datomic transaction did not go through, the wite did not succeed because transit serialization was failing. That doesnt make sense, why would datomic transaction not commit, if a subsequent expression (transit serialization in the ring middleware) was failing ?
If it doesn't make sense then perhaps it is not what is truly happening? Could you be getting 2 separate transit errors?
Workspaces is currently broken, is that correct? I get TBD, classpath indexing is gone
.
oh. I forgot that workspaces has a custom shadow-cljs target. that needs to be updated.
To anyone who want’s to join our little fulcro study group, we’re meeting in around 30 mins =)…
Pinging you @U0522TWDA as you’ve expressed interest =)…
To anyone else interested: https://hangouts.google.com/call/hWRg8EcHiRvAGGFpeaKiAAEI
Going to restart my computer @U0JUM502E, issue is not only hangouts
is there a way to follow this study group? I'm a newbie in fulcro and would love to see how you guys/gals approach the learning process for it
I would be really interested too, can we get meeting invites?
No problem =)… I usually just update a thread like this with a link like I’ve done previously =)… I’m keeping it low touch as I don’t want to bug people who aren’t really interested any more… I’ll @
anyone who’s asked next week when I put a new call link up!
Hey, Just a heads up that we’ll be having our call in a bit to anyone who can join. Pinging those who’ve expressed interest =)… @U0522TWDA @U0DUNNKT2 @U04VBBS6N @U014BBTEFK6
Sorry, mobprogramming day at work
ah it looks like we are on different time zones 😞. thanks for the heads up
Sorry :(… To be fair today was really quick because there was just two of us this time… We’re not too strict with a fixed time as sometimes people need 10 mins or more to wrap something up. I’ll do the heads up again next week!
no worries, understandable. thank you!
Yea it works "the oldschool way" (though I have a bunch of other problems, but oh well)
sorry about that. I'll see if I can put together a PR for this later if I have some time
👍 it is a minor thing really, but if that is something that needs more time, maybe it should be mentioned in the readme
When I have ::f.portal/wrap-root?
set to true
, my component doesn't get rendered at all, only when I set it to false
.
I used the http://material-ui.com react components in the last days and decided to bundle the fulcro wrappers in a lib: They are far from complete, I only added what I needed. Feel free to extend. https://github.com/MrEbbinghaus/fulcro-material-ui-wrapper They are using reader conditionals for when someone is writing SSR compatible components. (they are emitting nil in that case)