Fork me on GitHub
#cider
<
2016-07-16
>
dpsutton02:07:50

i'm running make test and I'm getting them all erroring. No such file queue, spinner, clojure-mode, etc

dpsutton03:07:23

may be that my version for emacs is 25.0.91.4 or something and the cask deps are going into a version file for 25.1.x.x or something

dpsutton03:07:34

pulling from git and rebuilding emacs to see if that fixes things

blueberry06:07:00

@drewverlee: Are you sure you want do call that defn inside -main? Does it work with regular Clojure code outside -main?

akiva12:07:41

@drewverlee, using defn or def inside of a defn is not idiomatic Clojure. That’s what letfn and let are for. Anything beginning with def is meant for top-level definitions.

malabarba14:07:21

@drewverlee: that command instruments the function. You still need to call the function in order to step through it.

Drew Verlee14:07:29

right that all makes sense. trying to get something else to work. I correct the test below to work then save the file.

(ns sad.core-test
  (:require [clojure.test :refer :all]
            [sad.core :refer :all]))

(deftest a-test
  (testing "FIXME, I fail."
    (is (= 1 1))))
and i call cider-test-run-ns-tests and i get
Test Summary
sad.core-test

Tested 1 namespaces
Ran 1 assertions, in 1 test functions
1 failures


Results

sad.core-test
1 non-passing tests:

Fail in a-test
FIXME, I fail.
expected: (= 0 1)
  actual: (not (= 0 1))
where i would the test to pass because i set 1 to 1? Is there anything i have to do beyond saving the file before calling cider-test-run-ns-tests

Drew Verlee14:07:50

it seems calling cider-refersh causes this to work

Drew Verlee14:07:12

which i find odd, now its not clear to be when i have to call cider refresh.

malabarba14:07:54

Any evaluation command would have done the trick

malabarba14:07:14

I usually load-file or eval-defun

malabarba14:07:41

Cider never cares about your file contents

malabarba14:07:04

The JVM only knows about things you've evaluated

Drew Verlee14:07:12

ah, that actual connects a few dots for me

dpsutton15:07:50

anybody ever see anything like this when running make test? Basically all tests fail

malabarba16:07:44

@dpsutton TBH I don't use cask to run the tests

malabarba16:07:12

I just install the deps from the package menu and run the tests from emacs

malabarba16:07:59

But I'm sure someone can help you with that.

Drew Verlee16:07:52

any obvious starting points for what would cause error while handling the debug message: (not a nrepl dict) to occur while evaluating a function after running cider-defun-debug-at-point.

dpsutton16:07:08

ah ok. thanks

dpsutton16:07:22

how do you run the tests from inside emacs?

dpsutton16:07:44

obviously with ert, but how do you reliably run them all?

malabarba16:07:30

I load the tests file(s), and then M-x ert

dpsutton16:07:57

so no good way to make sure that you run them all?

malabarba16:07:45

What do you mean? M-x ert should run them all

dpsutton16:07:54

i mean having to load all the files

dpsutton16:07:03

making sure you found all test files in the project

malabarba16:07:20

No easy way to load all the files in general 😕

dpsutton16:07:59

Do you know of a good guide of how to setup local copies of the cider middleware so that i can send pull requests? I'm not sure how to make that stuff load local copies versus whatever it normally does

dpsutton16:07:08

trying to make some changes to the clojure middleware

dpsutton16:07:20

hmm, i'm unable to use cider to run individual cider-nrepl tests since they use test fixtures. Cider doesn't know to use the test fixture

Drew Verlee17:07:56

udpate: I changed my ~/.lein/profiles.clj to not be utterly wrong and everything seems to be working

dpsutton17:07:26

when running cider-nrepl tests, both from cider's test runner and from lein, i'm getting only 2 tests with 16 assertions

dpsutton17:07:18

ah ok. so its nested under a profile :test-clj

malabarba18:07:27

@dpsutton as for your first question, it should be as simple as cloning cider and doing jack-in on the repository. If you explicitly want to test its behaviour on another project you can do lein install to install your local clone.

dpsutton18:07:45

ah ok. thanks

dpsutton18:07:54

i've already sent a simple pull request

malabarba18:07:13

Then, when you jack-in on some other project it should catch the just-installed version

dpsutton18:07:16

i'm looking into the consistent test names functionality

dpsutton18:07:45

so lein install puts it in the m2 directory so that other projects use that version?

radon18:07:13

Assuming that your project.clj specifies the version that you lein-installed, yes.

radon18:07:02

You may want to bump the version number before lein-installing, so that you can easily switch back to the official version by changing the dependency vector in your project.clj.

malabarba18:07:59

Yes, what @radon said. Lein install puts it in the m2 directory. Your project will use that version if it matches the version of cider.el you have.

radon18:07:32

I should clarify my statement. If you’re working with things like CIDER that expect a particular dependency number, then bumping the version number is probably a bad idea. Only do that if you’re working with dependencies amongst your own projects.

malabarba18:07:51

@dpsutton and thanks for the PR 😃