Fork me on GitHub
#chlorine-clover
<
2020-08-19
>
Rowan Barnard04:08:43

Hi guys, not sure if this is Chlorine, Atom or just a general Clojure thing but I was trying to require in clojure.test.check using the (require...) syntax as opposed to (:require...) and it kept giving me a ClassNotFound exception:

Rowan Barnard04:08:28

As you can see in the screenshot when I required in test.check,properties using the same method it worked

Rowan Barnard04:08:41

Then when I used the (:require...) as a keyword at the top of the file that evaluated without any problems and I could use the stuff in the test.check namespace:

Rowan Barnard04:08:28

So really not sure what is going on there? And why the non-keyword require was not working - am using Sean Corfield's deps.edn file with REBL setup just so you know. Any input would be great thanks 🙂

Rowan Barnard04:08:59

The command-line options I am using to start it up before I connect with Chlorine: clj -A:deps:test:rebl-11-win:socket

seancorfield04:08:28

I suspect you accidentally did eval-block with you cursor inside the [ .. ] or immediately after it, instead of eval-top-block.

seancorfield04:08:47

(even tho' your screen shot shows the cursor outside the form)

seancorfield04:08:48

I can repro your error if I do ctrl-; b (eval-block) with my cursor inside or just after the ]. If my cursor is after the ) it works.

seancorfield04:08:33

This is because you're trying to evaluate the form [clojure.test.check :as tc] and the symbol clojure.test.check looks unquoted and therefore fails to resolve @flyingpython

Rowan Barnard04:08:46

Yeah my screenshot I took sometime afterwards, yeah I always try to do the top block but I guess it is easy to miss the shift and get the little b instead so that was probably it then, thanks for helping me understand 🙂

Rowan Barnard05:08:25

Yes I've tried setting up the same context as before and the non-keyword require is working and throws the same exception when I use lowercase b so it must just have been that I missed the shift key on it as you say, thanks Sean 😉