Fork me on GitHub
#cider
<
2019-01-21
>
plexus06:01:31

java.lang.IllegalArgumentException: No such namespace: cider.nrepl.pprint

plexus06:01:42

this was already reported by someone in #beginners

plexus06:01:26

seems I had added some code earlier to make CIDER use cider-nrepl 0.19.0-SNAPSHOT, which is outdated by now.

plexus06:01:44

Is there a better way to opt-in to the latest SNAPSHOT of cider-nrepl?

yuhan09:01:37

I'm can't get shadow-cljs to work with cider - it always errors with

error in process filter: Sync nREPL request timed out (op classpath)
after selecting the REPL type

yuhan09:01:38

and switching over to the cider-repl it says

yuhan09:01:49

WARNING: CIDER requires nREPL 0.4.4 (or newer) to work properly

yuhan09:01:16

`;; Connected to nREPL server - <nrepl://localhost:8230> ;; CIDER 0.21.0snapshot (package: 20190116.1142), nREPL 0.2.13`

yuhan09:01:23

tried putting [nrepl "0.5.3"] into :dependencies list in the shadow-cljs.edn but that didn't change anything

manuel09:01:25

@qythium I detailed my setup with shadow-cljs here, if it can be of any help: https://manuel-uberti.github.io/programming/2018/11/14/deps-shadow-cljs/

yuhan09:01:01

Thanks, I'll have a look 🙂

manuel09:01:24

I updated to [cider/cider-nrepl "0.20.0"] now, though

manuel09:01:21

but otherwise, that's my current setup

yuhan09:01:59

do I need a deps.edn / project.clj in the folder? I thought shadow-cljs.edn was meant to replace that

manuel09:01:31

Well, shadow-cljs is for ClojureScript. You will still need to use something else to build/configure the Clojure side of your project, if you have one

yuhan09:01:12

ohh okay, I was starting with the shadow-examples repo and didn't realise there was a project.clj in the root folder

yuhan09:01:40

sorry, still really confused with the entire cljs ecosystem

thheller09:01:45

@qythium you absolutely do not need deps/lein for shadow-cljs if you just want to do CLJS

thheller09:01:08

the project.clj in the root folder of the examples is only for Cursive. it is otherwise unused.

yuhan09:01:55

okay, thanks for the clarification!

yuhan09:01:14

I think I finally got it working with the re-frame example

yuhan09:01:13

so the idea is to start npx shadow-cljs watch ... from an external terminal, then use cider-connect-cljs instead of jacking in directly from Emacs?

thheller09:01:26

I don't use emacs myself and don't know but this was written by a contributor. not sure how current it is though. https://shadow-cljs.github.io/docs/UsersGuide.html#cider

👍 5
manuel10:01:29

@qythium that's what I do

Saikyun12:01:20

how do I refresh namespaces automatically when saving a file?

Saikyun12:01:01

this seemed to work:

(add-hook 'cider-mode-hook 
          '(lambda () (add-hook 'after-save-hook 
                                '(lambda () 
                                   (if (and (boundp 'cider-mode) cider-mode)
                                       (cider-ns-refresh))))))

temco13:01:11

which el file should these codes be inserted into?

Saikyun13:01:03

you need to (require 'cider) before as well 🙂

temco13:01:39

ok, thanks

Saikyun13:01:43

np, happy to help

temco14:01:20

what's the difference between ns-refresh and ns-reload?

Saikyun14:01:59

ns-refresh invokes clojure.tools.namespace.repl/refresh ns-reload invokes (require ... :reload)

Saikyun14:01:26

I don't know the implications of the different alternatives though

aisamu14:01:50

I believe refresh reloads all the changed dependencies as well, in order

temco15:01:04

I found that ns-reload actually did (clojure.core/reload "x.y.z") and made the fn which I had modified really refreshing, and ns-refresh didn't

temco15:01:51

maybe ns-refresh deletes something?

weavejester23:01:21

Does anyone know how to use the old cider-cljs-lein-repl functionality in newer versions of Cider? The latest version of Cider seems to need you to register the REPL type.