Fork me on GitHub
#malli
<
2022-02-15
>
Martynas Maciulevičius11:02:01

How does one install sci as an external dependency? I try to run tests of malli and they fail with this error: :malli.core/sci-not-available Should I include it into my ~/.clojure/deps.edn?

Martynas Maciulevičius11:02:53

This was the info from #babashka channel. But it's not enough context.

borkdude11:02:45

It seems you need the :test alias

borkdude11:02:41

I recommend upgrading SCI to 0.3.0 for better performance

Martynas Maciulevičius11:02:58

How would one run tests from emacs(spacemacs+CIDER)? If I understand correctly you'd need to run it a JS-Clojure REPL. It failed for me when I used Java-Clojure REPL.

borkdude11:02:05

@invertisment_clojuria You can place a file .dir-locals in the repo:

((clojure-mode
  (cider-clojure-cli-aliases . "test")))

borkdude11:02:23

and then cider-jack-in , after that you should be able to run tests from CIDER

borkdude11:02:10

if you do not want to add the file, you can do it like this:

C-u M-x cider-jack-in

borkdude11:02:45

and then choose clojure-cli and then add the test alias here: -M:test:cider

borkdude11:02:47

and press enter

Martynas Maciulevičius11:02:37

What should I choose when it says "connect sibling cljs"? There are many options. node, figwheel, shadow and others

borkdude11:02:26

Dunno, I don't ever use this. If I want to run tests, I do it directly from the Node REPL

Martynas Maciulevičius11:02:57

So you develop without a REPL?

Martynas Maciulevičius11:02:24

I'm used to have everything under one process in Java. That's why I ask. I know that in CLJS it's different.

Martynas Maciulevičius11:02:25

So should it be ./bin/node and that's it? And then you'd proceed to go and change the sources?

Martynas Maciulevičius11:02:42

And have the REPL running just in case?

borkdude11:02:50

I do use the REPL, but for CLJS I found it too brittle to do it from my editor so I chose to simplify things. I use (require '[ns] :reload) in the REPL when I want to reload changes, and invoke test expressions or files when I want to test something. This is a spartan workflow, but it's the least time consuming for me personally.

Martynas Maciulevičius11:02:35

Should I also add how to start-up the emacs REPL into the README? I'll make a PR for a bugfix.

borkdude11:02:47

I was just providing info, I'm not the maintainer of this project, so I'll let @ikitommi or whoever decide on that :)

1
dvingo13:02:26

I've had success running the cljs tests in malli repo in a repl, but I augmented the shadow-cljs.edn file to load one of the app targets in a browser, and then when the tests were working in the browser I verified them for node by running ./bin/node this was from cursive though. it should also work with cider with the relevant shadow integration