Fork me on GitHub
#clojurescript
<
2020-02-11
>
nonrecursive02:02:56

hey y’all, i’m building a clojurescript library and want to run its tests using CIDER. what’s the best way to go about this?

dnolen14:02:55

@nonrecursive I'm assuming you want to do something REPL driven - I think probably just some keybinding to send the appropriate expressions would probably suffice - (test-ns ...) etc.

nonrecursive14:02:02

@dnolen thanks 🙂 I think my problem is that I’m not sure how to start a browserless CLJS REPL with um a server I can connect to- like, I can start a REPL in a terminal but am not sure how to get cider to connect to it 😕

fricze15:02:04

@nonrecursive cider-jack-in-cljs?

dnolen15:02:43

@nonrecursive I would be very surprised if this isn't solved Figwheel probably works quite well here, and I'm assuming Shadow too

dnolen15:02:12

inf-clojure/cljs also worked quite well last time I checked which is what I preferred when I was still using Emacs heavily for dev

lukasz15:02:33

Shadow has a bit of info about how to get various REPLs, including nREPL https://shadow-cljs.github.io/docs/UsersGuide.html#_server_options

pbaille16:02:11

Hello, for the second time I’ve been bitten by this line: https://github.com/clojure/clojurescript/blob/master/src/main/clojure/cljs/core.cljc#L2043 Could we replace it with (core/seq? head) ? This way, when emiting a defrecord form from a macro, sigs could be of type Cons which seems to make sense.

Alex Miller (Clojure team)17:02:16

if you wanted to ask this at https://ask.clojure.org we can get it logged as a jira

rickmoynihan17:02:12

I’m currently porting some clj code to cljc, and my clojurescript is a bit rusty… Can someone remind me how to essentially port this (simplified example) to clojurescript?

(defmulti my-multi (fn [a b] [(type a) (type b)])

(defmethod my-multi [java.lang.String java.lang.String] [a b]
  :do-stuff)

rickmoynihan17:02:48

I’m struggling trying to find the literal value for the class String in cljs

rickmoynihan17:02:27

(type "foo") prints as #object[String] so I’m guessing there isn’t a class literal for them

thheller17:02:10

js/String but type is somewhat unreliable in JS since it doesn't have real classes

rickmoynihan17:02:08

thanks… I also need (guessing) js/Object and the rest of the types are in cljc records. Can I just reference those directly? e.g. some-random.namespace.Foo?

thheller17:02:43

some-random.namespace/Foo yes

rickmoynihan17:02:05

ahh yes I remember because you require not import.

rickmoynihan17:02:09

Thanks :thumbsup:

thheller17:02:19

. also kinda works by accident though

nonrecursive17:02:39

@andrzej.fricze @dnolen I was hoping to do it without shadow - looks like cider-jack-in-cljs does it 😄 thank you both very much!

👌 4
dnolen17:02:20

:the_horns::skin-tone-4:

Wilson Velez20:02:39

hi, I’m using Highcharts-react-official https://github.com/highcharts/highcharts-react in a re-frame app, someone knows how can I get the chart instance in order to call the showloading() method? thanks

p-himik20:02:37

Hi. Cannot answer your question, but you should probably avoid cross-posting.

Wilson Velez20:02:31

hi @U2FRKM4TW, cross-posting is post on different channels? (if it is, sorry, I didn’t know it was something ‘rude’)

p-himik20:02:08

Yes. I think it's best to first ask in a single specific channel, given that it's a more or less "alive" one. And if you don't get any answer, then maybe move to a more generic channel and write in the thread of the first post that you have done so.

Wilson Velez20:02:48

ok, thanks, next time then!

👍 4