Fork me on GitHub
#cider
<
2018-10-03
>
bozhidar06:10:44

@avichalp Seems that the node binary is not on your PATH.

bozhidar06:10:57

> Cannot run program “node”: error=2, No such file or directory

bozhidar06:10:06

That’s the only important thing in this stacktrace.

Avichal07:10:49

Thanks @bozhidar. Figured out the problem. Earlier I was using emacs from shell and now I started using it via the emacs App on OSX. It turns out with the emacs app get different env variables from when you launch emacs from shell (it gets shells env variables) Fixed the PATH and exec-path and it works fine again. cider

bozhidar07:10:05

@norman Did you manage to figure out your problem as well?

Avichal08:10:12

Thanks, I will check it out.

magra11:10:11

When I jack in cljs or create a sibling cljs all goes well, figwheel starts, browser connects. The buffer modeline shows (cljs pending). But as soon as the cljs.user> promt shows the modeline switches to (clj) not (cljs). The repl works but cljs buffers modeline reads (ClojureScript cider[not connected] and trying to eval code responds "No cljs REPLs in current session". How do I tell the REPL it is a cljs repl?

magra11:10:28

I realised, I was still using cemerick/piggieback. Sorry for the noise!

magra11:10:10

And thanks to your work on cider!!

bozhidar12:10:12

@magra No worries! You’re welcome!

bozhidar12:10:40

I guess we really to implement some warning when cemerick/piggieback is detected. That should help in situations like this one.

magra12:10:41

jep, since lein ancient and update packages will miss this one 😉

orestis12:10:54

When doing cider-jack-in in a deps.edn project, is there a way to specify aliases? I need to add some extra dev-only paths and libraries when in CIDER.

dpsutton13:10:25

((nil
  (cider-clojure-cli-global-options . "-A:fig")))
i've been using this in dir-locals @orestis

orestis14:10:31

Works like a charm, thanks. I tried to look for clojure-cli in cider’s source but github search wasn’t helping.

hlolli13:10:37

Related question, when I jack-in to deps.edn project, I feel very quickly that things start to become slow. The emacs process is taking 160mb and 11%cpu for very little things. Would it be more wise to start the project from the shell and just connect, any tricks like making the startup time longer for a performance gain?

hlolli13:10:56

Ok, one big piece missing, I'm starting many subprocesses from clojure, that may be the main cause actually...

bozhidar14:10:51

@hlolli CIDER doesn’t really care how the server was started - it just needs a server to connect to. There should be no difference performance-wise between any of the different tools you can use to spin the server via cider-jack-in.

hlolli14:10:19

@bozhidar true, it's just that I was surprised that emacs started to become slow. But I believe the source is the java process, I try increasing memory and heap size in jvm-opts. So it's off-topic for cider. Cider rocks as always.

bozhidar15:10:46

:man-bowing:

Avichal18:10:39

@bozhidar > I guess we really to implement some warning when cemerick/piggieback is detected. That should help in situations like this one. Good idea. I was also bitten by this earlier.

dpsutton21:10:13

what's the point of (put 'cider-jack-in-cljs-lein-plugins 'risky-local-variable t)? It just makes navigation in dired painful for me

malabarba14:10:26

Generally, any variable that can cause foreign code execution should be marked as risky in Emacs.

malabarba14:10:53

Otherwise someone could hijack your computer by sending you a plain text file with local variables written at the end.

malabarba14:10:13

It shouldn't make your life difficult though...

malabarba14:10:41

Have you tried just hitting ! when it prompts you about accepting the variable?

malabarba14:10:55

It should then save the value permanently

dpsutton15:10:48

i agree. however for this prompt I don't see that option

dpsutton15:10:34

i have to hit y on each directory change

dpsutton15:10:43

also great to see you back in clojure/CIDER

bozhidar16:10:24

> Otherwise someone could hijack your computer by sending you a plain text file with local variables written at the end. @U051C77FP But those vars don’t really execute anything by themselves, and you’ll have to jack-in from that compromised file to cause any harm, which seems unlikely to me. There’s also the point that a similar argument can be made about any shell command that’s configurable, but I’ve rarely seen those marked as unsafe.

malabarba16:10:37

Hm. Maybe I misunderstood the purpose of risky locals.

malabarba16:10:24

Perhaps marking a variable a variable as risky means that the user will never be offered the option of saving a value as safe

malabarba16:10:06

In that case I suppose the proper behaviour is to just NOT mark the variable as safe nor risky.

malabarba16:10:49

So you would still be prompted the first time, but then you'd have the option to save it.

bozhidar16:10:16

Yep, this certainly makes sense to me. And maybe we can make those vars defcustoms and directly initialize them.

bozhidar16:10:18

> Hm. Maybe I misunderstood the purpose of risky locals. To my knowledge only elisp code contained if vars/defcustoms is risky, because then it’s pretty easy mess someone up, as that code would immediately be executed. A classic example for this would be a dynamic modeline or something like this.

dpsutton21:10:33

i'm overriding back to tools.nrepl for one project that's older