Fork me on GitHub
#cider
<
2018-01-03
>
romain01:01:57

Is it possible to debug/inspect middleware when using a web app? I have an app generated with luminus, and I would like to inspect the middleware chain

jcburley01:01:09

Is there a good tutorial on overall CIDER workflow somewhere? From cider-jack-in through using Ctrl-Alt-X to reload changed functions, I think I understand -- but how best to "recompile" my source code (to make sure my hand edits and reloads are complete) and start afresh has not been clear to me, and I suspect my current tactic of using Ctrl-C Ctrl-Q (to quit and exit the server) and redoing cider-jack-in isn't ideal....

rymndhng01:01:23

there's a command called cider-refresh that reloads changed namespaces for you without having to restart the REPL.

jcburley01:01:13

Ah, that seems helpful, thanks!!

jcburley01:01:59

I'm still interested in a tutorial that walks through various typical workflows, if anyone has one. Or, maybe I should create one, if there's enough interest....

jcburley01:01:23

(I've enjoyed watching http://youtube.com/clojuretv videos -- some interesting stuff in there!)

bozhidar07:01:45

> Is it possible to debug/inspect middleware when using a web app? I have an app generated with luminus, and I would like to inspect the middleware chain

bozhidar07:01:29

Yeah, it is. CIDER doesn’t really care about the type of the app - the debug workflow remains the same - you instrument something and you end up with the debugger when it’s invoked.

bozhidar07:01:04

And try again my luck with:

Any volunteer to land a hand and move a bit of legacy third party code into CIDER-proper  ? That's a fun and easy task, but unfortunately I don't have time for right now.
Enlist in this adventure! It’s going to be fun! 😉 (I’m trying to solicit more contributions from the broader CIDER community - that’s my NY’s resolution for CIDER)

jmayaalv08:01:51

@bozhidar i would love to help but i have not much experience with elisp. where can i start to learn? (another NY’s resolution)

bozhidar08:01:20

For this particular task you don’t need to know a lot of Elisp. The Elisp code exists and just has to be updated when it’s moved to CIDER proper, as it’s depending on some API functions that changed since it was written. And for the Clojure part - it just incorporating the existing middleware into cider-nrepl.

jmayaalv08:01:55

great! thanks a lot i will then start to look into it

tomayerst12:01:25

Is there any way of checking which Java version CIDER is using?

tomayerst12:01:19

I am trying to jack in to a clojurescript repl and getting:

tomayerst12:01:22

error in process sentinel: nrepl-server-sentinel: Could not start nREPL server: Error loading cemerick.piggieback: java.lang.ClassNotFoundException: javax.xml.bind.DatatypeConverter, compiling:(cljs/util.cljc:1:1) Exception in thread “main” java.lang.RuntimeException: Unable to resolve var: cemerick.piggieback/wrap-cljs-repl in this context, compiling:(/private/var/folders/rx/cvhnsdg94n557wkzh0xtfqdh0000gn/T/form-init13475918382944489824.clj:1:13139)

tomayerst12:01:57

Which I believe is a Java 9 issue, but my default JVN is 1.8 (I have both installed though, hence the question)

bozhidar13:01:19

Just do in Emacs M-! RET java -version

bozhidar13:01:37

@tomayerst ^^^

tomayerst13:01:59

Thanks @bozhidar

tomayerst13:01:38

As I thought, Cider is using Java 9

tomayerst13:01:39

Well, or emacs is is using Java 9

bozhidar13:01:55

Exactly. You should adjust Emacs’s exec-path to account for this.

tomayerst14:01:17

Thank you, twice!

romain14:01:46

@bozhidar (edit). Well I think the workflow is broken. I tested on a smaller example and it works well! I have to check my project.

tomayerst15:01:16

Its a MacOS/Spacemacs thing I think. Spacemacs has exec-path-from-shell but I had set the path in the wrong shell config 😞

grzm18:01:37

Anyone here getting on board the tools.deps train? I'd really like to get out of the business of sticking dependencies in project.clj/`build.boot` so I can potentially use either tool (and others for cljs toolchains) and have my deps in a common place. Looking at https://github.com/seancorfield/boot-tools-deps right now and have it working for a number of tasks, but haven't figured out how to get it to work with cider-jack-in

grzm18:01:07

I've tried defining a cider task in build.boot that calls (deps), but that doesn't seem to be picked up at all (when I've replaced the body of that task with (/ 1 0), it happily completes). I've also tried updating cider-boot-parameters to deps repl -s -H :: wait: I can see that gets picked up from the call I see in messages, but (System/getProperty "java.class.path") in the subsequent repl only shows my boot directory (`"/Users/grzm/homebrew/bin/boot"`): nothing else is getting picked up.

dominicm18:01:15

@grzm my suggestion is to use load-deps at the top of the buildbuild.boot

richiardiandrea19:01:21

wasn't there a fake.class.path in boot?

grzm19:01:47

@dominicm interesting. If I do that, that's going to affect my build as well, correct? For example, if I want to include my tests in the repl, but not in my build. Thinking out load here, haven't really thought it through.