Fork me on GitHub
#cider
<
2018-06-24
>
danielsz13:06:55

With the latest snapshot, I'm seeing errors such as void-variable cider-ancillary-buffers apparently coming from cider-connection. The definition has moved with the latest commit (to cider-common.el). Could it be that there's a reference to the old location dangling? Anybody else can see that error?

dottedmag13:06:15

@bozhidar Are your recent commits related to require: Symbol’s value as variable is void: cider-ancillary-buffers-like issue?

bozhidar14:06:17

Seems MELPA just built from a bad commit. I fixed this only minutes after I broke it.

🙏 4
bozhidar14:06:52

The current master should be fine - I see it’s compilation errors/warnings free.

👍 4
danielsz14:06:45

Awesome. thanks a lot.

dottedmag14:06:02

@bozhidar I'm getting an error with a current master, had to revert to 5a75a3e234f1aefb6696260d5a67ec5014b2c8e5

dottedmag14:06:20

Just a sec, let me dig out the error message

dottedmag14:06:13

Happens after startup, on M-x cider-version

dottedmag14:06:25

So something breaks due to autoloads.

pablore18:06:59

So I have cider/cider-nrepl "0.18.0-SNAPSHOT on my .lein/profiles.clj, but when doing cider-connect-cljs on emacs I’m getting:

'cider-connect-clojurescript' requires the nREPL op "classpath".  Please, install (or update) cider-nrepl 0.18.0-SNAPSHOT and restart CIDER

richiardiandrea18:06:31

@pablore that command does not inject any deps so you need to have it already on your classpath - deps.edn or project.clj

richiardiandrea18:06:51

The jack in command does it for you

pablore18:06:55

I am actually using shadow-cljs

pablore18:06:00

so no project.clj

richiardiandrea18:06:48

Yeah so cider should have shadow repl, but you need to jack-in-cljs

richiardiandrea18:06:01

On mobile now cannot recall the exact command

pablore18:06:25

cider-jack-in-cljs gives

error in process sentinel: Could not start nREPL server: npx: installed 225 in 13.772s
command not found: server

richiardiandrea18:06:07

Uhm, how is shadow installed, it seems cider assumes local install

richiardiandrea18:06:55

Gotta go now sorry, will check in later

bozhidar19:06:46

@dottedmag Just fixed it again. This time should be for real.

bozhidar20:06:15

I’m still puzzled what was causing the problem, but I’m certain it no longer exists on master.

bozhidar20:06:00

@pablore Yeah, we try to start shadow with npx shadow-cljs server.

bozhidar20:06:09

Does this work for you outside Emacs?

pablore20:06:15

yep, that works

dpsutton20:06:06

is it possible that the path is not on emac's path? check exec-path

pablore20:06:27

added my path to npx to exec-path but still nothing

dpsutton20:06:01

so it looks like it passes server as the arg

dpsutton20:06:06

(defcustom cider-shadow-cljs-parameters
  "server"
  "Params passed to shadow-cljs to start an nREPL server via `cider-jack-in'."
  :type 'string
  :group 'cider
  :safe #'stringp
  :package-version '(cider . "0.17.0"))

dpsutton20:06:17

can you run npx shadow-cljs server outside of emacs?

pablore20:06:02

and I tried running it outiside of emacs and then using cider-connect-cljs but got this error: https://clojurians.slack.com/archives/C0617A8PQ/p1529864339000076

dpsutton20:06:31

what about something like (shell-command cmd "cd [location] && npx shadow-cljs server")

dpsutton20:06:42

maybe see some error in *Messages*

dpsutton20:06:43

output is in ‘Shell Command Output

bozhidar20:06:20

>

'cider-connect-clojurescript' requires the nREPL op "classpath".  Please, install (or update) cider-nrepl 0.18.0-SNAPSHOT and restart CIDER

pablore20:06:57

that command apparently crashed my emacs :S

bozhidar20:06:02

I’m pretty puzzled by this. I guess you haven’t setup the middleware in your project, but even without it you should be able to connect. I don’t think cider-connect-cljs requires cider-classpath during it’s init. Unless that’s coming from the cljs deps checking.

dpsutton20:06:08

sorry about that 🙂

bozhidar20:06:20

Works for me. (tm) 😄

dpsutton20:06:45

connecting with cljs now checks for piggieback and clojurescript on the classpath. which will fail if they don't have cider-nrepl on the classpath which can handle the classpath op

dpsutton20:06:38

or does regular nrepl handle the classpath operation?

dpsutton20:06:39

yeah cider-nrepl is what provides to understand what the classpath operation is. so can no longer connect to cljs repls with CIDER it would seem (without cider-nrepl)

dpsutton20:06:56

(defun cider-library-present-p (lib)
      "Check whether LIB is present on the classpath.
    The library is a string of the format \"group-id/artifact-id\"."
      (let* ((lib (split-string lib "/"))
             (group-id (car lib))
             (artifact-id (cadr lib)))
        (seq-find (lambda (lib)
                    (let ((g (car lib))
                          (a (cadr lib)))
                      (and (equal group-id g) (equal artifact-id a))))
                  (cider-classpath-libs))))

dpsutton20:06:33

hmm, i'm not seeing that on cider-connect-cljs though

pablore20:06:49

wtf now cider-jack-in-clojurescript is outputting:

cider-jack-in-command: Invalid byte opcode: op=183, ptr=2Invalid face reference: t
Invalid face reference: t [125 times]

pablore20:06:14

(the only change i made was updating the cider package to the latest

dpsutton20:06:58

can you wipe it out of the elpa dir and reinstall?

pablore16:06:56

Now I'am at work in a completely different machine and am getting the same error

dpsutton20:06:09

did you upgrade to emacs 26 recently by any chance?

pablore20:06:10

Anyway, see ya later, I’m off to the movies. Thanks for the help!

pablore20:06:47

@dpsutton I will try doing a full reinstall later. And not, still on emacs 25

dpsutton20:06:58

enjoy the movies. ok. was just a little suspicious of invalid bytecode

dottedmag21:06:04

@bozhidar Thanks, now it works (re: cider-ancillary-buffers )