Fork me on GitHub
#shadow-cljs
<
2018-01-29
>
lilactown17:01:55

I have a strange one: apparently our corporate network blocks connections to 0.0.0.0, so when the JS runtime tries to connect to the shadow-cljs server, it blocks the connections

lilactown17:01:18

is there a way to change it to 127.0.0.1 or localhost?

thheller17:01:43

:http {:host "localhost"} in shadow-cljs.edn

lilactown17:01:40

does that also work for node.js?

thheller17:01:09

I think so? its a server side setting

lilactown17:01:47

ahhh when I was skimming the docs, I thought that the http config was for managing the settings for serving a front-end project. my bad 😅 thanks!

colindresj18:01:34

I’m getting a spec error when trying to compile some code that is in fact valid

colindresj18:01:23

Getting rid of the :card/keys in favor of just :keys compiles

colindresj18:01:40

I’m on clojurescript 1.9.946

colindresj18:01:06

And shadow 2.0.146

colindresj18:01:49

Any ideas why this fails the spec?

thheller18:01:48

clj
Clojure 1.9.0
user=> (fn [{:card/keys [:slug :title :can-edit? :can-complete?]}])
CompilerException clojure.lang.ExceptionInfo: Call to clojure.core/fn did not conform to spec:

thheller18:01:53

because clojure complains

thheller18:01:24

thats plain clojure 1.9, no shadow or any other deps

thheller18:01:59

I think you are not allowed to combine namespaced keys with keywords

colindresj18:01:13

Oh yeah, let me check my Clojure version

thheller18:01:31

(fn [{:card/keys [slug title can-edit? can-complete?]}]) this works

colindresj18:01:21

That fixed it

thheller18:01:06

it may work with default CLJS since they don't have the core.specs in the 946 release

colindresj18:01:09

I wonder if self-hosted CLJS is a little different, cause in Lumo I’m ok with it

thheller18:01:11

but it is in master

colindresj18:01:25

Ok, makes sense

thheller18:01:26

so it would break with the next release

colindresj18:01:33

Good to know

mitchelkuijpers19:01:04

Just played around with the new hud, works like a charm @thheller!