Fork me on GitHub
#cider
<
2018-12-21
>
lispyclouds08:12:23

When running cider-format-buffer I am getting this error Wrong type argument: arrayp, nil. Im new to the emacs ecosystem and im not sure how to debug this. Any help is much appreciated!

lispyclouds16:12:38

fixed it. was a problem with boot where the nREPL middleware wasnt injected.

eraserhd17:12:29

THANK YOU CIDER PEEPS! I have got basic stuff working in Kakoune, and I'll have so much more working soon because of your work.

❤️ 4
dominicm18:12:53

Tell me more!

dominicm18:12:05

If I can switch to kak, that would be exciting

eraserhd18:12:49

It's still really really rough. But I have mapped ,ee to evaluate a form, and ,ef to evaluate a file. rep will need a bunch more options. I'll get symbol info next, (clojure-lsp can do this with kak-lsp, but it's stopped working for me and I haven't looked into it).

eraserhd18:12:43

I'm thinking a lot about how to make a Kakoune repl buffer.

eraserhd18:12:10

And running tests will be soon, since that's how I work.

dominicm18:12:26

Is the replant code useful at all for figuring this stuff out?

eraserhd18:12:31

I'm not sure. I've been reading cider.el, and I remember some details of vim-fireplace.

eraserhd18:12:03

Kakoune really wants tiny shell programs to do things, which is a philosophy I can dig, so I've been making it work that way.

dominicm18:12:38

Me too, but replant has logic which I think you can reuse.

eraserhd19:12:11

OK, queueing up for night-time reading :D

eraserhd19:12:17

I think I've looked at it before, but not while thinking about how to work with Kakoune.

eraserhd19:12:34

I'm thinking about how to make rep have a persistent "session" when rep will never stay around persistently.

eraserhd19:12:37

I've seen evidence in the nrepl code that it's been thought about, but not implemented. Specifically, the ability to subscribe to :out and :err for a session.

futuro18:12:36

@jumar @tristram deftest is a macro which probably explains why trying to attach the cider debugger to it fails, as the macro creates a new function with the name you gave, but the body of the test associated with the :test metadata on that function.

jumar20:12:08

As I said it works without problems as long as you run tests via run-tests et Al. I believe the problem is that cider evaluates the whole namespace when it runs tests which effectively removes breakpoints

0atman15:12:46

top learning, guys. Thank you very much

0atman15:12:17

we do TDD at work (currently in Cursive), so debugging tests is a huge part of my life - I'll post here when I figure it all out 👌

futuro18:12:21

(defmacro deftest
  "Defines a test function with no arguments.  Test functions may call
  other tests, so tests may be composed.  If you compose tests, you
  should also define a function named test-ns-hook; run-tests will
  call test-ns-hook instead of testing all vars.

  Note: Actually, the test body goes in the :test metadata on the var,
  and the real function (the value of the var) calls test-var on
  itself.

  When *load-tests* is false, deftest is ignored."
  {:added "1.1"}
  [name & body]
  (when *load-tests*
    `(def ~(vary-meta name assoc :test `(fn [] ~@body))
          (fn [] (test-var (var ~name))))))

futuro18:12:55

I suspect its the confluence of how cider debugging decides to drop the debugger off of re-evaluated functions, and how deftest builds a test on a function.