Fork me on GitHub
#cider
<
2018-10-18
>
richiardiandrea01:10:32

I get this error with Prelude on a colleague laptop:

Prompt will show when REPL connects to evaluation environment (i.e. Node)
Figwheel Main Controls:
         (figwheel.main/stop-builds id ...)  ;; stops Figwheel autobuilder for ids
         (figwheel.main/start-builds id ...) ;; starts autobuilder focused on ids
         (figwheel.main/reset)               ;; stops, cleans, reloads config, and starts autobuilder
         (figwheel.main/build-once id ...)   ;; builds source one time
         (figwheel.main/clean id ...)        ;; deletes compiled cljs target files
         (figwheel.main/status)              ;; displays current state of system
Figwheel REPL Controls:
         (figwheel.repl/conns)               ;; displays the current connections
         (figwheel.repl/focus session-name)  ;; choose which session name to focus on
In the cljs.user ns, controls can be called without ns ie. (conns) instead of (figwheel.repl/conns)
   Docs: (doc function-name-here)
   Exit: :cljs/quit
Results: Stored in vars *1, *2, *3, *e holds last exception object
2018-10-17 18:15:05.167:INFO::nREPL-worker-0: Logging initialized @11986ms
Starting node ...
IOException error=2, No such file or directory  java.lang.UNIXProcess.forkAndExec (UNIXProcess.java:-2)
user>
Has anyone seen it?

martinklepsch07:10:33

When I use jack in with clj it briefly shows the CLI invocation that’s used to start the nrepl server. Can I somewhere find the full command for copy-pasting?

martinklepsch07:10:43

Is it just this?

clojure -Sdeps '{:deps {org.clojure/tools.nrepl {:mvn/version "0.2.13"} cider/cider-nrepl {:mvn/version "0.18.0-SNAPSHOT"}}}' -e '(require (quote cider-nrepl.main)) (cider-nrepl.main/init ["cider.nrepl/cider-middleware"])'

jumar07:10:19

For my leiningen project I see this in *Messages* buffer:

[nREPL] Starting server via /usr/local/bin/lein update-in :dependencies conj \[org.clojure/tools.nrepl\ \"0.2.13\"\ \:exclusions\ \[org.clojure/clojure\]\] -- update-in :plugins conj \[refactor-nrepl\ \"2.4.0-SNAPSHOT\"\] -- update-in :plugins conj \[cider/cider-nrepl\ \"0.18.0-SNAPSHOT\"\] -- repl :headless :host ::...

martinklepsch07:10:48

thanks @U06BE1L6T I also found the line above in the messages buffer but wasn't sure if it's complete due to trailing ellipsis 😄

bozhidar14:10:25

Yep. The ... stand for work in progress. 🙂

martinklepsch14:10:56

yeah that makes sense. 🙂 Once I saw it in the messages buffer I was a bit more confident it's complete but in the minibuffer I guess an abbreviation would have been just as likely 🙂

martinklepsch14:10:23

enjoyed your defn podcast btw, many good points! @U051BLM8F

bmills13:10:51

So I just started using shadow-cljs, and noticed that all of the sudden trying to jack in will ask if I'm in a lein or shadow-cljs project. Problem is, no matter which one I pick, I get an error like unsupported project type '"lein"'. It looks like (cider-project-type) is resolving to a string instead of a symbol. BUT, if I remove the shadow-cljs.edn file from my project, the error goes away.

dpsutton13:10:46

@bryan778 if i remember right i think there was a release for a few hours where this confusion existed. strange that this is happening. any chance you have some dir-locals laying around?

bmills13:10:38

I don't think so...but I am also a mediocre spacemacs user at best. Those are project local vars I would set myself?

dpsutton14:10:18

yeah. dir-locals are variable overrides for a directory tree. so you can override cljs repl types for particular projects without setting the value globally

dpsutton14:10:42

see if there's a .dir-locals.el at the root of your project

dpsutton14:10:44

and what may be happening: if there are two build systems present -- like lein and shadow-cljs -- there's a notion of preferred build system. perhaps this is set to "lein" rather than 'lein

dpsutton14:10:15

defcustom cider-preferred-build-tool

dpsutton14:10:25

if you want to check the value of this var

dpsutton14:10:37

do you know how to do that? there are always different levels of emacs experience with CIDER users. sometimes 20 years in emacs, sometimes only emacs experience is booting up prelude or spacemacs and running CIDER

bmills14:10:45

I'm in the latter category, but that's a M-x : (cider-preferred-build-tool)?

dpsutton14:10:24

M-x is how you invoke "interactive" functions. we want to check the value of a variable so m-x isn't quite what we want to do

dpsutton14:10:51

SPC h d v describe a variable

dpsutton14:10:54

that's what we want

dpsutton14:10:11

space to activate stuff, help describe variable

bmills14:10:08

great. thank you! That evals to nil

dpsutton14:10:12

do you know how to evaluate arbitrary lisp code?

dpsutton14:10:33

there's a way to have a little prompt down in the minibuffer and you can evaluate (cider-project-type) from within your project

bmills14:10:26

is that the M-:? If I try that, I'll get the popup asking me which project type, and depending on what I choose, I'll get eiterh "lein" or "shadow-cljs" printed to the minibuffer

dpsutton19:10:14

oh i'm sorry i missed your reply

dpsutton19:10:24

did you make any headway?

bozhidar14:10:59

@richiardiandrea Seems like node being on the PATH or something like this.

richiardiandrea18:10:49

filed an issue in figwheel, it was a problem with the js file

bozhidar14:10:03

@danie You’ve got some version mismatch between the nREPL server your starting and the middlewares you’re loading. What’s in your deps?

danieroux18:10:49

-        org.clojure/tools.nrepl     {:mvn/version "0.2.13"}
+        nrepl {:mvn/version "0.4.5"}
This changed on my top-level deps (as oppose to dev deps) fixed it. That, and (setq nrepl-sync-request-timeout nil) for the next problem. Thank you.

bozhidar14:10:24

Likely you’ve got some old middleware that doesn’t work with modern nREPL.

vigilancetech20:10:43

what is this tool the guy demonstrates that allows one to click down thru a highly nested data structure return result from the REPL while still in the source code buffer? I realize this might be a different editor than emacs, but has anyone seen such a tool for emacs/cider? https://youtu.be/rh5J4vacG98?t=1086

vigilancetech21:10:09

@dpsutton hmm.. I'm getting an "inspector error" on that (with nothing in the messages buffer)

inspector error for: {:name "Hyundai Electronics PC3-12800", :type :memory, :used {:value 5311229952}, :total {:value 8579297280}}

vigilancetech21:10:09

and nothing in the cider error buffer either

dpsutton21:10:12

what is the "on that" in your case? I called cider-inspect on {:a :b} with C-c M-i and it worked for me

dpsutton21:10:31

by putting point at the end of that form and hitting the chord. what are you doing and where?

vigilancetech21:10:29

Its simply:

(first (mapv :memory @hist)) 

vigilancetech21:10:08

I guess I could try it on the literal data structure that came back

vigilancetech21:10:36

REPL had no problem with it

vigilancetech21:10:50

ah, had a middleware mismatch. Thanks @dpsutton!

dpsutton21:10:18

glad you got it resolved. what do you mean middleware mismatch?